Jump to content

Beginners Tutorial for FOC Mod


  • Please log in to reply
7 replies to this topic

#1 "X"

"X"

    EEAW Moderator & AB Admin

  • Community Supporter
  • Pip
  • 61 posts
  • Gender:Not Telling
  • Location:under fish fosh's bed

Posted 26 September 2009 - 12:06 PM

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
http://empireatwar.f....ame_Tools;7351
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
http://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)
http://www.filefront...xtractor-1.0.2/
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)
http://empireatwar.f...._Cruiser;69210

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)
http://www.download.....-10252051.html
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

<?xml version="1.0"?>
< HardPoints >




<!-- ============================================= ============================================= -->
<!-- ============================================= END SPACE, BEGIN LAND ============================================= -->
<!-- ============================================= ============================================= -->




</HardPoints>

Now change <HardPoints_> to <HardPoints_TUTORIAL> (replace the word TUTORIAL with what ever you used) you now should get error mess at the bottom so rename </HardPoints> to </HardPoints_TUTORIAL> 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

<!-- 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

<Fire_Bone_A>MuzzleA_00</Fire_Bone_A>
<Fire_Bone_B>MuzzleA_00</Fire_Bone_B>
<Fire_Cone_Width>90.0</Fire_Cone_Width>
<Fire_Cone_Height>90.0</Fire_Cone_Height>
<Fire_Projectile_Type>Proj_Ship_Medium_Laser_Canno n_Red</Fire_Projectile_Type>
<Fire_Min_Recharge_Seconds>2.0</Fire_Min_Recharge_Seconds>
<Fire_Max_Recharge_Seconds>3.0</Fire_Max_Recharge_Seconds>
<Fire_Pulse_Count>5</Fire_Pulse_Count>
<Fire_Pulse_Delay_Seconds>0.2</Fire_Pulse_Delay_Seconds>
<Fire_Range_Distance>800.0</Fire_Range_Distance>
<Fire_SFXEvent>Unit_Rebel_Ship_Laser_Fire</Fire_SFXEvent>
<Fire_Inaccuracy_Distance> Fighter, 6.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Bomber, 5.5 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Transport, 1.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Corvette, 12.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Frigate, 70.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Capital, 30.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Super, 30.0 </Fire_Inaccuracy_Distance>
<Allow_Opportunity_Fire_When_Targeting>False</Allow_Opportunity_Fire_When_Targeting>
And
<Damage_Type>Damage_Corellian_Corvette</Damage_Type>
Change the type to HARD_POINT_ENGINE and add this line under it

<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

<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

<Death_Explosion_Particles> Large_Explosion_Space </Death_Explosion_Particles> <!-- this is the type of explosion that will happen when the hard point is destroyed -->
<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
<Model_To_Attach> rv_moncal_mc40_HP_E.alo</Model_To_Attach>
These next 2 lines put the attacked model where it belongs
<Attachment_Bone>HP_E_Bone</Attachment_Bone> <!-- this is where the model will be attached at -->
<Collision_Mesh>HP_E_Bone</Collision_Mesh> <!-- this is the collision mesh for the attached model -->

Now for the last two lines
<Damage_Particles>HP_E_EMITDAMAGE</Damage_Particles> <!-- this is damage particles location when the hard point is destroyed -->
<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
<HardPoint Name="HP_mc40_engeine">
<Type> HARD_POINT_ENGINE </Type>
<Tooltip_Text>TEXT_ENGINE_HARDPOINT</Tooltip_Text>
<Is_Targetable>Yes</Is_Targetable>
<Is_Destroyable>Yes</Is_Destroyable>
<Health>500.0</Health>

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

<Model_To_Attach> rv_moncal_mc40_HP_E.alo</Model_To_Attach>
<Attachment_Bone>HP_E_Bone</Attachment_Bone> <!-- this is where the model will be attached at -->
<Collision_Mesh>HP_E_Bone</Collision_Mesh> <!-- this is the collision mesh for the attached model -->
<Damage_Particles>HP_E_EMITDAMAGE</Damage_Particles>
<Engine_Particles>HP_E_MAINENGINES</Engine_Particles>
</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

<Tooltip_Text> TEXT_FIGHTER_BAY_HARDPOINT </Tooltip_Text>

