Set a few years before the events of Episode IV A New Hope, Empire at War lets players rewrite history as well as experience the aftermath of Star Wars: Episode III Revenge of the Sith, the creation of the Rebel Alliance, and Darth Vader's rise to power.

Report article RSS Feed Beginners Tutorial for Modding Empire at War: Forces of Corruption

This is a beginners tutorial on how to start a mod for Empire at War: Forces of Corruption (EAW:FOC)

Posted by lord_X on Sep 10th, 2010
Basic Starting a mod.

Beginners Tutorial for FOC Mod
Tutorial for beginners on how to start a FOC mod (CAN BE USED TO MOD FOR FOC AND BIT FOR AN EAW MOD)
Mod tutorial for Star Wars: Empire at War / Force of Corruption
(be warned this is a long tutorial)

Chapters
I: Getting started
II: Extracting files
III: Starting the mod building file structure
IV: Time to get some basic files
V: Lets get a model
VI: Looking at the model and starting the coding
VII: Starting the coding Hard points
VIII: Making the game see the new Hard Point xml
IX: Making the break off props for the hard points
X: Time to code the unit
XI: Implementing new unit in game
XII: Dat file & mtd file
XIII: Multi player setup
XIV: AI set Up
XV: Create your short cut an clean up the unwanted file
XVI: Credits

I: Getting started
First go to all this sites and down load the requited items form them there the tools you’ll need.

First site
Empireatwar.filefront.com
from this site you'll need
eaw and/or foc map editor depends on what game you have
foc xml or eaw xml (don't need eaw if you down load foc's)
smg xml editor

second site
Modtools.petrolution.net
from this site you'll need
alo viewer
mtd editor
string editor (this is what will alow you to change unit def and names)
lua tools

Third site (new link)
Filefront.com
from this site you'll need
EAWExtractor

install all the tools if you have not yet but leave the xmls files compiled and put them in a safe place (there only if you miss up an original xml by forgetting to copy it 'done it a few times')

II: Extracting files
now that that is done we need to extract all of the textures, models and maps to do that start up the eaw extractor tell it to extract these three file models, textures, and maps 'this will give you the models, textures, & maps of eaw only' (might take some time depending on your pc).
(ONLY IF YOU HAVE FOC)
when there done if you have FOC we need to extract them to do that click file/ open then click the one level up button 2 times this should bring you to your Lucas arts file then open you Star Wars Empire at War Forces of Corruption/data and select the textures, model, or maps meg and extract then, do the same for the other meg files needed.

Now you should have all the textures, models, maps, and xmls in the game

III: Starting the mod building
Now in the mod file of your game make new file and call it what ever you want (this will be you mod I’ll refer to it as your_mod from now on) in that file make a file called DATA then open it in this file make the following 4-5 files ART, XML, TEXT, SCIPTS, and AUDIO if you're going to add any custom sounds in

Now open the ART folder and make these 2 files MODELS, & TEXTURES

Go back in open SCIPTS folder and make the a folder called AI then open it and make 2 more folders called LandMode and SpaceMode

Now you have the skeleton file structure used in all mods for FOC

IV: Time to get some basic files
Now to populate some basic items in every mod

Your going to need to make a copy of the MasterTextFile_ENGLISH file it is found (STARTING OFF IN THE LUCAS ARTS FILE)

(EAW version) open Star Wars Empire at War/GameData/data/Text you should it there now
(FOC version) open Star Wars Empire at War Forces of Corruption/data/Text you should it there now

So make a copy of MasterTextFile_ENGLISH in put it in you TEXT file in your_mod (MasterTextFile_ENGLISH* contains all the text line for the game ie unit name, description and so on) *if yours is a different languish use that Master Text File (I will refer to it as the “MasterTextFile” from here on out)

Now we will need a copy of the GameObjectFiles.xml it is located in the mod/Source/data/xml (Source is put in the mod file by the map editor) just look through the xml files till you find the file or press "G" on your keyboard to take you to the files starting with "G" now make copy of that xml and put it in your_mod’s xml file

now you need the Mt_commandbar files (contains all your icons) so go back to the Source file in the mod file and follow this path to get to it Source/data/textures now that you in textures look for both of these file Mt_commandbar.MTD and Mt_commandbar.tga and make copies of both this file in put them in your_mod’s texture file

Now that’s the basic files need in all mod’s for FOC

V: Lets get a model
Now let down load Keeper_of_faith's MC40 model it a good place to start to start as it has hard points to show you a way to code them (to get this model go to the site below)
Empireatwar.filefront.com

Or if you chose not to down load that fine then just read ahead

Keeper_of_faith's MC40 model contains the following file
rv_moncal_mc40.ALO - the model itself
rv_moncal_mc40_d.ALO - deathclone model
rv_moncal_mc40_d_Die_00.ala - death animation
rv_moncal_mc40_HP_F-C.ALO - hardpoint weaponbay bow
rv_moncal_mc40_HP_M-L.ALO - hardpoint weaponbay midship port side
rv_moncal_mc40_HP_M-R.ALO - hardpoint weaponbay midship starbord side
rv_moncal_mc40_HP_B-C.ALO - hardpoint weaponbay stern
rv_moncal_mc40_HP_E.ALO - hardpoint engine glow
rv_moncal_mc40.dds - ship texture file 512x512 MIP Map
rv_moncal_mc40_bm.dds - ship bump map 512x512 MIP Map
w_invisible.dds - invisible texture file 64x64 MIP Map
screen1.jpg
screen2.jpg
screen3.jpg
screen4.jpg
I_BUTTON_CALAMARI_LIGHT_CRUISER.TGA - TGA button file with alpha map
readme.txt - Keeper_of_faith's read me file for MC40 model

