Voxel Debris

Tutorial for Firestorm FS, Red Alert 2 RA2, Tiberian Sun TS, Yuri's Revenge YR

Avatar of Allied General

Allied General

Category: Graphics
Level: Intermediate
Created: Wednesday July 29, 2009 - 4:33
Updated: Sunday October 11, 2009 - 8:45
Views: 2477
Summary: How to use Voxel debris.
Rating
  • Staff-
  • Members-
  • Average-

0 votes

The thread is pretty damn old but this is for those newbee/moderate level modders who want to add some visual flair to there unit destructions.

Ok here is a simple and fairly easy way to give every voxel unit
specific debris (best used for a tanks turret and/or barrels) however i
have been taking it further and giving Harvesters and Refinaries for
example Tiberium Crystals come flying out of them

Firstly although it does not seem to be neccessary add ur debris to the
"VoxelAnimations" list for example

(i give 4tnk [Mammoth tank] as an example however default TS does not
have this unit, its just to show barrel and turret example

[VoxelAnims] -section
30=4TNKTURRET
31=4TNKBARLDEBRIS

(in this case '4TNKTURRET' is already defined in the list so dont bother
adding a new one, we will get onto that later

Then go to the 4TNK Entry and look at the debris section which will
probably look something like this on any unit

MaxDebris=4

this is the most common input for this tag, however u dont want the tank
to have just 4 normal debris pieces, you want it to have those 4 + 1
tank barrel flying off it and 1 tank turret so change the entry to
MaxDebris=6 ;defines TOTAL maximum debris for this unit

DebrisTypes=4TNKTURRET,4TNKBARLDEBRIS ;defines the SPECIFIC debris you want this unit to have

DebrisMaximums=1,1 ;Defines the AMOUNT of specific debris types u want for this unit

So you have now defined a total of 6 maximum debris amounts for the
mammoth tank and a maximum of one of these will be the tanks barrel and maximum of one will be the tanks turret

Sadly unlike Red Alert 2 there is no 'MinDebris=' tag so there is a chance of the debris not appearing at all, which isnt such a bad thing since the turret wouldnt 100% of the time come flying off, however it still seems to appear the majority of the time


Now onto the specifics for each new debris piece so go to the Debris action of the Rules.ini just search for '[PIECE]' or something now you will see there is already an entry for '4TNKTURRET' well it is dud and seems to be a mistake of WW's. It will look like this

(TS Original)

[4TNKTURRET]
Name=Mammoth Tank Turret
ShareTurretData=yes
ShareSource=4TNK
Elasticity=0.0
MinAngularVelocity=10.0
MaxAngularVelocity=14.0
MinZVel=30.0
MaxZVel=38.0
MaxXYVel=8.0
Duration=100
ExpireAnim=TWLT036
Damage=30
DamageRadius=50
Warhead=TankOGas

(TS Fixed)
[4TNKTURRET]
Name=Mammoth Tank Turret
Image=4TNKTUR
;ShareTurretData=yes
;ShareSource=4TNK
Elasticity=0.0
MinAngularVelocity=10.0
MaxAngularVelocity=14.0
MinZVel=30.0
MaxZVel=38.0
MaxXYVel=8.0
Duration=100
ExpireAnim=TWLT036
Damage=30
DamageRadius=50
Warhead=TankOGas

As you can see I have commented out ShareTurretData and ShareSource
Strangely it works WITHOUT these tags and not with, originally it seemed westwood tried to define specific turret debris through JUST this section using those two tags but they do not work. Now when you start the game and destroy a mammoth u will see the effects and it looks cool.

There is alot more things to do with Voxel debris that is not used at all however there is no gaurentee that it will work (like the ShareSource instance etc) I have begun working with these and using them in TS Retro
I now have the Tiberium harvester and refinary for instance explode with random amounts of red/blue and mainly green Tiberium crystals come flying out of them with a specific sound (for the voxel appearing), graphics (voxel Tiberium crystal graphics which i have made blue/red/green) and graphics for when the tiberium explodes, this however is still touching on the surface of what you can do. You can define related particle systems that the debris spawns and the amount, sounds for the debris bouncing/appearing dissappearing, damage, damageradius (this could be used for other things if it works properly unlike the art.ini entry for this tag which only allows TINY values any high value is just small radius) and the warhead that it uses.

So experiment away, I have been and will be using Debris alot more now to greater effect also i have using the 'VoxelIndex' for debris made it so when the Mammoth Mk II explodes all its body parts and its body comes flying off, all these little things really do add to the game

Anyway thats all for now, im experimenting with something tottaly different at the moment and if all goes well maybe writting a Tutorial for that


-SMIFFGIG

P.S. Play TSR to experience voxel debris implemented in its highest degree (more than any other mod) ;)


RA2/YR Notes

DebrisTypes=4TNKTURRET,4TNKBARLDEBRIS ;defines the SPECIFIC debris you want this unit to have

DebrisMaximums=1,1 ;Defines the AMOUNT of specific debris types u want for this unit


The comma bit in DebrisMaximums is ignored in RA2/YR so you could have two turrets or barrels flying off o_O

Also odd results if used on [AircraftTypes] or Naval=yes units e.g. I.E.

Playing around with particles can produce unpredictable events as well.

Credits

Original MaterialSMIFFGIG

Return to top