Change the target-able and destroyable to yes
Then add the health line under <Is_Destroyable> line
Skip a line and add this lines
<Death_Explosion_Particles> Large_Explosion_Space </Death_Explosion_Particles>
<Death_Explosion_SFXEvent>Unit_Hardpoint_Bay_Death </Death_Explosion_SFXEvent>

Skip another line and add these lines
<Attachment_Bone>SPAWN_00</Attachment_Bone>
<Collision_Mesh>SPAWN_00</Collision_Mesh>
And the hanger bay is done and should look like this
<HardPoint Name="HP_mc40_fighterbay">
<Type> to HARD_POINT_FIGHTER_BAY </Type>
<Tooltip_Text> TEXT_FIGHTER_BAY_HARDPOINT </Tooltip_Text>
<Is_Targetable>yes</Is_Targetable>
<Is_Destroyable>yes</Is_Destroyable>
<Health>500.0</Health>

<Death_Explosion_Particles> Large_Explosion_Space </Death_Explosion_Particles>
<Death_Explosion_SFXEvent>Unit_Hardpoint_Bay_Death </Death_Explosion_SFXEvent>

<Attachment_Bone>SPAWN_00</Attachment_Bone>
<Collision_Mesh>SPAWN_00</Collision_Mesh>
</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

<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
<Model_To_Attach> rv_moncal_mc40_HP_F-C.alo</Model_To_Attach>
<Attachment_Bone>HP_F-C_Bone</Attachment_Bone>
<Collision_Mesh>HP_F-C_Bone</Collision_Mesh>
<Damage_Decal>HP_F-C_blast</Damage_Decal>
<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
<Fire_Bone_A> FP_F-C_00</Fire_Bone_A>
<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 </HardPoint> we will add these two line
<!-- this is the break off prop that falls off the model when the hard point is destroyed -->
<Death_Breakoff_Prop> Hardpoint_Breakoff_mc40_fc </Death_Breakoff_Prop>

Ok this hard point should look like this
<HardPoint Name="HP_mc40_fc">
<Type> HARD_POINT_WEAPON_LASER </Type>
<Tooltip_Text>TEXT_WEAPON_LASERCANNON</Tooltip_Text>
<Is_Targetable>yes</Is_Targetable>
<Is_Destroyable>yes</Is_Destroyable>
<Health>500.0</Health>

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

<Damage_Type> Damage_Star_Destroyer </Damage_Type>
<Fire_Bone_A>FP_F-C_00</Fire_Bone_A>
<Fire_Bone_B>FP_F-C_01</Fire_Bone_B>
<Fire_Cone_Width>90.0</Fire_Cone_Width>
<Fire_Cone_Height>90.0</Fire_Cone_Height>
<Fire_Projectile_Type>Proj_Ship_Medium_Laser_Canno n_Red</Fire_Projectile_Type>
<Fire_Min_Recharge_Seconds>2.0</Fire_Min_Recharge_Seconds>
<Fire_Max_Recharge_Seconds>3.0</Fire_Max_Recharge_Seconds>
<Fire_Pulse_Count>5</Fire_Pulse_Count>
<Fire_Pulse_Delay_Seconds>0.2</Fire_Pulse_Delay_Seconds>
<Fire_Range_Distance>800.0</Fire_Range_Distance>
<Fire_SFXEvent>Unit_Rebel_Ship_Laser_Fire</Fire_SFXEvent>

<Fire_Inaccuracy_Distance> Fighter, 6.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Bomber, 5.5 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Transport, 1.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Corvette, 12.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Frigate, 70.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Capital, 30.0 </Fire_Inaccuracy_Distance>
<Fire_Inaccuracy_Distance> Super, 30.0 </Fire_Inaccuracy_Distance>

<Allow_Opportunity_Fire_When_Targeting>False</Allow_Opportunity_Fire_When_Targeting>

<!-- this is the break off prop that falls off the model when the hard point is destroyed -->
<Death_Breakoff_Prop> Hardpoint_Breakoff_mc40_fc </Death_Breakoff_Prop>
</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
http://forums.filefr....-tutorial.html - **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 <File>HardPoints_Underworld.xml</File>
<File>HardPoints_TUTORIAL.xml</File>
If you used a different name change to the name you gave it.

Now this file should look like this
<?xml version="1.0" ?>

