|Tutorial Name: Making A New Demo Truck
Made by: Banshee
This tutorial was originally created to be exclusive from Entertainment Explosion. Unfortunatelly, EE is no more, so it's a PPM only tutorial. Feel free to link it, but don't copy it anywhere, please.
:: Making A New Demo Truck ::
Red Alert: Aftermath showed the fans the Demo Truck. Since them, the demo truck is a common unit in mods. However, most of the modders doesn`t know how to make them and those who know, appeal to add new airburst weapons, add a new infantry to hold this airburst weapon, etc... In this tutorial you will know how to make a simple and effective Demo Truck without needing airburst weapons, new infantries, etc...
Prerequisites: demokit.zip, XCC Mixer and XCC Mix Editor.
Atention: Some of the operations below might be skipped if your mod is in advanced stages:
Operation 1 - The Initial Steps:
Open your XCC Mixer and extract the sounds01.mix, sound01.ini, art.ini and rules.ini from your expand01.mix (or your expandXX.mix in case you`ve added this mix file before on it). If you do not own Firestorm, extract sounds.mix, sound.ini, art.ini and rules.ini from your TibSun.mix.
After extracting everything, you should open your XCC Mix Editor and create a new mix file called ExpandXX.mix and create another mix file called EcacheXX.mix (substitute XX to a number between 02 and 99 and must be the same in the 2 mix files). If you already have these files, you do not need to create it again.
Now, with your XCC Mix Editor open your sounds01.mix (or sounds.mix for non-FS users) and drag and drop the snukexpl.aud to this mix file. This .aud file is in thedemokit.zip (Atention newbies: To drag and drop the file, Windows Explorer must not be maximized). Now, press compact mix and close the file.
Now add the demobomb.shp (from demokit.zip) to ecacheXX.mix using the same way specified in the paragraph above. Also use the same process to add the ecacheXX.mix and the Sounds01.mix (or sounds.mix) to your expandXX.mix.
Operation 2 - Adding the sound:
Open your sound01.ini (or sound.ini) and add to the end of the list:
Atention: If the number 400 is used, use another unused number! 400 is just an example, you can use any unused number!
Now, in the end of the file, you add the following code:
Priority=100 ; Note that priority can be a number between 0 and 100. The higher the number, the higher the chance of the nuke sound be listened.
Operation 3 - Adding the animation:
Now things will start getting a bit harder. Open your art.ini and add there the following code:
Atention: You can put it anywhere inside the art.ini, but it`s recommended to put it below the explanation of Animation Overlays, which is in the middle of the file.
For those who got confused with the code above or want to customize it, here are the explanations:
Scorch= Determine if the animation scorches the ground. An atom-bomb raise the temperature of the location to nearby 15 million grades Celsius, so I believe it does...
Flamer= Determines if the animation leaves fire in the ground after it`s gone.
Crater= Determines if the animation forms a crater. An A-Bomb shakes the ground... so I believe there are some chances...
Damage= Determines the damage that animation will apply to the location. To have an a-bomb effect, the damage must be really high.
DamageRadius= Determines the size of the area affected by the animation. For very huge animations like a nuke, this number must be very high. If you think the current value is low, raise them considerably.
Report= Determines the sound used by the animation. That`s where the SNUKEXPL gets in.
Warhead= Warhead used to determined the percentage of damage taken by the victims.
Rate= Desired animation frames per minute. In Red Alert 2, Westwood uses 400 to the nuke animation and 400 worked well for TS too.
Note: My knowledge about nuclear bombs is not complex. I've never researched about them, just heard... so if you think I`ve wrote any stupid thing about nukes, you're right.
Final Operation - The Rules.ini:
Now, this is surely the best part of the tutorial. Open your rules.ini (or your firestrm.ini). Go to the Animation List and add the following code in the middle of the list:
Note: The number 55 can be replaced by any number that is not in the list. 55 is just an example! However it's known that some numbers might cause problems when saving the game. You can find more info in a great tutorial by SMIFFGIG about it by clicking here.
Attention: Messing up with animations is very dangerous, including adding a new one. If you really add this animation, your Tiberian Sun can become unable to load your new saved games. However, if you don`t add it, there will be no Demo Truck. It's a risk... you choose!
Now get into the Warhead List and add the following code:
Note: The number 27 can be replaced by any number that is not in the list. 27 is just an example!
Now get into your vehicle list and add the following code:
Note: The number 53 can be replaced by any number that is not in the list. 53 is just an example!
Now with everything declared, let`s insert the vehicle code (near other vehicles, duh):
; Demo Truck
ThreatPosed=160 ; This value MUST be 0 for all building addons
For those who got confused with the code above or want to customize it, here are the explanations:
Image= Determines the picture used by the vehicle. The picture TRUK already comes with the game, but it doesn`t come declared on art.ini as default. For those who want declare it, check the code in the final of the tutorial.
Name= Determines the name that appear in the sidebar and the name which appears in the name (when the mouse cursor is over it).
Prerequisite= Determines the buildings that are required to be built by the player before building the unit. Note that computer doesn`t seems to ignore the prerequisite when it build buildings, but it does ignore the prerequisite when it builds infantry, vehicles and aircraft.
Primary= Determines the weapon that will be used by the unit. If the weapon doesn`t exists, the game crashes. You are free to create unlimmited new weapons.
Category= Determines how AI recognize your unit and how your unit will behave (more info on Air Transport Tutorial, first way). The options are: "Soldier", "Civilian", "VIP", "Recon", "AFV", "IFV", "LRFS", "Support", "Transport", "AirPower" and "AirLift". Tiberian Sun 1.17a or older also supports the following options: "Arty" and "AirTransport".
Strength= Number of hit points of the unit. Demo Trucks should be easy to kill, otherwise they become too good and umballance the game.
Armor= Determines the armor type of the unit which will determine the percentage of damage that it takes from each weapon.
Trainable= Determines if the unit can become veteran or elite. A demo truck dies when it hits a victim, so it shouldn`t be trained.
Crusher= Determines if the unit crushes other units with "crushable=yes" or infantry without "crushable=no". In my opinion, a demo truck shouldn`t crush because of the radioactive material that it carries.
IsTilter= Determines if the unit tilts on slopes.
TechLevel= Determines the minimum tech level required to build the unit.
Sight= Determines the area (in cells) that the unit will view.
Speed= Determines the speed of the unit. It must be a number higher than 0 and lower or equal to 100.
Owner= Determines the house that owns the unit.
Cost= Determines the number of credits that will be spent to buy the unit. A demo truck should be something a bit expensive.
Points= Determines the number of points of the unit. It affects the score of the player in the end of the game.
ROT= The Rate of Turn determines the speed of the turning movement of the unit.
Explosion= This is surely one of the important lines here with the "Primary=". The Explosion= determines the animation that will run when it dies. Since the truck explodes when it dies, you must put the DEMOBOMB animation on it.
Explodes= Determines if the unit explodes killing nearby units when it dies.
VoiceSelect= Determines the sound that will be played when the unit is selected. I`ve put the first one I`ve seen when I made this unit. If you really care for unit sounds, it`s heavily recommended to change all voice settings from this unit.
VoiceMove= Determines the sound that will be played when the unit moves.
VoiceAttack= Determines the sound that will be played when the unit attacks.
VoiceFeedback= Determines the sound that will be played when the unit is being attacked.
MaxDebris= Determines the maximum number of ExplosiveVoxelDebris that are spawned when the unit is destroyed.
DebrisTypes= Determines the type of VoxelDebris that are spawned when the unit is destroyed.
DebrisMaximums= Determines the maximum number of MetallicDebris spawned when the unit is destroyed.
Locomotor= Determines the way the unit moves across the map.
MovementZone= This one is also related to the way the unit moves and how AI will determine its movement.
ThreatPosed= Determines how dangerous this unit is considered by AI. This affects the targets selected by AI units or your units when are not receiving orders from you.
DamageParticleSystems= Determines the particle systems used when the unit is damaged.
AllowedToStartInMultiplayer= Determines if the unit starts or doesn`t start in multiplayer games (Default=yes).
For those who are still reading... tired or not, are heroes. But anyway, now it`s time to make the weapon (this is where this method differs from the conventional one):
In this part it`s very hard to believe that people hadn`t understood anything, but anyway, here is the explanation:
Damage= Number of hit points taken by the weapon.
Anim= Animation that is played when the weapon is used.
ROF= Determines the time that it takes to the unit reload.
Range= Determines the range of the projectile of the weapon, duh!
Projectile= Determines the projectile used by the weapon. (For non english native speakers or people who doesn`t understand a crap of weaponry) Projectile usually stands for the object that is fired by the agressor and hits the victim.
Speed= Speed of the projectile.
Warhead= Setttings that determine the behaviour of the weapon when it hits the victim or the ground or the water, etc...
Note: Since the animation already does damage, I`ve set the damage to the minimum non-negative and non-null value, so Demo Truck will have an agressive instance. The animation acts independent of the unit and kills hte unit because of the unit`s proximity. So, the animation in the weapon dismiss the airburst weapon and the infantry to hold the airburst weapon. The projectile must be an invisible projectile and shouldn`t hit air units because buildings doesn`t fly. Since the explosion must be instantenous, the speed was set to its maximum value (100) and since the truck should get near the building to explode, the range is 1.
And, finally, the warhead code:
Spread=4 ; Determines the range that the warhead affects, although it looks like it's limited to 3x3 cells.
Wood=yes ; Does it affects wood? Sure!
Verses=1000%,65%,100%,15%,0% ; Percentage of armor damages: none/light/wood/heavy/concrete.
Conventional=yes ; Determines if the warhead is big enough to splash in the water. Demo truck will never fall in a water, but it`s big enough to splash...
Rocker=yes ; Determines if the units rock upon impact of the warhead.
InfDeath=2 ; Determines the way infantry dies. 2 is the explsive death, which seems to fit more the situation.
Deform=15% ; Determines the chances of the weapon deform the ground.
DeformThreshhold=2000 ; Damage required to the deformation occour.
Sparky=yes ; Determines if the warhead causes residual flames.
Bright=yes ; The name self-explains!
ProneDamage=2000% ; Damage to the infantry when it is prone.
That`s enough and enjoy it!
In case you need the [TRUK] code at art.ini, here it is:
If you have a better icon for it, replace the cameo value with the name of the file of your icon (without the .shp extension).