Beginners Tutorial for FOC Mod -1 reply

Please wait...

17th April 2007

0 Uploads

1,593 Posts

0 Threads

#1 11 years ago

Tutorial for beginners on how to start a FOC mod (CAN BE USED TO MOD 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.filefront.com/files/Empire_at_War/Tools/Game_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://alpha1.dyns.net/eaw/ 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 http://www.petro-gamers.com/downloads/eaw/utils/ 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 and models to do that start up the eaw extractor tell it to extract these two file models and textures 'this will give you the models & textures of eaw only' (might take some time depending on your pc). (ONLY IF YOU HAVE FOC) when there done if you have FOC we nee 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 or model meg and extract then, do the same for the other meg file Now you should have all the textures, models, 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




17th April 2007

0 Uploads

1,593 Posts

0 Threads

#2 11 years ago

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.filefront.com/file/MC40_Light_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.com/XmlPad/3000-7241_4-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 > 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 the tell the game to ignore ever thing in between the 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




17th April 2007

0 Uploads

1,593 Posts

0 Threads

#3 11 years ago

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 MuzzleA_00 MuzzleA_00 90.0 90.0 Proj_Ship_Medium_Laser_Cannon_Red 2.0 3.0 5 0.2 800.0 Unit_Rebel_Ship_Laser_Fire Fighter, 6.0 Bomber, 5.5 Transport, 1.0 Corvette, 12.0 Frigate, 70.0 Capital, 30.0 Super, 30.0 False And Damage_Corellian_Corvette Change the type to HARD_POINT_ENGINE and add this line under it TEXT_ENGINE_HARDPOINT Now for the targetable and destroyable they are what they sound like the make a hard point targetable and destroyable no mean there not and yes means they are I’m making the both yes. Now add this line under the targetable and destroyable line 500.0 (health is how much damage it take to destroy the hard point Now skip a line and add this next two line Large_Explosion_Space Unit_Hardpoint_Engines_Death Skip another line and now add this line to attack the model for the engine rv_moncal_mc40_HP_E.alo These next 2 lines put the attacked model where is belongs HP_E_Bone HP_E_Bone Now for the last two lines HP_E_EMITDAMAGE HP_E_MAINENGINES Your hard point should look like this HARD_POINT_ENGINE TEXT_ENGINE_HARDPOINT Yes Yes 500.0 Large_Explosion_Space Unit_Hardpoint_Engines_Death rv_moncal_mc40_HP_E.alo HP_E_Bone HP_E_Bone HP_E_EMITDAMAGE HP_E_MAINENGINES 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 TEXT_FIGHTER_BAY_HARDPOINT Change the targetable and destroyable to yes Then add the health line under line Skip a line and add this lines Large_Explosion_Space Unit_Hardpoint_Bay_Death Skip another line and add these lines SPAWN_00 SPAWN_00 And the hanger bay is done and should look like this to HARD_POINT_FIGHTER_BAY TEXT_FIGHTER_BAY_HARDPOINT yes yes 500.0 Large_Explosion_Space Unit_Hardpoint_Bay_Death SPAWN_00 SPAWN_00 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 TEXT_WEAPON_LASERCANNON Change the targetable and destroyable to yes and add the health line again. Skip a line then add the following lines rv_moncal_mc40_HP_F-C.alo HP_F-C_Bone HP_F-C_Bone HP_F-C_blast HP_F-C_EmitDamage This time we wiull change the Damage_Type to Damage_Star_Destroyer The fire bone get changed to FP_F-C_00 FP_F-C_01 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 Hardpoint_Breakoff_mc40_fc Ok this hard point should look like this HARD_POINT_WEAPON_LASER TEXT_WEAPON_LASERCANNON yes yes 500.0 rv_moncal_mc40_HP_F-C.alo HP_F-C_Bone HP_F-C_Bone HP_F-C_blast HP_F-C_EmitDamage Damage_Star_Destroyer FP_F-C_00 FP_F-C_01 90.0 90.0 Proj_Ship_Medium_Laser_Cannon_Red 2.0 3.0 5 0.2 800.0 Unit_Rebel_Ship_Laser_Fire Fighter, 6.0 Bomber, 5.5 Transport, 1.0 Corvette, 12.0 Frigate, 70.0 Capital, 30.0 Super, 30.0 False Hardpoint_Breakoff_mc40_fc 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.filefront.com/sw-eaw-modding-mapping-editing/245132-modding-tutorial.html




17th April 2007

0 Uploads

1,593 Posts

0 Threads

#4 11 years ago

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 <?xml version="1.0" ?> HardPoints.xml CIN_HardPoints.xml HardPoints_Underworld.xml HardPoints_TUTORIAL.xml 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 The bottom should now look close too like this Add this in between the new and end of the break off we put in look above to see what I’m talking about rv_moncal_mc40_HP_F-C.alo No No 1.0 -1 100 DEBRIS -0.2, 0.0, -0.5 0.9, 0.4, 0.3 15.0 25.0 Space_Debris_Fire_Large Large_Explosion_Space Unit_Corvette_Death_SFX true 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 to this line (you should get a mismatch error so change the this line to to this line 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 ) 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 CLUSTER_BOMB 50.0 MC30_Cluster_Bomb 500.0 Unit_Cluster_Bombs_MC30_Frigate True And this data User_Input 1.5 Proj_Cluster_Bomb 12 Unit_MC30_Launch_Cluster_Bomb 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)




17th April 2007

0 Uploads

1,593 Posts

0 Threads

#5 11 years ago

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 Units_Space_Rebel_MC40.xml 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.wikia.com/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 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 AA 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 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 mad 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 knivesdamaster any one can add to this thread if they see some thing i missed or ho to some thing else




nason

thats me

50 XP

3rd September 2006

0 Uploads

734 Posts

0 Threads

#6 11 years ago

nice but dude, help me with my problom on the other page you helped me on (Sadly i do not know how to link)




17th April 2007

0 Uploads

1,593 Posts

0 Threads

#7 11 years ago

copy the site address (this are not links there just address) and past to a the address bar at the top of screen




Valgarochi

Let's go find Carmine...

50 XP

16th February 2007

0 Uploads

1,324 Posts

0 Threads

#8 11 years ago

This Should be Stickied, since as a lot of n00bs ask questions that this solves.




17th April 2007

0 Uploads

1,593 Posts

0 Threads

#9 11 years ago

Tutorial on making a hero a Generic Hero NOTE: this will only cover the basic to make it work the rest you have to change to your likings (i use mara jade as an example make a copy of here units data part of the heros in NamedHeroUnits.xml put it in the GenericHeroUnits.xml and then change the tag of HeroUnit to GenericHeroUnit change units name (I’ll use mara_test) for example now change Yes to say no or remove remove this line Coruscant

this should do it for the unit now make a hero company for the unit Now copy the data of the hero company in HeroCompanies.xml and paste between the end of Field_Com_Empire_Team and the start of Boba_Fett_Team data Now rename the team (I’ll use mara_test_team as an example Make this line visible to the game do this by removing and add a cost I’ll use 500 for instances Add a value in the 0 I’ll 45 Now change Mara_Jade to Mara_Test or what ever you named the hero unit Change Yes to Yes and that should cover the hero company you just need to tweak it to want you like in that but it should now work for you knivesdamaster this is a free release and can be put on any site just note that I'm the auther




17th April 2007

0 Uploads

1,593 Posts

0 Threads

#10 11 years ago

lets try to keep this near or on the 1st page to help noobs