Tutorial: creating a new side -1 reply

Please wait...

phazon elite

Got it memorized?

50 XP

14th April 2006

0 Uploads

142 Posts

0 Threads

#1 13 years ago

Here's a tutorial on how to create a new side. I was going to make a Word document, but I decided to post the stuff here. Creating A New Side In SWBF2 (*** means your 3-letter world name) The Side Framework First, you have to create a new folder in BF2_ModTools\data_***\Sides. For just an example, we'll call it tut (for tutorial, duh! lol). In that folder, create 5 folders: odf, req, msh, munged, and effects. For now, just leave it be. We'll get back to it later. Next, you'll have to create a folder in data_***\_BUILD\Sides called tut. Now, you copy the munge and clean.bat files from any of the other side folders in _BUILD and place them in your side's folder. Req's, odf's, and other things Now we'll make our way towards making the files. Let's start with the side's .req. Copy a .req file from the all folder in the assets and place it in data_***\Sides\tut. Rename the .req file from all to tut. Open the .req. You should see this:

ucft { REQN { "lvl" "all_droid_r2d2" "all_fly_awing" "all_fly_gunship_sc" "all_fly_moncalamari_dome" "all_fly_snowspeeder" "all_fly_xwing_sc" "all_fly_ywing_sc" "all_hero_chewbacca" "all_hero_hansolo_storm" "all_hero_hansolo_tat" "all_hero_leia" "all_hero_luke_jedi" "all_hero_luke_pilot" "all_hero_luke_storm" "all_hero_luke_tat" "all_hover_combatspeeder" "all_hover_bos_combatspeeder" "all_inf_engineer" "all_inf_engineer_fleet" "all_inf_engineer_jungle" "all_inf_engineer_snow" "all_inf_marine" "all_inf_officer" "all_inf_officer_jungle" "all_inf_officer_snow" "all_inf_pilot" "all_inf_rifleman" "all_inf_rifleman_desert" "all_inf_rifleman_fleet" "all_inf_rifleman_jungle" "all_inf_rifleman_snow" "all_inf_rifleman_urban" "all_inf_rocketeer" "all_inf_rocketeer_fleet" "all_inf_rocketeer_jungle" "all_inf_rocketeer_snow" "all_inf_sniper" "all_inf_sniper_fleet" "all_inf_sniper_jungle" "all_inf_sniper_snow" "all_inf_wookiee" "all_inf_wookiee_snow" "all_veh_remote_terminal" "all_walk_tauntaun" "imp_hover_speederbike" "all_bldg_defensegridturret" } }

Change it so it looks like this:

ucft { REQN { "lvl" } }

You'll be adding more things in this .req later, so save it and exit. The Soldier Req's Now we can copy the .req you just made and place it in data_***\Sides\tut\req. It's time to do some text work. Open the thing up and change it from this:

ucft { REQN { "lvl" } }

To this:

ucft { REQN { "class" "tut_inf_trooper" } }

You can change the name (you have to keep the tut_inf_ part) to whatever you want, I just put in trooper to keep to the usual framework. Rename the .req file to "tut_inf_trooper" (no quotes) or whatever you specified in the .req. The Soldier's odf Now it's time for the Object Definition Files To start this off, copy the .odf file "all_inf_rifleman" (again, no quotes) from the all folder in the assets and paste it in data_***\Sides\tut\odf. Rename the .odf to "tut_inf_trooper" (you know the drill!) and open it up. You'll see this:

[GameObjectClass] ClassParent = "all_inf_default_rifleman" [Properties] GeometryName = "all_inf_soldier" GeometryLowRes = "all_inf_soldier_low1" OverrideTexture = "all_inf_soldierdesert" FirstPerson = "all\alltroop;all_1st_trooper"

Change it to:

[GameObjectClass] ClassParent = "tut_inf_default_trooper" [Properties] GeometryName = "" GeometryLowRes = "" OverrideTexture = "" FirstPerson = ""

Save and exit. Now copy the .odf file you just edited and rename it to "tut_inf_default_trooper" (do I have to say no quotes again?). Change pretty much everything to this:

