From Data Realms Wiki
A TDExplosive is a time detonated explosive. When in an AHuman's inventory, it can be thrown like a grenade. The timer is only activated when they are shot out of a gun or thrown by an AHuman.
There is an example TDExplosive available here.
Now we will break it down variable by variable. (note offsets will not be covered).
AddDevice = TDExplosive // The instance call, defines the next text as parts of a HDFirearm. InstanceName = Frag Grenade // The name used to refer to the instance later. AddToGroup = Bombs// The group it will be under when you start a skirmish with no pre-placed brain. Required*. Mass = 2 // The mass in kg for example; 0.01 would be 10g, 0.1 would be 100g and 1 would be 1kg. RestThreshold = -500 // how easily the TDE will become terrain; this one doesn't. HitsMOs = 1 // Boolean value that determines if this particle can hit other particles. GetsHitByMOs = 0 // Boolean value that determines if this particle can be hit by other particles. SpriteFile = ContentFile FilePath = Base.rte/Devices/Explosives/FragGrenade.bmp // Tells The TDExplosive to use the sprite specified. FrameCount = 1 // How many frames to use. SpriteOffset = Vector X = -3 Y = -4 EntryWound = AEmitter CopyOf = Dent Metal // The emitter to use for where the bullet enters the weapon. ExitWound = AEmitter CopyOf = Dent Metal // The emitter to use for where the bullet exits the weapon. GoldValue = 5 // How much gold the weapon costs.
*If not in the group "Bombs" it will not appear in the buy menu screen. You can still add alternative groups underneath.
AtomGroups and Deepgroups
AtomGroup = AtomGroup // AutoGenerate = 1 Material = Material // Defines the material that the TDExplosive will be made up of. CopyOf = Military Stuff // Reference to the material you want the round to be made of. Resolution = 2 // Depth = 0 // DeepGroup = AtomGroup // AutoGenerate = 1 Material = Material CopyOf = Military Stuff Resolution = 4 Depth = 10 DeepCheck = 1 //
JointStrength = 75 // How much force is required to be slung out of your grip. JointStiffness = 0.5 // How much force is required to move the joint DrawAfterParent = 1// Boolean value that determines if it is drawn in front of the parent a.k.a hand (1) or not (0). DetonationSound = Sound AddSample = ContentFile Path = Base.rte/Sounds/Explode2.wav // Tells The TDExplosive to use the sound specified during detonation. StanceOffset = Vector X = -12 Y = -5 StartThrowOffset = Vector X = -12 Y = -5 EndThrowOffset = Vector X = -12 Y = -5 TriggerDelay = 2500 // Time delay (in milliseconds) until detonation after being thrown. ParticleNumberToAdd = 10 // Defines the amount of the immediately below particles upon detonation. AddParticles = MOSParticle // Defines the particle instance to be used (MOSParticle/MOSRotating) upon detonation. CopyOf = Side Thruster Blast Ball 1 // The instance of the particle to be used upon detonation.
Also to create a TDexplosive that will explode on impact for a grenade launcher or something similar, add this after any "AddParticles" lines.
GibImpulseLimit = 50 // The lower the number, the easier it is to explode when hitting things AddGib = Gib GibParticle = MOPixel // What you want to be spawned when it gibs CopyOf = Particle Concrete Light // What you want to be spawned when it gibs Count = 25 // how many to create Spread = 90 // the angle to make them appear, 0 will make the gibs come out in a straight line MaxVelocity = 15 //max velocity of gibs MinVelocity = 1 // min velocity InheritsVel = 1 // if the gibb's will "inherit" the parent velocity, 0 = no 1 = yes
Remember the TriggerDelay needs to be long enough for the TDExplosive to hit something, and it needs to be going fast enough to gib. Also a word on the InheritsVel. Basically if the min and max velocitys are set to 0, along with the InheritVel, whatever is gibbed will fall straight down. If you turn the InheritsVel on however, they will continue with the velocity the round was traveling when gibbed. Play around with it to see exactly how it works.