Era/Mode Side Mod Tutorial (FAQ)

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Era/Mode Side Mod Tutorial (FAQ)

Post 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....
Commander_Fett
High General
High General
Posts: 847
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Re: Era/Mode Side Mod Tutorial

Post 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?
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Era/Mode Side Mod Tutorial

Post 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.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Era/Mode Side Mod Tutorial

Post by Deviss »

wooow perfect tutorial this must is on FAQ :thumbs:
Commander_Fett
High General
High General
Posts: 847
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Re: Era/Mode Side Mod Tutorial

Post 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)?
Last edited by Commander_Fett on Sun Dec 21, 2008 3:20 pm, edited 2 times in total.
bokkenblader56
Private First Class
Posts: 85
Joined: Mon Aug 04, 2008 7:20 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: South Carolina
Contact:

Re: Era/Mode Side Mod Tutorial

Post by bokkenblader56 »

Fantastic tutorial; even I understood it! Thanks for putting in the time and effort to write this.
User avatar
Delta-1035
Sith Master
Sith Master
Posts: 2651
Joined: Mon Aug 04, 2008 10:32 am
Projects :: TOR GCWII GCW1035 BF1035
xbox live or psn: Johnny_Sciroppo
Location: Pizza Land

Re: Era/Mode Side Mod Tutorial

Post by Delta-1035 »

thank you so much for the tut Sky, is fantastic!
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Era/Mode Side Mod Tutorial

Post 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.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Era/Mode Side Mod Tutorial (FAQ)

Post 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.
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: Era/Mode Side Mod Tutorial

Post 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.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Era/Mode Side Mod Tutorial (FAQ)

Post 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
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Era/Mode Side Mod Tutorial (FAQ)

Post 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.
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Era/Mode Side Mod Tutorial (FAQ)

Post 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?
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Era/Mode Side Mod Tutorial (FAQ)

Post 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
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Era/Mode Side Mod Tutorial (FAQ)

Post 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.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Era/Mode Side Mod Tutorial (FAQ)

Post 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?
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: Era/Mode Side Mod Tutorial (FAQ)

Post 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?
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Era/Mode Side Mod Tutorial (FAQ)

Post 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
CressAlbane
Master Bounty Hunter
Master Bounty Hunter
Posts: 1519
Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı

Re: Era/Mode Side Mod Tutorial (FAQ)

Post by CressAlbane »

WOW!
This makes me want to go make me a PSM.
Maybe throw around some ideas with my buds at school....
User avatar
ayodon
Recruit Womprat Killer
Posts: 11
Joined: Sun Oct 04, 2009 11:26 am

Re: Era/Mode Side Mod Tutorial (FAQ)

Post by ayodon »

Thank you! :bowdown: I've been trying to make my own era for awhile. :D
Post Reply