[GameObjectClass] ClassParent = "com_inf_default" [Properties] UnitType = "Trooper" WEAPONSECTION = 1 WeaponName = "all_weap_inf_rifle" WeaponAmmo = 6 WEAPONSECTION = 2 WeaponName = "all_weap_inf_pistol" WeaponAmmo = 0 WEAPONSECTION = 3 WeaponName = "all_weap_inf_thermaldetonator" WeaponAmmo = 4 WeaponChannel = 1 WEAPONSECTION = 4 WeaponName = "all_weap_award_pistol" WeaponAmmo = 6 WEAPONSECTION = 5 WeaponName = "all_weap_award_rifle" WeaponAmmo = 6

The reason for the alliance weapons is so it'll be easier instead of making your own .odf's for all of the weapons, for now. The last thing you should do is copy all of the weapon .odf files (and the .odf files that have the same name as the weapon, but with ord, exp, tracer, ord1, or ord2 at the end) and paste them in your odf folder. The Soldier Models This could be the easiest part or the hardest part. It will be easy if you just use existing models and reskin them. It will be the hardest part if you decide to make your own models. Sorry I can't do anymore of this until later today because I am going to be at a party in an hour. I'll make a part 2 of this later. - EP-000782




phazon elite

Got it memorized?

50 XP

14th April 2006

0 Uploads

142 Posts

0 Threads

#2 13 years ago

Part II I'm gonna make this quick... Get the .msh, lowrez .msh (MODELNAME_low1), the .tga, and their respective .option files (get rep_inf_ep3trooper) from the rep\msh folder in the assets and place them in data_***\Sides\tut\msh. Finishing the Soldier's odf Open it up and you'll see this:

[GameObjectClass] ClassParent = "tut_inf_default_rifleman" [Properties] GeometryName = "" GeometryLowRes = "" OverrideTexture = "" FirstPerson = ""

change it to this:

[GameObjectClass] ClassParent = "tut_inf_default_rifleman" [Properties] GeometryName = "rep_inf_ep3trooper" GeometryLowRes = "rep_inf_ep3trooper_low1" FirstPerson = "rep\reptroop;rep_1st_trooper"

Save and exit Create a folder in tut\req named fpm. Now go to the rep folder in the assets again and go to rep\req\fpm. Copy the reptroop file and place it in the fpm folder you just created a minute ago. Now go to rep\msh and copy the rep_1st_trooper.msh, and its .option file and place that in tut\msh. Weapon Models and Textures Now for the last thing: getting the weapon models. Go to the assets (again, I know) and open up Sides\all\msh and copy the all_weap_inf_rifle.msh and its .option file and place that in tut\msh. Do this with all_weap_inf_pistol and all_weap_inf_thermaldetonator, too. Now go back to the assets and open up all\msh\PC. Copy the all_1st_weap_inf_rifle.tga, all_1st_weap_inf_rifle_bump.tga, and their respective .option files to tut\msh\PC. You must create a folder called PC in your msh folder before doing this. Repeat this for all_1st_weap_inf_pistol.tga. Finishing Touches Go to your .lua in data_***\Common\scripts\***\***c_con.lua. Go to a line where it says: ReadDataFile("SIDE\\tur.lvl", and go down a few lines until you're at the end of something like this: "tur_weap_built_gunturret") Press enter two times and go to the beginning of the line, press space four times, and type this:

ReadDataFile("dc:SIDE\\tut.lvl",

Then press Tab two or three times and type this:

"tut_inf_trooper")

Now go to this line:

SetHeroClass(CIS, "cis_hero_jangofett")

It should say that or (CIS, "cis_hero_darthmaul"), by the way Press enter twice from the end of that text line and type: AddUnitClass(REP, "tut_inf_trooper",1, 4) Munging Now go to data_***\_BUILD and open VisualMunge. Make sure you have tut displayed in the drop-down bar and also make sure you have the Common box checked. Munge Then you're done! Your units should be ingame. Note: The text in this tutorial for making .req's is incorrect. If you want to know how to make it correct look at another side's .req and press tab a few times so it's lined up like it should be. - EP-000782