Inoculator9's Modding Tutorials
Adding Weapons Tutorial

HOME

TMA-1's Ornithopters
Mod Downloads
Frank Herbert
Mod Descriptions
Adding Units Tutorial
Adding Weapons Tutorial
Special Abilities Editing Tutorial


Weapons Addition and Editing Tutorial
Inoculator9
Contents:
1. Description
2. Rules Entries and Editing
 - Weapons Editing
 - Weapons Additions
 - Damage Percentages
3. ArtIni Entries and Editing
 - Added Weapons Graphic Assignment
4. Text String Entries and Editing
5. E_Output_Text_Pickups Entries and Editing
6. Units Incapable of Accomodating Weapons
____________________________________________________________________________________________
1. Description:
I have written this tutorial as a counterpart to my Adding Units Tutorial. This tutorial gives you a detailed description of how to edit the units you have added, and how to edit and add weapons. With this you can add totally new weapons to emperor without having to deal
with the removal or replacement of other weapons. This also provides a list of basic units that can't have weapons added or edited.
____________________________________________________________________________________________
2. Rules Entries and Editing:
1. For the sake of consistency the original Ix Tank from the Adding Units Tutorial will be the subject unit for this section of the tutorial.
[IXTank]
Score = 4
House = Ix
StormDamage=10 //only damages is never picked up
PrimaryBuilding = IXResCentre    //only built in IXResCentre
UnitGroup = FromIXResCentre
Terrain = Rock, Sand, NBRock, Ramp
Cost = 900
BuildTime = 492
Size = 2
Speed = 5.0     //was 6.0   //game coord per update
TurnRate = 0.175     //radians per update
TurretAttach = HKAssaultTankBase
Armour = Heavy
Health = 2400// 2000
//SoundSelected = Selected
//SoundOrdered = Ordered
//SoundID = 11
ExplosionType = Explosion
ViewRange = 4,8,InfRock
Debris = DebrisLarge
AiTank = TRUE
TechLevel = 3
Starportable = TRUE    //order from starport (if hk)
ReinforcementValue = 6
Crushes = TRUE
TastyToWorms = TRUE
DamageEffect = MediumDamageFX
ChaosEffect = MediumChaosFX
HawkEffect = MediumHawkFX
WormAttraction = 7
GetsHeightAdvantage = FALSE
//CanBeRepaired = FALSE
AIThreat = 70

