...
September 23, 2004 - 23:36
Read Smiffgig's tutorial on V. Debris FIRST!! or you wont understand a bloody thing here...or will you?! Surprised

Anyway.... if you've played Tib.Sun,you'll nodice,that when you blow up any vehicle,or building,Debris comes out,little bits and peices of the building,or Axles,tires for Vehicles. and thought 'How the heck is that done?' well,its trough the marvels of Voxel Debris. ::lame music plays:: in the tut. made by smiffgig,he explained how to make a mammoth tank's turret go flying when blown to Kingdom come,but here i'll explain how debris can be used in other ways. First with 1 Vehicle(I will post the second part,for the Missile Silo,later on.)

I: Making a Visceroid blow up in a more..Violent fashion.
in Tib.Sun there are 3 Meteorite voxels hidden in Local.mix,a tiny one,a medium sized one,and a giant one. unused,of course. along with DIRTEXPL.SHP. a tiberium cloud animation. very interesting.
Open Rules.ini(or FireStrm.ini) and find [VISC_SML](the Baby visceroid)
the Visceroids are Vehicles,and so they can use the valid debris tags(not sure with infantry,though.) first,ad the line Explosion=DIRTEXPL to Visc_Sml, and Visc_Lrg,now when they blow up,they burst into a cloud of gas! but thats not all...

Add these 3 lines to the SMALL VISCEROID:

MaxDebris=2 ;Makes it Use debris
DebrisTypes=VISCPEICE ;The new debris type we will be adding
DebrisMaximums=2 ;This prevents more debris then nessicary,and prevents Tires,axles,ect sent off the visceroid..

Add this to the Large One..

MaxDebris=4 ;Double the Debris...Heh
DebrisTypes=VISCPEICE ;Same type of debris,keepin it the same here
DebrisMaximums=4 ;Keeps our lovely meatball from spewing tires.

Now,VISCPEICE isnt a valid type of debris that exists(YET),without it defined,bad,evil Internal errors occur. now,scroll up to [VoxelAnims]. these are all the voxel animations in the game(tires,gastanks,turrets,so-forth),at the bottom add this line

10=4TNKTURRET;(this is already listed,no need to add it)
11=VISCPEICE ;(Our new animation!)

now,it needs coding,below that,post this:

[VISCPEICE]
Name=Chunk of a Visceroid
Image=MTRT ;Makes the game use the Small meteor Voxel
Elasticity=0.0 ;Is it elastic?(think...rubber ball)
MinAngularVelocity=10.0
MaxAngularVelocity=14.0
MinZVel=30.0
MaxZVel=38.0
MaxXYVel=8.0
Duration=100 ;How long it lasts(duh!)
Damage=30 ;What damage it does to a unit(depends on WH,also)
TrailerAnim=DIRTEXPL(giant gas clouds.)
DamageRadius=50 ;how much damage it does in an area.
Warhead=Gas ;warhead it uses

Save and close out rules and Load tiberian sun,now..blast a visceoid into peices,and watch it...die. XD

2: (Added 9/24/04) The Nod Missile silo and SAM Site are also..VERY good candidates for voxel debris. sounds impossible,but it works,voxel debris can be used on Buildings.

Part II:make the S.A.M. Site  loose a barrage of missiles when blown up.
S.A.M. Means Surface.to.Air.Missile,and why not make some use of one of the unused missile voxels trough the SAM site,and make the game a little more real. open Rules.ini and scroll to the entry for the NOD SAM site,you will find a very familiar line of code..

[NASAM]
MaxDebris=3

Seem familiar? its the code line that controls debris per object. so we can use Voxel Debris here,too bad this dosent use a voxel turret,id use that for Debris,too. but lets work with what we got..edit the NASAM Listing so it looks like this..

[NASAM]
MaxDebris=8 ;I have reasons.
DebrisTypes=SAMMISSILE ;our new debris type.
DebrisMaximums=8 ;so all the debris can/will be used,and no tires go flying!

now,find the [VoxelAnims] section and scroll to ViscPeice. add this below it.
12=SAMMISSILE

[SAMMISSILE]
Name=Big SAM Missile ;This dosent matter at all,probally Refrence by WW
Image=MISLSAM ;Image is Key!
Elasticity=0.0
MinAngularVelocity=10.0
MaxAngularVelocity=14.0
MinZVel=30.0
MaxZVel=38.0
MaxXYVel=8.0
Duration=100
Damage=30
DamageRadius=20 ;just some random number..blah blah!
Warhead=TankOGas ;Regular WH for all debris.

Now,with that out of the way,save,and fire up TS/FS and blow a SAM Launcher. all the missiles loaded inside it go flying. this can also work VERY WELL with the MLRS voxel thats hidden in the TS Mixes,make it look like all the rocket pods blew apart.  stay tuned for part 3,a tut on unit debris,deployable building debris,and,how to make the Missile Silo 'toss' its missiles out....