Modding stock map lua scripts [Solved]

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

Post Reply
danman9
Recruit Womprat Killer
Posts: 12
Joined: Thu Jan 31, 2013 12:05 am
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Modding stock map lua scripts [Solved]

Post by danman9 »

I have been searching and searching for how to use moded stock scripts but come up empty. I understand how to mod them and have done so with shipped map lua scripts. What I cant figure out is where to put things after I munge the stock map scripts. If there is a walkthrough for this please forgive me but I cant seem to find one.
My goal is to add new classes to stock maps but I cant seem to find out what to do affter the lua scripting is done and munged.
Last edited by danman9 on Tue Aug 27, 2013 2:05 pm, edited 1 time in total.
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: modding stock map lua scripts

Post by Locutus »

It's pretty simple.
Create a new map and copy all the stock scripts to ...\data_MAP\Common\scripts\MAP and edit them as you like. Then add all the names of the modified scripts to mission.req in ...\data_Data\Common and you're done.
This way you don't need to replace the original files.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: modding stock map lua scripts

Post by lucasfart »

To expand on what Locotus said, just look at this tutorial: Era/Mode Side Mod Tutorial (FAQ). It is intended for custom era's/modes, but you could essentially do the same thing for the stock maps modes... (You're actually better off making a custom era, but the choice is yours. :)
Sky_216 wrote: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.
danman9
Recruit Womprat Killer
Posts: 12
Joined: Thu Jan 31, 2013 12:05 am
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: modding stock map lua scripts

Post by danman9 »

Worked like a charm thanks guys.
Post Reply