Page 1 of 3

Era/Mode Side Mod Tutorial (FAQ)

Posted: Sat Dec 20, 2008 4:45 pm
by Sky_216
How To Make A 'Pseudo' Side Mod (aka Era mod or mode mod)

First, just clearing a few things:

What a Pseudo Side Mod does:
+Adds an era or mode (or both) to shipped maps. For example, I made sides for an era supported by 1.3 patch, x (extended civil war), and added it to all the shipped maps. It uses my custom units rather than normal units. Another exsample of a PSM is BFX (I think).

Advantages over normal side mod:
+Online compatible.
+Greater control over what units/heroes are loaded into each map.
+Can add extra modes (eg hunt on Death Star). You can use ]v['s +123 source files for this.

Disadvantages:
+Takes more time.

First things first:
Create some custom sides (not 100% necessary, but you should do it).
Create a map that will be both your test map (if you haven't got one already) and your way of loading yor era/modes to stock maps.


Anyway, once you've done the above two things, it's time to add your era/mod to stock maps. Here's what to do:

1) Download Zerted's 1.3 patch r117. Lite version will do. Get it at SWBF Files. (If you haven't got it already).
2) Copy the scripts of the maps you want a mod for to your map's script's folder (where things like your map's conquest script and so on are). Eg copy myg1c_con to your maps folder.
3) Modify those scripts. So if, say, you have a custom republic side you'd like to load, replace the section that loads troops and the section that sets up the troops for teams. Here's an example of how I did it for XCW mygeeto:

Replaced this (loads the units gcw mygeeto conquest uses):
Hidden/Spoiler:
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_hero_luke_jedi",
"all_inf_wookiee",
"all_hover_combatspeeder")

ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_officer",
"imp_inf_sniper",
"imp_inf_engineer",
"imp_inf_dark_trooper",
"imp_hero_bobafett",
"imp_hover_fightertank",
"imp_walk_atst")
With this (loads my units from my map's side folder):
Hidden/Spoiler:
ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_rifleman_snow",
"all_inf_rocketeer_snow",
"all_inf_sniper_snow",
"all_hover_combatspeeder",
"all_inf_engineer_snow",
"all_inf_officer_snow",
"all_inf_wookiee_snow",
"all_inf_infiltrator_snow",
"all_inf_assassin",
"all_inf_captain_snow")

ReadDataFile("dc:SIDE\\imp.lvl",
"imp_hero_darthvader",
"imp_hover_fightertank",
"imp_inf_rifleman_snow",
"imp_inf_officer",
"imp_inf_engineer_snow",
"imp_inf_dark_trooper",
"imp_inf_shock",
"imp_inf_medic",
"imp_inf_rocketeer_snow",
"imp_inf_sniper_snow" )
And replaced this (sets up units):
Hidden/Spoiler:
SetupTeams{

all={
team = ALL,
units = 32,
reinforcements = 150,
soldier = {"all_inf_rifleman",9, 25},
assault = {"all_inf_rocketeer",1, 4},
engineer = {"all_inf_engineer",1, 4},
sniper = {"all_inf_sniper",1, 4},
officer = {"all_inf_officer",1, 4},
special = {"all_inf_wookiee",1, 4},


},

imp={
team = IMP,
units = 32,
reinforcements = 150,
soldier = {"imp_inf_rifleman", 9, 25},
assault = {"imp_inf_rocketeer", 1, 4},
engineer = {"imp_inf_engineer", 1, 4},
sniper = {"imp_inf_sniper", 1, 4},
officer = {"imp_inf_officer",1, 4},
special = {"imp_inf_dark_trooper",1, 4},
}
}


-- Hero Setup --

SetHeroClass(IMP, "imp_hero_bobafett")
SetHeroClass(ALL, "all_hero_luke_jedi")
With this (sets up my units):
Hidden/Spoiler:
SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "all_inf_rifleman_snow",9, 25},
assault = { "all_inf_rocketeer_snow",1,4},
engineer = { "all_inf_engineer_snow",1,4},
sniper = { "all_inf_sniper_snow",1,4},
officer = { "all_inf_officer_snow",1,4},
special = { "all_inf_captain_snow",1,4},

},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { "imp_inf_rifleman_snow",9, 25},
assault = { "imp_inf_rocketeer_snow",1,4},
engineer = { "imp_inf_engineer_snow",1,4},
sniper = { "imp_inf_sniper_snow",1,4},
officer = { "imp_inf_medic",1,4},
special = { "imp_inf_officer",1,4},
}
}

AddUnitClass(IMP, "imp_inf_shock",1,4)
AddUnitClass(IMP, "imp_inf_dark_trooper",1,4)
AddUnitClass(ALL, "all_inf_wookiee_snow",1,4)
AddUnitClass(ALL, "all_inf_assassin",1,4)

-- Hero Setup --

SetHeroClass(IMP, "imp_hero_darthvader")
SetHeroClass(ALL, "all_inf_infiltrator_snow")
For this kind of thing where you just edit the units/vehicles (rather than things like CPs) then that's all you gotta do. But, do get it to actually show up you'll need to do the following.

Now, time to make that custom script you made actually playable!