<Hard_Point_Files>
<File>HardPoints.xml</File>
<File>CIN_HardPoints.xml</File>
<File>HardPoints_Underworld.xml</File>
<File>HardPoints_TUTORIAL.xml</File>
</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
<!-- ================================================== ============================================== -->
<!-- New Break-off pieces from destroyed hard points, there are referenced in HardPoints_TUTORIAL.xml -->
<!-- ================================================== ============================================== -->

<!-- ================================================== ============================================== -->
<!-- New Break-off pieces from destroyed hard points, there are referenced in HardPoints_TUTORIAL.xml -->
<!-- ================================================== ============================================== -->

The bottom should now look close too like this
<!-- ================================================== ===================================== -->
<!-- End Break-off pieces from destroyed hard points, there are referenced in HardPoints.xml -->
<!-- ================================================== ===================================== -->

<!-- ================================================== ============================================== -->
<!-- New Break-off pieces from destroyed hard points, there are referenced in HardPoints_TUTORIAL.xml -->
<!-- ================================================== ============================================== -->

<!-- ================================================== ============================================== -->
<!-- End Break-off pieces from destroyed hard points, there are referenced in HardPoints_TUTORIAL.xml -->
<!-- ================================================== ============================================== -->

Add this in between the new and end of the break off we put in look above to see what Iím talking about
<!-- MC 40 Break-off props -->
<SpaceProp Name="Hardpoint_Breakoff_mc40_fc">
<Text_ID />
<!-- model to use -->
<Space_Model_Name> rv_moncal_mc40_HP_F-C.alo </Space_Model_Name>
<Is_Decoration> No </Is_Decoration>
<Is_Discardable> No </Is_Discardable>
<!-- scale need to be the same size a the ship to look correct -->
<Scale_Factor> 1.0 </Scale_Factor>
<Sort_Order_Adjust> -1 </Sort_Order_Adjust>
<Tactical_Health> 100 </Tactical_Health>

<SpaceBehavior> DEBRIS </SpaceBehavior>
<!-- the direction in which the prop moves -->
<Debris_Movement_Vector> -0.2, 0.0, -0.5 </Debris_Movement_Vector>
<Debris_Facing_Rotate_Vector> 0.9, 0.4, 0.3 </Debris_Facing_Rotate_Vector>
<!-- debris life span (how long it on screen) -->
<Debris_Min_Lifetime_Seconds> 15.0 </Debris_Min_Lifetime_Seconds>
<Debris_Max_Lifetime_Seconds> 25.0 </Debris_Max_Lifetime_Seconds>
<!-- particles to us in the prob -->
<Debris_Attached_Particle> Space_Debris_Fire_Large </Debris_Attached_Particle>

<!-- Type of explosion to use -->
<Death_Explosions> Large_Explosion_Space </Death_Explosions>
<!-- alway use this for Break-off props ship models -->
<Death_SFXEvent_Start_Die> Unit_Corvette_Death_SFX </Death_SFXEvent_Start_Die>
<!-- you want yes on so the map does not get filed up will deris form ships -->
<Remove_Upon_Death>true</Remove_Upon_Death>
</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
<MC30_Frigate_Data>

to this line
<MC40_Frigate_Data>