If you download, make, or are given any units to use this is where the different file types go
alo files go in the models file
ala files go in the models file
dds files go in the textures file
tga files go in to the textures file

so put the file in the right folder folders should leave you with the 4 jpg file that you can delete or keep and the read me file witch you can keep or delete or keep (I usually hold on to then just in side my data file so when I go to type up my read me file I know where what came form to make sure they get there credit

NOTE: When ever you use another person units make sure you credited them in a your readme never use another’s work WITH OUT ASKING THERE OK in less it say its ok in there read me file to use there work just give them credit in your read me file, you can still let them know that your using it if you like.

VI: Looking at the model
Now that we have the files in the there folders let go in to the models folder in open the rv_moncal_mc40.ALO model to see what hard points there are and where they are (this model has break away hard point to it keep in mind not all models do) to open the open this model require the ALO view that you downloaded and should have installed (if not do that now).

The first time you open an ALO file you more in likely need to select the program to do that so find and select Alamo Object viewer (ALO view). Now that your PC know that ALO file open with that program you should never have to do that again.

Now once the viewer is open check the box that has “Show bones” next to it (this will show you all the bones
Now you can check the box that has show bone names, you’ll notice that all the bone (aka hard points) have there name above them. To get a better idea what bone there are you can select the model option in the upper left side of the screen, and select model details and this with give you a list of all the models bones (note not all should be coded as hard points)

How since Keeper_of_faith's MC40 has break away hard point you might want to look at the bone hierarchy, so select this tab now you see the bone HP_F-C_Bone this bone goes to the break off model of rv_moncal_mc40_HP_F-C.alo. (You can open that model to see what it looks like)
Now if you did open the model and follow the steps I gave you for rv_moncal_mc40.ALO model you will notice it has all the same Hard points as the main models.

VII: Starting the coding Hard points
Now to make the hard point for the rv_moncal_mc40_HP_F-C.alo this will require 2-3 (3 if you code like I do) more xml files they are HardPoints.xml, SpaceProps.xml, and I use the HardPointDataFiles.xml

How I do is I make a copy of the HardPoints.xml and rename to a new name (I’ll use HardPoints_TUTORIAL.xml and refer to it as that in this tutorial) (I use xmlpad so this might be different form smg xml editor I this tutorial I’ll use xmlpad you can down load it if you want from the following site so you can follow the tutorial to the T (its free as also)
Download.com
Now open the use HardPoints_*.xml xml up (* refers to what name you gave it) and remove every thing but the following info till it look kind of like this

code:
<?xml version="1.0"?><br>< HardPoints ><br><br><br><br><br><!-- ============================================= ============================================= --><br><!-- ============================================= END SPACE, BEGIN LAND ============================================= --><br><!-- ============================================= ============================================= --><br><br><br><br><br></HardPoints>

Now change to (replace the word TUTORIAL with what ever you used) you now should get error mess at the bottom so rename to now the error should disappear. Now save what you have done. And close there should be a file called ~HardPoints_TUTORIAL.xml this a back up just before your last save (you can delete it now or later when all the editing to the file is done)

Now to make some hard points (only going to walk you through a few types of the hard points) now in your_mod’s XML file should have this 5 files now HardPoints.xml, HardPoints_TUTORIAL.xml, GameObjectFiles.xml, HardPointDataFiles.xml, and SpaceProps.xml. you need to open the following 2 file in this order HardPoints_TUTORIAL.xml and HardPoints.xml , both file should be open in the same xmlpad HardPoints_TUTORIAL.xml should be the left tab and HardPoints.xml should be the right tab as while as the one that is selected

Now scroll down the HardPoints.xml till you find the following set of hard points (HP_Corellian_Corvette_01 to HP_Corellian_Corvette_07) now highlight them all and copy them to HardPoints_TUTORIAL.xml and save HardPoints_TUTORIAL.xml

Now to edit them for the MC-40 at the top of the list of hard points in the file save HardPoints_TUTORIAL.xml and this line

code:
<!-- Rebel MC-40 hard points --> the <!-- --> tell the game to ignore ever thing in between the <!-- and --> so we will use them for tag notes for referencing.

Next rename all the HP_Corellian_Corvette parts to HP_mc40 and save work.

Now we are only going to use 6 hardpoints as follows on the MC 40 (it does a have a few more but I’ll not us them in this tutorial) (I’ll only going to cover one on of the weapons hard points)
HP_E_Bone (engine hardpiont)
Spawn_00 (hanger bay)
HP_F-C_Bone (front center weapon)
HP_B-C_Bone (back center weapon)
HP_M-R_Bone (middle right weapon)
HP_M-L_Bone (middle left weapon)

We can delete or use around HP_mc40_07 & HP_mc40_08 to make it non readable I’ll use the

Now lets start with the HP_E_Bone this is your engine hard point for the model will re name HP_mc40_01 to HP_mc40_engeine to note that it the engine, now since it not a weapon delete the fire strings they are

code:
<Fire_Bone_A>MuzzleA_00</Fire_Bone_A><br><Fire_Bone_B>MuzzleA_00</Fire_Bone_B><br><Fire_Cone_Width>90.0</Fire_Cone_Width><br><Fire_Cone_Height>90.0</Fire_Cone_Height><br><Fire_Projectile_Type>Proj_Ship_Medium_Laser_Canno n_Red</Fire_Projectile_Type><br><Fire_Min_Recharge_Seconds>2.0</Fire_Min_Recharge_Seconds><br><Fire_Max_Recharge_Seconds>3.0</Fire_Max_Recharge_Seconds><br><Fire_Pulse_Count>5</Fire_Pulse_Count><br><Fire_Pulse_Delay_Seconds>0.2</Fire_Pulse_Delay_Seconds><br><Fire_Range_Distance>800.0</Fire_Range_Distance><br><Fire_SFXEvent>Unit_Rebel_Ship_Laser_Fire</Fire_SFXEvent><br><Fire_Inaccuracy_Distance> Fighter, 6.0 </Fire_Inaccuracy_Distance><br><Fire_Inaccuracy_Distance> Bomber, 5.5 </Fire_Inaccuracy_Distance><br><Fire_Inaccuracy_Distance> Transport, 1.0 </Fire_Inaccuracy_Distance><br><Fire_Inaccuracy_Distance> Corvette, 12.0 </Fire_Inaccuracy_Distance><br><Fire_Inaccuracy_Distance> Frigate, 70.0 </Fire_Inaccuracy_Distance><br><Fire_Inaccuracy_Distance> Capital, 30.0 </Fire_Inaccuracy_Distance><br><Fire_Inaccuracy_Distance> Super, 30.0 </Fire_Inaccuracy_Distance><br><Allow_Opportunity_Fire_When_Targeting>False</Allow_Opportunity_Fire_When_Targeting><br>And<br><Damage_Type>Damage_Corellian_Corvette</Damage_Type>

Change the type to HARD_POINT_ENGINE and add this line under it

code:
<Tooltip_Text>TEXT_ENGINE_HARDPOINT</Tooltip_Text>

Now for the target-able and destroyable they are what they sound like the make a hard point target-able and destroyable no mean there not and yes means they are I’m making the both yes.
Now add this line under the target-able and destroyable line

code:
<Health>500.0</Health> (health is how much damage it take to destroy the hard point

Now skip a line and add this next two line

code:
<Death_Explosion_Particles> Large_Explosion_Space </Death_Explosion_Particles> <!-- this is the type of explosion that will happen when the hard point is destroyed --><br><Death_Explosion_SFXEvent>Unit_Hardpoint_Engines_D eath</Death_Explosion_SFXEvent> <!-- this is an event that occurs when the hard point is destroyed -->

Skip another line and now add this line to attack the model for the engine

code:
<Model_To_Attach> rv_moncal_mc40_HP_E.alo</Model_To_Attach>

These next 2 lines put the attacked model where it belongs

code:
<Attachment_Bone>HP_E_Bone</Attachment_Bone> <!-- this is where the model will be attached at --><br><Collision_Mesh>HP_E_Bone</Collision_Mesh> <!-- this is the collision mesh for the attached model -->

Now for the last two lines

code:
<Damage_Particles>HP_E_EMITDAMAGE</Damage_Particles> <!-- this is damage particles location when the hard point is destroyed --><br><Engine_Particles>HP_E_MAINENGINES</Engine_Particles> <!-- this is the type of particles emitted when the hard point is destroyed -->

Your hard point should look like this

code:
<HardPoint Name="HP_mc40_engeine"><br><Type> HARD_POINT_ENGINE </Type><br><Tooltip_Text>TEXT_ENGINE_HARDPOINT</Tooltip_Text><br><Is_Targetable>Yes</Is_Targetable><br><Is_Destroyable>Yes</Is_Destroyable><br><Health>500.0</Health><br><br><Death_Explosion_Particles> Large_Explosion_Space </Death_Explosion_Particles> <!-- this is the type of explosion that will happen when the hard point is destroyed --><br><Death_Explosion_SFXEvent>Unit_Hardpoint_Engines_D eath</Death_Explosion_SFXEvent> <!-- this is an event that occurs when the hard point is destroyed --><br><br><Model_To_Attach> rv_moncal_mc40_HP_E.alo</Model_To_Attach><br><Attachment_Bone>HP_E_Bone</Attachment_Bone> <!-- this is where the model will be attached at --><br><Collision_Mesh>HP_E_Bone</Collision_Mesh> <!-- this is the collision mesh for the attached model --><br><Damage_Particles>HP_E_EMITDAMAGE</Damage_Particles><br><Engine_Particles>HP_E_MAINENGINES</Engine_Particles><br></HardPoint>

Now to do the hanger bay remove all the same files as before for the engine
Lets rename HP_mc40_02 to HP_mc40_fighterbay
This time change the type to HARD_POINT_FIGHTER_BAY and add this line under type

code:
<Tooltip_Text> TEXT_FIGHTER_BAY_HARDPOINT </Tooltip_Text>

Change the target-able and destroyable to yes
Then add the health line under line
Skip a line and add this lines

code:
<Death_Explosion_Particles> Large_Explosion_Space </Death_Explosion_Particles><br><Death_Explosion_SFXEvent>Unit_Hardpoint_Bay_Death </Death_Explosion_SFXEvent>

Skip another line and add these lines

code:
<Attachment_Bone>SPAWN_00</Attachment_Bone><br><Collision_Mesh>SPAWN_00</Collision_Mesh>

And the hanger bay is done and should look like this

code:
<HardPoint Name="HP_mc40_fighterbay"><br><Type> to HARD_POINT_FIGHTER_BAY </Type><br><Tooltip_Text> TEXT_FIGHTER_BAY_HARDPOINT </Tooltip_Text><br><Is_Targetable>yes</Is_Targetable><br><Is_Destroyable>yes</Is_Destroyable><br><Health>500.0</Health><br><br><Death_Explosion_Particles> Large_Explosion_Space </Death_Explosion_Particles><br><Death_Explosion_SFXEvent>Unit_Hardpoint_Bay_Death </Death_Explosion_SFXEvent><br><br><Attachment_Bone>SPAWN_00</Attachment_Bone><br><Collision_Mesh>SPAWN_00</Collision_Mesh><br></HardPoint>

Now on to the front weapons hard point (this is the only weapon I’ll code in this tutorial)
Let’s rename this one HP_mc40_fc (fc for front center)
Leave the type the way it is just add this line under it
 

code:
<Tooltip_Text>TEXT_WEAPON_LASERCANNON</Tooltip_Text>

Change the targetable and destroyable to yes and add the health line again.
Skip a line then add the following lines

code:
<Model_To_Attach> rv_moncal_mc40_HP_F-C.alo</Model_To_Attach><br><Attachment_Bone>HP_F-C_Bone</Attachment_Bone><br><Collision_Mesh>HP_F-C_Bone</Collision_Mesh><br><Damage_Decal>HP_F-C_blast</Damage_Decal><br><Damage_Particles>HP_F-C_EmitDamage</Damage_Particles>

This time we will change the Damage_Type to Damage_Star_Destroyer
The fire bone get changed to

code:
<Fire_Bone_A> FP_F-C_00</Fire_Bone_A><br><Fire_Bone_B> FP_F-C_01</Fire_Bone_B>

Will leave the rest for now till the unit is tested in the mod (then you can change the info your self
Now at the bottom before the we will add these two line

code:
<!-- this is the break off prop that falls off the model when the hard point is destroyed --><br><Death_Breakoff_Prop> Hardpoint_Breakoff_mc40_fc </Death_Breakoff_Prop>

Ok this hard point should look like this

code:
<HardPoint Name="HP_mc40_fc"><br><Type> HARD_POINT_WEAPON_LASER </Type><br><Tooltip_Text>TEXT_WEAPON_LASERCANNON</Tooltip_Text><br><Is_Targetable>yes</Is_Targetable><br><Is_Destroyable>yes</Is_Destroyable><br><Health>500.0</Health><br><br><Model_To_Attach> rv_moncal_mc40_HP_F-C.alo</Model_To_Attach><br><Attachment_Bone>HP_F-C_Bone</Attachment_Bone><br><Collision_Mesh>HP_F-C_Bone</Collision_Mesh><br><Damage_Decal>HP_F-C_blast</Damage_Decal><br><Damage_Particles>HP_F-C_EmitDamage</Damage_Particles><br><br><Damage_Type> Damage_Star_Destroyer </Damage_Type><br><Fire_Bone_A>FP_F-C_00</Fire_Bone_A><br><Fire_Bone_B>FP_F-C_01</Fire_Bone_B><br><Fire_Cone_Width>90.0</Fire_Cone_Width><br><Fire_Cone_Height>90.0</Fire_Cone_Height><br><Fire_Projectile_Type>Proj_Ship_Medium_Laser_Canno n_Red</Fire_Projectile_Type><br><Fire_Min_Recharge_Seconds>2.0</Fire_Min_Recharge_Seconds><br><Fire_Max_Recharge_Seconds>3.0</Fire_Max_Recharge_Seconds><br><Fire_Pulse_Count>5</Fire_Pulse_Count><br><Fire_Pulse_Delay_Seconds>0.2</Fire_Pulse_Delay_Seconds><br><Fire_Range_Distance>800.0</Fire_Range_Distance><br><Fire_SFXEvent>Unit_Rebel_Ship_Laser_Fire</Fire_SFXEvent><br><br><Fire_Inaccuracy_Distance> Fighter, 6.0 </Fire_Inaccuracy_Distance><br><Fire_Inaccuracy_Distance> Bomber, 5.5 </Fire_Inaccuracy_Distance><br><Fire_Inaccuracy_Distance> Transport, 1.0 </Fire_Inaccuracy_Distance><br><Fire_Inaccuracy_Distance> Corvette, 12.0 </Fire_Inaccuracy_Distance><br><Fire_Inaccuracy_Distance> Frigate, 70.0 </Fire_Inaccuracy_Distance><br><Fire_Inaccuracy_Distance> Capital, 30.0 </Fire_Inaccuracy_Distance><br><Fire_Inaccuracy_Distance> Super, 30.0 </Fire_Inaccuracy_Distance><br><br><Allow_Opportunity_Fire_When_Targeting>False</Allow_Opportunity_Fire_When_Targeting><br><br><!-- this is the break off prop that falls off the model when the hard point is destroyed --><br><Death_Breakoff_Prop> Hardpoint_Breakoff_mc40_fc </Death_Breakoff_Prop><br></HardPoint>

Now that was the last hard point I’m going to show you how to code. You can use the copy of the HardPoints.xml reference the other types of weapons hardpionts and how to code a shield hardpoints and special ability hard points. So lets save and close HardPoints_TUTORIAL.xml.

This site has a good tutorial on how to edited an existing XMLs as while if you still need help
Forums.filefront.com - **not sure if a good link any more - X**

VIII: Making the game see the new Hard Point xml
Now I will show you how to let the game read though hard points now open up HardPointDataFiles.xml and add this line in under HardPoints_Underworld.xml
HardPoints_TUTORIAL.xml
If you used a different name change to the name you gave it.

Now this file should look like this

code:
<?xml version="1.0" ?><br><br><Hard_Point_Files><br><File>HardPoints.xml</File><br><File>CIN_HardPoints.xml</File><br><File>HardPoints_Underworld.xml</File><br><File>HardPoints_TUTORIAL.xml</File><br></Hard_Point_Files>

Save and close you’re done with this part.

IX: Making the break off props for the hard points
Now to make the break off props for the hard points (only going to show how to make one you should pick up on how to make the from that)

Ok lets open op the SpaceProps.xml and scroll to the bottom of the xml and this info in

code:
<!-- ================================================== ============================================== --><br><!-- New Break-off pieces from destroyed hard points, there are referenced in HardPoints_TUTORIAL.xml --><br><!-- ================================================== ============================================== --><br><br><!-- ================================================== ============================================== --><br><!-- New Break-off pieces from destroyed hard points, there are referenced in HardPoints_TUTORIAL.xml --><br><!-- ================================================== ============================================== --><br><br>The bottom should now look close too like this<br><!-- ================================================== ===================================== --><br><!-- End Break-off pieces from destroyed hard points, there are referenced in HardPoints.xml --><br><!-- ================================================== ===================================== --><br><br><!-- ================================================== ============================================== --><br><!-- New Break-off pieces from destroyed hard points, there are referenced in HardPoints_TUTORIAL.xml --><br><!-- ================================================== ============================================== --><br><br><!-- ================================================== ============================================== --><br><!-- End Break-off pieces from destroyed hard points, there are referenced in HardPoints_TUTORIAL.xml --><br><!-- ================================================== ============================================== --><br><br>Add this in between the new and end of the break off we put in look above to see what I’m talking about<br><!-- MC 40 Break-off props --><br><SpaceProp Name="Hardpoint_Breakoff_mc40_fc"><br><Text_ID /><br><!-- model to use --><br><Space_Model_Name> rv_moncal_mc40_HP_F-C.alo </Space_Model_Name><br><Is_Decoration> No </Is_Decoration><br><Is_Discardable> No </Is_Discardable><br><!-- scale need to be the same size a the ship to look correct --><br><Scale_Factor> 1.0 </Scale_Factor><br><Sort_Order_Adjust> -1 </Sort_Order_Adjust><br><Tactical_Health> 100 </Tactical_Health><br><br><SpaceBehavior> DEBRIS </SpaceBehavior><br><!-- the direction in which the prop moves --><br><Debris_Movement_Vector> -0.2, 0.0, -0.5 </Debris_Movement_Vector><br><Debris_Facing_Rotate_Vector> 0.9, 0.4, 0.3 </Debris_Facing_Rotate_Vector><br><!-- debris life span (how long it on screen) --><br><Debris_Min_Lifetime_Seconds> 15.0 </Debris_Min_Lifetime_Seconds><br><Debris_Max_Lifetime_Seconds> 25.0 </Debris_Max_Lifetime_Seconds><br><!-- particles to us in the prob --><br><Debris_Attached_Particle> Space_Debris_Fire_Large </Debris_Attached_Particle><br><br><!-- Type of explosion to use --><br><Death_Explosions> Large_Explosion_Space </Death_Explosions><br><!-- alway use this for Break-off props ship models --><br><Death_SFXEvent_Start_Die> Unit_Corvette_Death_SFX </Death_SFXEvent_Start_Die><br><!-- you want yes on so the map does not get filed up will deris form ships --><br><Remove_Upon_Death>true</Remove_Upon_Death><br></SpaceProp>

All the info in the but the very top line are what the code line under it do for reference propose for the tutorial.

How go ahead and code the other there weapon break offs

X: Time to code the unit
To so this we need a copy of the following units xml Units_Space_Rebel_MC30_Frigate.xml (for eaw you need this file SpaceUnitsFrigates.xml)
Ok lets start by renaming Units_Space_Rebel_MC30_Frigate to Units_Space_Rebel_MC40 now open the file and change this line

code:
<MC30_Frigate_Data>

to this line

code:
<MC40_Frigate_Data>

(you should get a mismatch error so change the this line to

code:
</MC30_Frigate_Data>

to this line

code:
</MC40_Frigate_Data>

error resolved now save but leave the xml open.

(You will need some thing to right or type info for the part so open notepad or any other text program and save it as dat_info into the text file will explain in chapter, so we can just copy and paste)
Now lets change the name of the unit to new unit name let make it MC40_Frigate so change the name in the space unit name to that.
Ok know change the text to a new one change it to TEXT_UNIT_MC40_FRIGATE (put this name in the document that I said to open)
Change the encyclopedia text to TEXT_TOOLTIP_MC40_FRIGATE (put this name in the document that I said to open)
Change the icon Name to I_BUTTON_CALAMARI_LIGHT_CRUISER.tga
Change the space model name to the model for the MC40 rv_moncal_mc40.ALO (you might want to save this now)
Change Scale Factor to 1.0
Remover the line Alliance_Assault_Frigate.txt
Change the autoresolve Health to 4000 and the tactical health to 1000
Set Build_Initially_Locked to No and put around Build_Can_Be_Unlocked_By_Slicer and Slice_Cost
Change this line Damage_Normal, MC30_Frigate_Death_Clone to
Damage_Normal, MC40_Frigate_Death_Clone
Now change the hard points to the following
HP_mc40_engeine,
HP_mc40_fighterbay,
HP_mc40_fc,
HP_mc40_bc,
HP_mc40_mr,
HP_mc40_ml
The last 3 you should of finish on you own (including there break off space props)
Now change the Tactical Build Cost Multiplayer to 4500 and change Tactical Build Time Seconds to 35
Remove this line completely ObjectScript_MC30
Remove this data

code:
<Unit_Ability><br><Type>CLUSTER_BOMB</Type><br><Recharge_Seconds>50.0</Recharge_Seconds><br><GUI_Activated_Ability_Name> MC30_Cluster_Bomb </GUI_Activated_Ability_Name> <!-- GUI Command Bar support --><br><Effective_Radius> 500.0 </Effective_Radius><br><SFXEvent_GUI_Unit_Ability_Activated>Unit_Cluster_ Bombs_MC30_Frigate</SFXEvent_GUI_Unit_Ability_Activated><br><Supports_Autofire>True</Supports_Autofire><br></Unit_Ability>

And this data

code:
<Cluster_Bomb_Ability Name="MC30_Cluster_Bomb"><br><Activation_Style> User_Input </Activation_Style><br><Detonation_Time_In_Secs> 1.5 </Detonation_Time_In_Secs><br><Bomb_Type>Proj_Cluster_Bomb</Bomb_Type><br><Number_Of_Bombs> 12 </Number_Of_Bombs><br><SFXEvent_Activate>Unit_MC30_Launch_Cluster_Bomb </SFXEvent_Activate><br></Cluster_Bomb_Ability>

You can add your own ability if you want

Now for the Death Clone
Change this line to this one
Change this line TEXT_UNIT_MC30_FRIGATE to TEXT_UNIT_MC40_FRIGATE
Change the space model to rv_moncal_mc40_d.alo
Change the Scale Factor to 1.0
Change the Affiliation to rebels (Underworld was an error by the FOC staff)

Save and close your done code the MC40 (you can make any change you like to it at this point too)

XI: Implementing new unit in game
(multi-player set up in chapter )
Ok time to implement new unit in to game

Ok open the GameObjectFiles.xml and scroll to the bottom and add this to lines

code:
<!-- new units added in the tutorial mod --><br><File>Units_Space_Rebel_MC40.xml</File>

the location of the Units_Space_Rebel_MC40.xml will actually determines it location on the build list top of list comes first left to right bottom of the list is most right

Save and close (you have now added the MC40 to the game (only in the GC will cover multi player in chapter XIII)

XII: Dat file & mtd file
The time has come to input your text ids (these are the 2 line I had you save in to a doc called dat_info so lets up that file up.
The first should be TEXT_UNIT_MC40_FRIGATE so under it type in the units name MC 40
The second is a the unit info for that we can get some info on the MC 40 at Wookieepedia site Starwars.wikia.com once there type in MC40a Light Cruiser in to the search field and this will bring you to the page that has the info on the MC40 copy the following info into your dat_info under TEXT_TOOLTIP_MC40_FRIGATE

code:
The MC40a light cruiser was a Mon Calamari Star Cruiser design. The MC40 had a large, portside hangar and could carry one fighter squadron. It was also equipped with powerful shields. Its three engines gave it a higher speed than the bigger MC80a Star Cruiser, and it was more maneuverable.

And save the file for now but do not close.

Now make a copy of the MasterTextFile and rename it unediited MasterTextFile just in cass you mess up on in putting any text ids.
Now open the MasterTextFile with the DatEditor once open click File/Open… navigate to where the MasterTextFile is located (you’ll you found it when you also find unediited MasterTextFile, now click and open the MasterTextFile

Now click on edit/insert string
The String name: box is where you put one of these text id lines TEXT_UNIT_MC40_FRIGATE or TEXT_TOOLTIP_MC40_FRIGATE
The Text: box is where the text I had you put under each of the text ids
So insert one set then the other set when inserting the text field info make sure there’s no extra returns enter or you’ll have this show up in game  in the unit info field.
When done entering both set save then close the program.
You now know how to input new text ids in to the game.

Now for the MTD file where all the buttons for units are kept at, go to your_mod’s texture file in open the Mt_commandbar.mtd file with MTDEditor. Click on the file/open and navigate your way to the Mt_commandbar.mtd in your_mod select it on open it and then select Mt_commandbar.tga and open it. How click Edit/Insert file(s) and select I_BUTTON_CALAMARI_LIGHT_CRUISER.tga and open it. Save and close
You now know how to input new buttons in to the game,

XIII: Multi player setup
Now to setup the unit in the game multiplayer setup for this we need make a copy of the StarBases.xml out of the source file and put it in your_mod’s xml file and open it.
Scroll down to Skirmish_Rebel_Star_Base_4 and look for the

code:
<Tactical_Buildable_Objects_Multiplayer>

And the line of MC40_Frigate, between MC30_Frigate, and B-Wing_Squadron, now scroll down to Skirmish_Rebel_Star_Base_5, and add the line in to the same spot for Skirmish_Rebel_Star_Base_5 that we did for Skirmish_Rebel_Star_Base_4 save and close xml.
Unit now in multi player

XIV: AI set Up
Just have to set the ai to use the new unit now and for that we need a copy of the TacticalMultiplayerBuildSpaceUnitsGeneric.lua it is found in the
source/data/scripts/AI/ SpaceMode now copy TacticalMultiplayerBuildSpaceUnitsGeneric.lua and put it the same location in your_mod path is
your_mod/data/scripts/AI/ SpaceMode. Now to edit the file to open the file with lua editor and scroll down to where you see MC30_Frigate and add this info after it
| MC40_Frigate
to make sure it looks like the

code:
MC30_Frigate | MC40_Frigate = 0,3"

Then save and close
You have now edited AI script to where the AI will now use in multi player.

XV: Create your short cut an clean up the unwanted file
Now to create a short cut to play the mod
Make a copy of the shortcut for the game and put it just inside your just in side your_mod folder
Now right click on it and select the properties option in the popup window
Edit the target path to

code:
"C:\Program Files\LucasArts\Star Wars Empire at War Forces of Corruption\swfoc.exe" MODPATH=Mods\your_mod

Now re name the shortcut to your_mod’s name

And double click to state your_mod “congratulations you have made the start of your mod the rest is now up to you.

Now go back to your_mod’s xml file and delete all he files that have the ~ as the first charter in there names and HardPoints.xml, in the text file delete the dat_info file and the unediited MasterTextFile.dat file and the texture file delete I_BUTTON_CALAMARI_LIGHT_CRUISER.tga now all un need file ate removed form the mod files


XVI: Credits
Keeper_of_faith for his mc40 model
All the site were the tool came from
The makers of said tools
And the moding community

This tutorial is written by "X" aka lord_X or knivesdamaster

Thought this shoud be added here
hope this helps someone
"X" aka knvisdamaster, lord_X, drunkin_modeler, unknown

** note not all the link may work right now as I wrote this like 2.5 years ago and have not full updated it - if you find a bad link let me know and i will add and good one **
X

Post comment Comments
wazanator
wazanator Sep 11 2010, 4:52pm says:

Very nice tutorial :)

+2 votes     reply to comment
lord_X
lord_X Sep 14 2010, 2:15am replied:

thanks i thought it would be nice of me to share it here...

X

+2 votes     reply to comment
camos117
camos117 Feb 5 2011, 11:52am says:

GameObjectFiles.xml where is it is located on my computer i can't find it and the EAWExtractor doesn't work

+2 votes     reply to comment
Heljumper117
Heljumper117 Jun 13 2011, 1:30am replied:

in the xml directory

+2 votes     reply to comment
Hiddener
Hiddener Jun 18 2011, 8:38pm says:

I'd like to know how everyone is getting their models into the game. The only ALO exporter I know of is for 3DS max, and old versions of it too. But I despise 3DS Max, and I use Maya because it's easier and just as powerful. I used a free program to convert Maya binaries to 3DS, then export from there, but that is too much trouble. And I'm not sure that it exports properly that way anyway. Any way easier? Or am I doomed because I refused to use craptastic 3DS Max?

+2 votes     reply to comment
Thread
Thread Jun 26 2011, 6:29pm replied:

There is a converter that i reasently found and can also be used for what ever file you need to convert.

Web.axelero.hu

In the Format part of the site shows all files it can convert for including alo files. Its free to and you can email the person if you want it to do somthing speacial.

+2 votes     reply to comment
Thread
Thread Jun 26 2011, 9:08pm says:

Never mind theres a 30 day trail my bad

+2 votes     reply to comment
infantryspec
infantryspec Jul 23 2011, 9:05am says:

dude tnks alot i owe you a beer

+2 votes     reply to comment
kineticbrutality
kineticbrutality Aug 27 2011, 1:18pm says:

Please edit.

+2 votes     reply to comment
SpookyScarySam
SpookyScarySam Jan 23 2012, 2:57pm says:

Hello I'm a bit stuck on part VII I'm not sure how to make the .xml files. I have the xmlpad open and junk but I can't follow the way you worded your sentences. It would be vary nice if you could elaborate for I would vary much like to make a mod for myself, but i haven't the slightest clue.

+2 votes     reply to comment
sam032
sam032 Jan 26 2012, 5:35pm replied:

Do you need help on opening the XML file or Coding the XML file.

+2 votes     reply to comment
SpookyScarySam
SpookyScarySam Jan 27 2012, 2:47pm replied:

Honestly both if you could help that would be much appreciated.

+2 votes     reply to comment
sam032
sam032 Jan 28 2012, 12:59pm replied:

Once you have the XMLpad open hit file then open and browse for the XML file you plan on coding. I cant really help you with the coding since I am also working my way through the tutorial, but hopefully this helps a bit.

+3 votes     reply to comment
Death346289
Death346289 Feb 27 2012, 10:20am says:

I've got a problem with the strings, if i copy a unit from another mod(all the hardpoints and SpacefirgatesXML) details concerning that specific unit, and then edit the MTD and .dat to match the unit the unit appears in game as [MISSING] for both unitname and information I dont have a clue why.

+2 votes     reply to comment
sam032
sam032 Mar 6 2012, 12:05pm says:

I noticed some of the lines of code are cut off and thought it might trip up some beginers. Petroglyphgames.com
Its the same Tutorial but the the codes are not cut off and I think its easier to follow.

+2 votes     reply to comment
sam032
sam032 Mar 17 2012, 3:04pm says:

Has anyone here actually used this tutorial and have gotten the MC40 model to appear in game, because this is my second time going through this tutorial and I have nothing but the normal game

+3 votes     reply to comment
dugfire180
dugfire180 Jun 25 2012, 7:25pm says:

ok im trying to get it a unit that i like into a mod for Forces of Corruption it refuses to show up and its ******* me off cause i can't figure it out its already coded and everything i just cant get the unit into the game... Message me back if anyone can help.

+1 vote     reply to comment
agreal
agreal Jul 6 2012, 10:21am says:

i am getting the error "junk after document element" on the line <HardPoint Name="HP_mc40_Engine">

+1 vote     reply to comment
Lorialstraz
Lorialstraz Jul 31 2012, 6:31pm says:

Could someone pls tell me how to make nogri assasins trainable from all planets? i dont see that information listed.

+1 vote     reply to comment
icefire482
icefire482 Dec 9 2012, 6:17pm replied:

In the foc XML it should say under the noghri assassins what planets they can be trained on, just change the planets

+1 vote     reply to comment
packy21
packy21 Aug 10 2012, 5:58am says:

what do you mean with up one level. i don't know how to do that. i run windows 7

+1 vote     reply to comment
rocken
rocken Sep 4 2012, 2:06pm says:

Umm i have a prob.. Im useing steam XD...

+1 vote     reply to comment
Lord_starkiller
Lord_starkiller Oct 10 2012, 10:26am says:

What do I do, I opened the XML editor and get this

Invalid Filecontent in FileGameconstants.xml
Fix this error and restart

The data "<Overrun_Auto_Resolve_Multiple>8.0f</Overrun_Auto_Resolve_Multiple>" is not legal for a JDOM comment; Comment data cannot start with a hyphen.

0 votes     reply to comment
icefire482
icefire482 Dec 9 2012, 11:54am says:

When you say in step 3 to make art, XML, text, script, models, textures, land mode, space mode, etc. do you mean "FOLDERS" rather than files?

+2 votes     reply to comment
ghost1997
ghost1997 Jan 13 2013, 1:13pm says:

Somebody can help me out? Im stuck at step 3. I dont understand the whole text. So where can i find the mod file , Or what is it ? Pls I need help !!!

+1 vote     reply to comment
ghost1997
ghost1997 Jan 14 2013, 3:28pm replied:

Nobody ? :( Really ? Help Me out pls :D

+1 vote     reply to comment
sam032
sam032 Jan 29 2013, 2:12pm replied:

I believe this would be the mod file

C:\Program Files (x86)\LucasArts\Star Wars Empire at War Forces of Corruption\Mods

Once you are in that folder just make a new folder and label it whatever you plan on making your mod name be. I hope this helped, just ask if you have anymore questions.

+1 vote     reply to comment
WOEaintME
WOEaintME Feb 5 2013, 9:34pm says:

Is there a convertor for 3ds Max 2012? Or does anyone know how to make the convertors available work on 3ds Max 2012 (I sure can't find a way)?

+1 vote     reply to comment
freeboy99007
freeboy99007 Mar 28 2013, 9:46pm says:

Sorry but I need help. when it says to extract the files where do I extract them to? how do I find the Mt_commandbar files (I'm using the gold pack edition of the game if it helps).

+1 vote     reply to comment
Camo7
Camo7 Apr 1 2013, 1:09am replied:

Gold Packs of games always have different file structures.
Unfortunately, I don't know where the files are on a gold pack installation, but if you can find the Data folder for either game, you should be able to find everything else.

If you already found the Data folder, then what you should do is make a new folder to house your mod.
Then open the extractor and extract the textures.meg, models.meg, maps.meg, and config.meg to the folder you created. the commandbar files can be found under DATA\ART\TEXTURES after you've extracted everything.

That help at all?

+1 vote     reply to comment
freeboy99007
freeboy99007 Apr 1 2013, 7:09pm says:

maybe I wasn't clear. my question is where do i extract the files to. as for the commandbar files I found out that they changed it from a two different MTD. & TGA. files to one big XML. file :(

thanks for your help and time,

freeboy99007

PS. i just ordered a new game disk so it should fix my problems with the commandbar files. if anyone can tell me where to extract the files in step two to it would be appreciated.

+1 vote     reply to comment
assassin555
assassin555 Apr 26 2013, 9:42am says:

how do I extract the models texture and maps

+1 vote     reply to comment
assassin555
assassin555 Apr 26 2013, 10:38am says:

where is the mod file and how do create a mod file

+1 vote     reply to comment
assassin555
assassin555 Apr 26 2013, 1:06pm says:

ive got gold edition but in EAW foc there is no XML folder

+1 vote     reply to comment
themaddhatterof1992
themaddhatterof1992 May 8 2013, 2:09pm says:

I really just wanna add a few units to both sides. - -;;
Like the Rebellion had Star Destroyers. captured, and otherwise. I can edit the text files easy, but that don't change the fact that the only capitals the Rebellion normally has is Mon Cal Cruisers, and they had a lot more than that in most of the books.

+1 vote     reply to comment
Guest
Guest May 31 2013, 7:58am says:

This comment is currently awaiting admin approval, join now to view.

laurin12mar
laurin12mar Jun 1 2013, 6:24pm says:

Can i make a translation into german ? if yes could you help me because my English is not the best and some things do i not understand :D

+1 vote     reply to comment
Guest
Guest Sep 2 2013, 4:15pm says:

I'm trying to convert the tractor beam on the star destroyer into a turbolaser battery. I've taken care of everything except the firing bone, because it was a non-weapon hardpoint so it had no firing bone. Without the firing bone, the new turbolaser cannot fire. It is present on the destroyer, along with it's name, hit points, etc. All is well except the firing bone. What do I do about it?

+1 vote     reply to comment
Guest
Guest Nov 27 2013, 12:18pm says:

This comment is currently awaiting admin approval, join now to view.

SevandVash
SevandVash Dec 11 2013, 1:24am says:

Does this tutorial work for windows 7?

+1 vote     reply to comment
Guest
Guest Dec 11 2013, 8:23pm says:

This comment is currently awaiting admin approval, join now to view.

TeaviexCue
TeaviexCue Feb 9 2014, 8:07am says:

All I see in ALO viewer is a small green spot in the center of the blackness!
How can I actually view the model?

+1 vote     reply to comment
EliteARO
EliteARO Mar 8 2014, 1:47am says:

Great tutorial but i need help with models. i am using custom models with nothing on them and i am suck on adding the shaders from foc to models in 3ds max can anyone help me.

+1 vote     reply to comment
superlonguselessname
superlonguselessname Jun 8 2014, 2:52am says:

Hey so i think i got it all in and i will not show up when i go to build one from the space station and i re-looked through everything and cannot tell what i had done wrong - btw though this is a great help

+1 vote     reply to comment
Guest
Guest Aug 2 2014, 11:36am says:

This comment is currently awaiting admin approval, join now to view.

Dmorgan
Dmorgan Aug 22 2014, 12:42am says:

Hello, having a small problem somebody here might be able to help with.
Using a mod that adds units via a new buildpad and its constructed "turrets" on only one map, adding the ships to a starbase has enabled one able to be built, but not the other two despite removing all the requirements and the xml files looking similar to the one that is able to be built the other two remain unbuildable.
However both icons show up on the starbase just nothing happens when you click them, and they dont black out when the queue is full.

Thanks for any help.

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Star Wars: Empire At War
Platforms
Windows, Mac
Developer
Petroglyph
Publisher
LucasArts
Engine
Alamo
Contact
Send Message
Official Page
Lucasarts.com
Release Date
Released Feb 16, 2006
Game Watch
Track this game
Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Games
Star Wars: Empire At War
Star Wars: Empire At War Single & Multiplayer Real Time Strategy
Related Engines
Alamo
Alamo Commercial Released Jul 20, 2006
Related Groups
Empire at War
Empire at War Hobbies & Interests group with 305 members
LucasArts
LucasArts Developer & Publisher
Petroglyph
Petroglyph Developer & Publisher