6) Go to your 'mission'.req file (in the 'common' folder in your map) and edit the script files it says. It should have something along the lines of 'XXXc_con', 'XXXg_con' (where XXX is your maps three letter id). Add the name of the script you modified. So if you added era 'a' to mygeeto conquest, add 'myg1a_con' to your mission req.
7) You'll need to add a req file for that mode to your data_XXX/Common/mission folder. This contains the req files for all stock scripts. Say we added a script called 'myg1a_con.' Copy the 'myg1g_con', rename it 'myg1a_con', open it, change the line 'myg1g_con' to 'myg1a_con'.
8) Change your addme lua. RED51 explains how to do it in this link.
9) Repeat steps 5, 6 and 7 for any scripts you have.
10) Munge and play.

If it worked, you should see your new era as selectable on the instant action screen.


I'll add a bit on how to edit the name of the era/mode you use ,and some screens soon....

Re: Era/Mode Side Mod Tutorial

Posted: Sat Dec 20, 2008 4:49 pm
by Commander_Fett
Sweet, this will be really helpful in my Mandalorian Wars mod. If you don't mind me asking, how would I change the team names?

Re: Era/Mode Side Mod Tutorial

Posted: Sat Dec 20, 2008 4:55 pm
by Sky_216
You have to localise them. Open editlocalize, find the teams you are using (should come up as things like 'ALL' or 'REP' etc) and change the localised names. Then edit the 'firstnames' and 'lastnames' (eg for rebels things like thrak goshun etc) and change them to more errr...mandorlin-y names.

Re: Era/Mode Side Mod Tutorial

Posted: Sat Dec 20, 2008 5:07 pm
by Deviss
wooow perfect tutorial this must is on FAQ :thumbs:

Re: Era/Mode Side Mod Tutorial

Posted: Sat Dec 20, 2008 11:27 pm
by Commander_Fett
wait, so I can do this and it won't change the stock ones? Sweet! Could I do this for a custom side? And, if you don't mind me asking, how would I change the icon for the mode (not cp icon, the one on era select)?

Re: Era/Mode Side Mod Tutorial

Posted: Sun Dec 21, 2008 1:30 am
by bokkenblader56
Fantastic tutorial; even I understood it! Thanks for putting in the time and effort to write this.

Re: Era/Mode Side Mod Tutorial

Posted: Mon Dec 22, 2008 2:55 pm
by Delta-1035
thank you so much for the tut Sky, is fantastic!

Re: Era/Mode Side Mod Tutorial

Posted: Thu Jan 01, 2009 8:11 pm
by Sky_216
Somewhat Off-topic: Here's a weird experience I just had...having to use a tutorial you wrote to do something you forgot how to do.

Re: Era/Mode Side Mod Tutorial (FAQ)

Posted: Tue Feb 16, 2010 5:50 pm
by skelltor
I tried to do what it said but when i put the map in the addon folder and opened battle front i got a ctd help please.

Re: Era/Mode Side Mod Tutorial

Posted: Tue Feb 16, 2010 5:59 pm
by Darth_Spiderpig
It crashes when you open up Battlefront?

0.o

You exceeded the mission max, try to remove some stuff from your addon folder.

Re: Era/Mode Side Mod Tutorial (FAQ)

Posted: Tue Feb 16, 2010 6:05 pm
by skelltor
no i dont think it is to many missions cuz b4 when i get to many missions in the addon i get an thing that pops up saying to many mission 508 of 500 or somthing like that

Re: Era/Mode Side Mod Tutorial (FAQ)

Posted: Tue Feb 16, 2010 8:17 pm
by Sky_216
skelltor wrote:no i dont think it is to many missions cuz b4 when i get to many missions in the addon i get an thing that pops up saying to many mission 508 of 500 or somthing like that
You messed up the addme.lua. Doing that'll cause BF2 to crash.

Re: Era/Mode Side Mod Tutorial (FAQ)

Posted: Mon May 03, 2010 1:31 pm
by skelltor
and you only need one map right? you dont need to have a new map for each stock map that your adding the era to do you?

Re: Era/Mode Side Mod Tutorial (FAQ)

Posted: Mon May 03, 2010 1:35 pm
by Deviss
skelltor wrote:and you only need one map right? you dont need to have a new map for each stock map that your adding the era to do you?
no you dont need map for them, only via lua and can use the stock ones :P

Re: Era/Mode Side Mod Tutorial (FAQ)

Posted: Mon May 03, 2010 2:37 pm
by skelltor
ok i might use this method than cuz otherwise the size would be huge allready just my sides alone are almost a gig.

Re: Era/Mode Side Mod Tutorial (FAQ)

Posted: Mon May 03, 2010 2:49 pm
by Deviss
skelltor wrote:ok i might use this method than cuz otherwise the size would be huge allready just my sides alone are almost a gig.
maybe your side are big by:
unneeded files on it?
first person files on it?
big textures unneeded because you can rezise them?

Re: Era/Mode Side Mod Tutorial (FAQ)

Posted: Mon May 03, 2010 3:09 pm
by skelltor
yah i think there are some unneeded files i can weed out.What do you mean by first person files arnt those needed?

Re: Era/Mode Side Mod Tutorial (FAQ)

Posted: Mon May 03, 2010 3:35 pm
by Deviss
skelltor wrote:yah i think there are some unneeded files i can weed out.What do you mean by first person files arnt those needed?
for example you dont need the first person stock bf2 in your side folder XD

Re: Era/Mode Side Mod Tutorial (FAQ)

Posted: Wed May 05, 2010 8:08 pm
by CressAlbane
WOW!
This makes me want to go make me a PSM.
Maybe throw around some ideas with my buds at school....

Re: Era/Mode Side Mod Tutorial (FAQ)

Posted: Thu May 06, 2010 9:38 pm
by ayodon
Thank you! :bowdown: I've been trying to make my own era for awhile. :D