(you should get a mismatch error so change the this line to
</MC30_Frigate_Data>

to this line
</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 <Moniker>Alliance_Assault_Frigate.txt</Moniker>
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 <Death_Clone>Damage_Normal, MC30_Frigate_Death_Clone</Death_Clone> to
<Death_Clone>Damage_Normal, MC40_Frigate_Death_Clone</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 <Lua_Script>ObjectScript_MC30</Lua_Script>
Remove this data
<Unit_Ability>
<Type>CLUSTER_BOMB</Type>
<Recharge_Seconds>50.0</Recharge_Seconds>
<GUI_Activated_Ability_Name> MC30_Cluster_Bomb </GUI_Activated_Ability_Name> <!-- GUI Command Bar support -->
<Effective_Radius> 500.0 </Effective_Radius>
<SFXEvent_GUI_Unit_Ability_Activated>Unit_Cluster_ Bombs_MC30_Frigate</SFXEvent_GUI_Unit_Ability_Activated>
<Supports_Autofire>True</Supports_Autofire>
</Unit_Ability>
And this data
<Cluster_Bomb_Ability Name="MC30_Cluster_Bomb">
<Activation_Style> User_Input </Activation_Style>
<Detonation_Time_In_Secs> 1.5 </Detonation_Time_In_Secs>
<Bomb_Type>Proj_Cluster_Bomb</Bomb_Type>
<Number_Of_Bombs> 12 </Number_Of_Bombs>
<SFXEvent_Activate>Unit_MC30_Launch_Cluster_Bomb </SFXEvent_Activate>
</Cluster_Bomb_Ability>
You can add your own ability if you want

Now for the Death Clone
Change this line <SpaceUnit Name="MC30_Frigate_Death_Clone"> to this one <SpaceUnit Name="MC40_Frigate_Death_Clone">
Change this line <Text_ID>TEXT_UNIT_MC30_FRIGATE</Text_ID> to <Text_ID>TEXT_UNIT_MC40_FRIGATE </Text_ID>
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
<!-- new units added in the tutorial mod -->
<File>Units_Space_Rebel_MC40.xml</File>

the location of the <File>Units_Space_Rebel_MC40.xml</File> 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 http://starwars.wiki.../wiki/Main_Page 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

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

<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
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
"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

Edited by lord_X, 26 September 2009 - 12:33 PM.

Posted Image
Posted ImagePosted Image

Posted Image


#2 MerlinGalgotta

MerlinGalgotta

    Follower

  • Members
  • PipPip
  • 160 posts

Posted 28 September 2009 - 05:13 AM

Great tutorial!
Posted Image

#3 "X"

"X"

    EEAW Moderator & AB Admin

  • Community Supporter
  • Pip
  • 61 posts
  • Gender:Not Telling
  • Location:under fish fosh's bed

Posted 28 September 2009 - 06:34 AM

thnxz, funny thing is i wrote this back in mid 07 but never posted it here....

X
Posted Image
Posted ImagePosted Image

Posted Image


#4 Berek-PG

Berek-PG

    Community Manager

  • Root Admin
  • 7,898 posts
  • Fav.†Game:
  • Gender:Male
  • Location:Las Vegas, NV

Posted 02 October 2009 - 01:27 PM

This is great stuff! We're currently putting together our October newsletter, due to be released next week. Do I have permission to reference this?
Mathew "Berek" Anderson
Former Petroglyph Community Manager
http://www.twitter.com/mathewanderson

#5 "X"

"X"

    EEAW Moderator & AB Admin

  • Community Supporter
  • Pip
  • 61 posts
  • Gender:Not Telling
  • Location:under fish fosh's bed

Posted 02 October 2009 - 04:55 PM

View PostBerek-PG, on Oct 2 2009, 01:27 PM, said:

This is great stuff! We're currently putting together our October newsletter, due to be released next week. Do I have permission to reference this?

yes you may reference this Break,

X
Posted Image
Posted ImagePosted Image

Posted Image


#6 "X"

"X"

    EEAW Moderator & AB Admin

  • Community Supporter
  • Pip
  • 61 posts
  • Gender:Not Telling
  • Location:under fish fosh's bed

Posted 25 August 2010 - 01:11 PM

Thought I would link the tools to the tutorial for easy of use

other use tools for modding EAW, FOC, and even UAW

Tools that can be used to make a mod for EAW/FOC

X
Posted Image
Posted ImagePosted Image

Posted Image


#7 begginer

begginer

    Initiate

  • Members
  • 1 posts

Posted 02 August 2011 - 05:04 PM

Thanks for posting this.  I'm very new to modding and this tutorial was clear and easy to understand.  I do have a few questions though.
1). In step II when you extract the files from EAW and FOC, where do you extract them too?  Or does this not matter for the functioning of the mod.
2). I don't know how to open the LUA tools (though after reading the info on this website about the LUA tools it says to open with the command prompt, how does one do this) for editing scripts in step XIV.
3). When I attempt to open my mod an exception occurs at the load screen.  Possible problems?

Any help or advice is greatly appreciated.

#8 The_King_Meep

The_King_Meep

    Acolyte

  • Members
  • Pip
  • 20 posts

Posted 12 March 2012 - 11:06 AM

Can I use this to add things to an existing mod?

EDITI have a model and everything, but I added the strings but the unit has no name or description, just [MISSING]. Any help?

Edited by The_King_Meep, 15 March 2012 - 02:34 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users