// LEVEL 1 ----------------------------------
VeterancyLevel = 10 // Score required
ExtraDamage = 25
// LEVEL 2 ----------------------------------
VeterancyLevel = 24
CanSelfRepair = 1  // Should have 0.5?
// LEVEL 3 ----------------------------------
VeterancyLevel = 48
ExtraDamage = 50  // 50% more damage - applied to all weapons
ExtraArmour = 50  // Takes 50% less damage
2. To reiterate from the Adding Units Tutorial you must change the following sections of the Ix Tank entry, to the revised sections preceding them:
Original:
[HKAssault]
PrimaryBuilding = HKFactory
UnitGroup = FromHKFactory
House = Harkonnen
Revised:
[IXTank]
PrimaryBuilding = IXResCentre
UnitGroup = FromIXResCentre
House = Ix
-Weapons Editing:
1. To change the Ix Tank's weapon, you scroll to the entry that says:
TurretAttach = HKAssaultTankBase
2. For our example the Ix Tank's original weapon will be replaced with a plasma weapon. To do this it is necessary to change: TurretAttach = HKAssaultTankBase, to the following:
Turret Attach = HKDevestatorGun
This will give the Ix Tank a plasma weapon similar to the Harkonnen Devestator's. Despite the Devestator being able to fire a pair of plasma bursts, the HKDevestator Gun will work correctly with only one shot being fired.
3. Any unit can be given a different weapon except for units that didn't start out with a weapon xbf to begin with. This means, that if a unit's entry in the Rules file has no TurretAttach, it has no weapon.
-Weapons Additions
1. First of all, declare your new weapon. This weapon will be for the Ix Tank and it will be a plasma weapon. Scroll down to the declaration section of the Rules file, at it's bottom you will find the section marked for added weapons, units, and buildings. The new weapon entry will be like the following:
[TurretTypes]
IXTankGun
2. The easiest way to add a weapon is to first add the turret attributes. This will be the entry in the Turret Attributes section of the Rules file:
[IXTankGun]
TurretMuzzleFlash  = Muzzle2
Bullet = IXTank_B
ReloadCount = 60
3. This is a list that describes the parts of the preceeding entry:
-TurretMuzzleFlash - This represents the graphics used to show the flash on the tank's turret after the plasma burst has been fired. This can be replaced with a muzzle from nearly any other weapon with successful results.
-Bullet - This represents what kind of weapon the gun IXTankGun is, the bullet attributes are added slightly later.
-ReloadCount - This represents how rapidly the IXTankGun can fire.
4. If you choose to you can edit the TurretMuzzleFlash, for our example we will give the IXTankGun a muzzle with significantly noticable differences. The new bullet entry will be identical to the following entry:
[IXTankGun]
TurretMuzzleFlash  = IXPlasmaFlash
Bullet = IXTank_B
ReloadCount = 60
The IXPlasmaFlash is the muzzle used by the Ixian Megacannon, and is significantly more noticable then nearly all other TurretMuzzleFlash types you could choose.
5. The second part of adding a weapon is adding the bullet attributes to the Bullet Attributes section of the rules file. The entry you will place there will be identical to the following entry:
[IXTank_B]
MaxRange = 9
Speed = 20//10.0
ExplosionType = ShellHit
Debris = DebrisSmall
Damage = 813
Warhead = DevPlasma_W
ExplosionType = DevImpact
BlowUp = TRUE  //infantry death anim
FriendlyDamageAmount = 50
6. Here is a list of the entries sections and explanation for each of them:
-MaxRange - This represents how far the weapon's projectile can travel.
-Speed - This represents how fast the weapon's projectile travels.
-ExplosionType - This represents the graphics used to show the weapons impact on an enemy unit or terrain.
-Debris - This represents how much debris results from the detonation of the weapon's projectile.
-Damage - This represents how much damage the weapon causes to enemy units. This however does not represent a universal amount damage performed upon every enemy unit. This number is divided into percentages, each percentage representing the amount of damage performed on each type of unit armor. The DevPlasma_W entry would need to be edited to alter the percentages.
-Warhead - This represents the weapons assignment of damage percentages described during the Damage explanation.
-ExplosionType - This second ExplosionType entry is unique to the devestator's weapon and should not be edited.
-BlowUp - This represents how the weapon reacts upon impact.
-FriendlyDamageAmount - This represents the percentage of the weapon's damage that is suffered by allied units in close proximity to the projectile impact point.
7. Declare the IXTank_B in the new weapons, units, and buildings section of the declaration section. Add the following entry:
[BulletTypes]
IXTank_B
8. Last of all, scroll down to the Ix Tank's attributes. Here replace the original turret:
TurretAttach = HKAssaultTankBase
To the following:
TurretAttach = IXTankGun
-Damage Percentages
1. Scroll down into the Warhead Attributes section of the Rules file.
2. For our example we will be edited the DevPlasma_W entry, which should be identical to the following:
[DevPlasma_W]
None = 40
Earplugs = 40
BPV = 25
Light = 60
Medium = 100
Heavy = 100
Concrete = 100
Walls = 100
Building = 75
CY = 40
Harvester = 100
Invulnerable = 0
Aircraft = 60
3. This is a list of explanations for each section of the DevPlasma_W entry:
-None - This armor type is used mainly be infantry.
-Earplugs - This armor type is used by infantry and is resistant to sonic weapons.
-BPV - This armor type is used by several heavy infantry types.
-Light - Used by the smallest and weakest vehicle units.
-Medium - Used by medium range vehicle units.
-Heavy - Used by most large vehicle units.
-CY - This armor type is the heaviest armor type used by units and is used only by a few.
-Harvester - This armor type is used by Harvesters.
-Invulnerable - This armor type makes units totally invulnerable to all weapons types.
-Aircraft - This armor type is used by aircraft.
4. To alter the amount of damage the weapons that use the DevPlasma_W you simply raise or lower the percentages assigned to each armor type.
5. The DevPlasma_W warhead uses 813 as a base damage count. Each percentage is a percentage of 813,so assigning an armor type 100 means that that unit suffers 100% of 813 damage count when hit by a weapon using the DevPlasma_W warhead. Giving an armor type 50 means it suffers 50% of the 813 damage count, about 406.
____________________________________________________________________________________________
3. ArtIni Entries and Editing:
1. Near the bottom of the ArtIni file are the weapons entry sections. You need to scroll down to the Bullet Section, this is the only section you need to look at.
-Added Weapons Graphic Assignment
1. You should add an entry for your new bullet at the bottom of the ArtIni file. The entry should be identical to the following:
[IXTank_B]
Xaf = "devplasma.xaf"
________________________________________________________________________________________
4. Text String Entries and Editing:
1. Here you can edit the names of most of the units in emperor. This is one of the entries from the Text Strings:
ATSniper {Atreides Sniper}
The abbreviated section represents the entry in the Rules file, you should not edit this. The second part of the entry in parenthesis represents the unit's name as it appears in the game. You can change this to what ever you want.
____________________________________________________________________________________________
5. E_Output_Text_Pickups Entries and Editing
1. Editing this file is very similar to editing the Text Strings, but here you can edit the names of houses, several units, and text messages.
2. House names entries appear like this:
Sardaukar {Imperial Sardaukar}  
Fremen {Fremen}  
Ix {House Ix}  
Tleilaxu {House Tleilaxu}  
Guild {Guild of Navigators}  
None {No Subhouse}  
[END] 
These sections are the same as the unit entries, so you only edit the writing in parenthesis.
3. Text Messages appear similary to the exit message at the bottom of the file, this is it's entry:
ExitQuestion {Do you really want to exit?} 
Again, you only edit the text in parenthesis
____________________________________________________________________________________________
6. Units Incapable of Accomodating Weapons
These are the units that come originally with emperor: battle for dune. Though there are other units that can have weapons added, they are not part of the original gameplay:
-Atreides Scout
-Ordos Scout
-Harkonnen Scout
-Atreides Enginner
-Ordos Engineer
-Ordos Saboteur
-Ordos Eye-in-the-Sky
-Harvester
-Carryall
-Advanced Carryall
-Ix Infiltrator
Should you require a list of the other units that are capable of being unlocked that cannot accomodate weapons, email me requesting one and I will provide it.
____________________________________________________________________________________________