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

Droid Pilot Assassin
User avatar
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am

Era/Mode Side Mod Tutorial (FAQ)

Postby Sky_216 » Sat Dec 20, 2008 4:45 pm

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

High General
User avatar
Posts: 850
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Re: Era/Mode Side Mod Tutorial

Postby Commander_Fett » Sat Dec 20, 2008 4:49 pm

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?

Droid Pilot Assassin
User avatar
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am

Re: Era/Mode Side Mod Tutorial

Postby Sky_216 » Sat Dec 20, 2008 4:55 pm

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.

Master of the Force
User avatar
Posts: 3770
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Era/Mode Side Mod Tutorial

Postby Deviss » Sat Dec 20, 2008 5:07 pm

wooow perfect tutorial this must is on FAQ :thumbs:

High General
User avatar
Posts: 850
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Re: Era/Mode Side Mod Tutorial

Postby Commander_Fett » Sat Dec 20, 2008 11:27 pm

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.

Private First Class
Posts: 85
Joined: Mon Aug 04, 2008 7:20 pm
Location: South Carolina

Re: Era/Mode Side Mod Tutorial

Postby bokkenblader56 » Sun Dec 21, 2008 1:30 am

Fantastic tutorial; even I understood it! Thanks for putting in the time and effort to write this.

Sith Master
User avatar
Posts: 2584
Joined: Mon Aug 04, 2008 10:32 am
Location: Pizza Land
Projects :: TOR GCWII GCW1035
xbox live or psn: Johnny_Sciroppo

Re: Era/Mode Side Mod Tutorial

Postby Delta-1035 » Mon Dec 22, 2008 2:55 pm

thank you so much for the tut Sky, is fantastic!

Droid Pilot Assassin
User avatar
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am

Re: Era/Mode Side Mod Tutorial

Postby Sky_216 » Thu Jan 01, 2009 8:11 pm

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.

Master Bounty Hunter
User avatar
Posts: 1464
Joined: Fri Dec 11, 2009 6:24 pm
Location: minisnowta
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95

Re: Era/Mode Side Mod Tutorial (FAQ)

Postby skelltor » Tue Feb 16, 2010 5:50 pm

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.

Sith Master
User avatar
Posts: 2728
Joined: Fri Mar 27, 2009 10:23 am
Location: Does whatever a Spiderpig does
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup

Re: Era/Mode Side Mod Tutorial

Postby Darth_Spiderpig » Tue Feb 16, 2010 5:59 pm

It crashes when you open up Battlefront?

0.o

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

Master Bounty Hunter
User avatar
Posts: 1464
Joined: Fri Dec 11, 2009 6:24 pm
Location: minisnowta
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95

Re: Era/Mode Side Mod Tutorial (FAQ)

Postby skelltor » Tue Feb 16, 2010 6:05 pm

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

Droid Pilot Assassin
User avatar
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am

Re: Era/Mode Side Mod Tutorial (FAQ)

Postby Sky_216 » Tue Feb 16, 2010 8:17 pm

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.

Master Bounty Hunter
User avatar
Posts: 1464
Joined: Fri Dec 11, 2009 6:24 pm
Location: minisnowta
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95

Re: Era/Mode Side Mod Tutorial (FAQ)

Postby skelltor » Mon May 03, 2010 1:31 pm

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?

Master of the Force
User avatar
Posts: 3770
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Era/Mode Side Mod Tutorial (FAQ)

Postby Deviss » Mon May 03, 2010 1:35 pm

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

Master Bounty Hunter
User avatar
Posts: 1464
Joined: Fri Dec 11, 2009 6:24 pm
Location: minisnowta
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95

Re: Era/Mode Side Mod Tutorial (FAQ)

Postby skelltor » Mon May 03, 2010 2:37 pm

ok i might use this method than cuz otherwise the size would be huge allready just my sides alone are almost a gig.

Master of the Force
User avatar
Posts: 3770
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Era/Mode Side Mod Tutorial (FAQ)

Postby Deviss » Mon May 03, 2010 2:49 pm

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?

Master Bounty Hunter
User avatar
Posts: 1464
Joined: Fri Dec 11, 2009 6:24 pm
Location: minisnowta
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95

Re: Era/Mode Side Mod Tutorial (FAQ)

Postby skelltor » Mon May 03, 2010 3:09 pm

yah i think there are some unneeded files i can weed out.What do you mean by first person files arnt those needed?

Master of the Force
User avatar
Posts: 3770
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: Era/Mode Side Mod Tutorial (FAQ)

Postby Deviss » Mon May 03, 2010 3:35 pm

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

Master Bounty Hunter
User avatar
Posts: 1650
Joined: Fri Dec 18, 2009 8:02 am
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2

Re: Era/Mode Side Mod Tutorial (FAQ)

Postby CressAlbane » Wed May 05, 2010 8:08 pm

WOW!
This makes me want to go make me a PSM.
Maybe throw around some ideas with my buds at school....

Recruit Womprat Killer
User avatar
Posts: 11
Joined: Sun Oct 04, 2009 11:26 am

Re: Era/Mode Side Mod Tutorial (FAQ)

Postby ayodon » Thu May 06, 2010 9:38 pm

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

Next

Return to SWBF2 Modding

Who is online

Users browsing this forum: No registered users and 4 guests