Inoculator9's Modding Tutorials
Adding Units Tutorial

HOME

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


Adding Units Tutorial
Inoculator9
Contents:
-Description
-Necessary Files and Programs
-Strings Changes
-Rules Changes
-ArtIni Changes
____________________________________________________________________________________________

1. Description
The Adding Units Tutorial is a dfetailed walk-through of how to add units to Emperer: Battle
For Dune. This tutorial will tell you the necessary programs for adding units, and and a
step-by-step description of adding the units to game.
____________________________________________________________________________________________

2. Necessary Files and Programs
-DuneEx Editor
-E_Output_Text_Pickups (strings)
-Rules (model)
-ArtIni (model
DuneEx is the program that allows you to access the three files listed below it. With it you can easily extract the Rules, ArtIni, and E_Output_Text_Pickups from their rfd files. DuneEx can be downloaded from the Fed2k Dune Editing site, in the Mod Utilities section. After you have installed DuneEx go to your Westwood folder, then into the Emperor folder, and then into the data folder. You will notice that several folders are represented by the Emperor logo, these are the only files you need be concerned about. The E_Output_Text_Pickups are found in the Strings0001, the Rules are found in Model0001, and the ArtIni is also found in Model0001. Enter these two files and extract the three files. Then rename the E_Output_Text_Pickups, E_Output_Text_Pickups.txt, the txt converts it into a text file. You should perform the smae change for the Rules and ArtIni files . The sections below give a description of the edits you need to make to these sections to add a unit.
____________________________________________________________________________________________

3. Strings Changes
All added units to Emperor must be aded here, not in the standard Text Strings file. For the sake of understanding in this section of the tutorial I will us the IXTank as an example for
an added unit.
Step 1 - Enter the E_Output_Text_Pickups.
Step 2 - Scroll down until you find the sections named Object Tips. These are the items
contained in this section:
ObjectTips   
HKADP {Harkonnen Air Defense Platform}  
ATADP {Atreides Air Drone}  
ORADP {Ordos Anti-Aircraft Mine}       
ATTrike {Atreides Sand Bike}        
ATPillbox {Atreides Machine-Gun Post}    
Waypoint {Waypoint}   
Step 3 - Add the IXTank to the list, this is the entry necessary for the unit to register:
IXTank {Ix Tank}
IXTank is what you will label the unit in the Rules and ArtIni, the Ix Tank in parenthesis is what the text will say when you eventually hold the cursor over your new unit.
Step 4 - Make sure you add the units after all the units already in the Object Tips
sections, then save the changes you have made to this file.
Step 5 - Create a folder in the data section of the game called Strings. Then place the E_Output_Text_Pickup in the Strings Folder. This is absolutely necessary.           
____________________________________________________________________________________________

4. Rules Changes
This is were you add the statistics for your new units.
Step 1 - Enter the Rules file.
Step 2 - Declare your new unit, this is necessary for the unit to work, it allows the game to accept your unit as playable, without this the unit will not work. To find the Declaration Section of the Rules scroll down, it is relatively near the top of the Rules. Proceed down through the Declaration Section until you reach this notice:
//*IMPORTANT*New stuff needs added below here so that save games are preserved
Scroll down to the bottom of the Declaration Section, and add the following text:
[UnitTypes]
IXTank
Unit Types is already a subsection there, but don't add your unit below any other subsection then the one you have added.
Step 3 - For the sake of understanding the Ix Tank will use the original statistics of a Harkonnen Assault Tank. The Harkonnen Assault Tank's statistics are below:
[HKAssault]
Score = 4
House = Harkonnen
StormDamage=10 //only damages is never picked up
PrimaryBuilding = HKFactory    //only built in HKFactory
UnitGroup = FromFactory
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
This is what you need the Ix Tank's statistics to be:
[IXTank]
Score = 4
House = Ix
StormDamage=10 //only damages is never picked up
PrimaryBuilding = IXResCentre    //only built in HKFactory
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
To make the unit Ixian all you need to do is change the House, Primary Building, and Unit Group. Other changes can be made, but unexperienced editors only should edit the following ascpects of the units:
House
Primary Building
Unit Group
Health
Armour
Cost
BuildTime
Veterancy Levels
You can also add statistics like these:
Stealthed = TRUE
ShieldHealth = (pick a number)
CanSelfRepair = (pick a number)     
CanSelfRepairShield = (pick a number)    
Step 5 - Copy the statistics you have made and paste it below the Ix units near the bottom of the Rules file.
Step 6 - Create a folder in the data folder, name it Model, place the edited Rules into this folder.
____________________________________________________________________________________________

5. ArtIni Changes
Step 1 - Enter the ArtIni file.
Step 2 - Scroll down through the units of the Atreides, Harkonnen, and Ordos into the section set aside for subhouse units.
Step 3 - Add the following to the Ix's section:
[IXTank]
Step 4 - Find [HKAssault] in the Harkonnen's unit section.
Step 5 - Copy everything below [HKAssault] and paste it below [IXTank]. If follow this instruction correctly the entry should look like this:
[IXTank]
Icon  = "icons\\HK_AsTank.tga" 
IconGrey = "icons\\grey_HK_AsTank.tga" 
Xaf   = "HK_assault"
SideBarType = "Units"
ClipSphere = 60
Don't change any of this unless you have new textures, xbf files, and an icon. If you don't know what atleast one of those is then don't
change any part of the entry. Here is an explanation of what each part of the entry is:
Icon - The button you click to order the unit's construction. "icons\\HK_AsTank.tga" means
that the unit has the same icon as the Harkonnen Assault Tank.
IconGrey - This is how the unit's icon appears during construction. It becomes grey and as the unit is constructed more of the original, colored icon becomes visible.
Xaf - This is what graphics the unit uses. "HK_assault" indicates that the graphics will be that of the Harkonnen Assault Tank.
SideBarType - This specifies wether the unit is an infantry unit, tank, or building. "Units" means that it is a tank.
____________________________________________________________________________________________