Both Methods for Making your Map Mod Compatible

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
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Both Methods for Making your Map Mod Compatible

Post by Nedarb7 »

This tutorial is for those who want to make their maps mod compatible (make it so that other modders can add eras or game modes to the map from their own three letter map name).
NOTE: DO NOT USE THIS TUTORIAL AS A WAY TO ADD MODS TO OTHER PEOPLE'S MAPS UNLESS YOU HAVE THEIR PERMISSION!!!
Tutorial originally written for the BFU mod team but I figured it would be useful for the community

Open up your LUA

change this line:

ReadDataFile("dc:OOO\\OOO.lvl", "OOO_conquest")

to

ReadDataFile("OOO\\OOO.lvl", "OOO_conquest")

Create a new folder called OOO in:

Star Wars Battlefront II\GameData\DATA\_LVL_PC\

Place your OOO.lvl in:


Star Wars Battlefront II\GameData\DATA\_LVL_PC\OOO

Note: OOO replaces whatever the real three letter map name and world.lvl are.

Now all the modder needs is your LUA and perform the ordinary setup to add eras or game modes to your map. It would also be useful to make an installer and uninstaller for your map, otherwise make sure to note that the OOO containing OOO.lvl goes in: Star Wars Battlefront II\GameData\DATA\_LVL_PC\ in your readme. Easier method down further by AQT (explained in two seconds)
Last edited by Nedarb7 on Sat Mar 02, 2013 5:09 pm, edited 7 times in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Making your Map Mod Compatible (Tutorial)

Post by Marth8880 »

Wait, so like...what? What exactly is this teaching? :? I honestly cannot make any sense of it whatsoever.
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: Making your Map Mod Compatible (Tutorial)

Post by Nedarb7 »

Its a tutorial on how to make your map "modable". As I said this tutorial was originally written for the BFU mod team, since we want people to be able to add eras or game modes to the converted maps, we did this so that it is MUCH easier for the modder (also saves file space). Basically we made it like modding a stock map.

I can understand why you can't make any sense of it so I'll edit the tutorial.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Making your Map Mod Compatible (Tutorial)

Post by Maveritchell »

There's no need to add an extra folder with your map/mod to make it available to someone else. All you're doing by way of that is creating a junk folder that makes an easy install process (drop in "addon") more complicated. An "addme.script," no matter what folder it starts in, can pull .lvl data from any other folder.
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: Making your Map Mod Compatible (Tutorial)

Post by Nedarb7 »

Really? When ever I try adding an era to one of my maps (from a different three letter map name folder) following the ordinary set up they wont work unless I set up my maps like that. :? Is there a reason for that?
User avatar
Glitch25
Sergeant Major
Sergeant Major
Posts: 222
Joined: Mon May 07, 2012 1:01 pm
Projects :: [ISM] [BFU]
Games I'm Playing :: [SWBFII] [SWBFI]
Location: Baktoid Combat Automata
Contact:

Re: Making your Map Mod Compatible (Tutorial)

Post by Glitch25 »

Did you make sure you did all this?
*Note I've only tried this for side replacement.
Hidden/Spoiler:
(ABC = Pre-Existing Map Name)
(XYZ = Custom Side World Name)
(c_con is the example era/mode)

--------------------------------------------------------------------------------------------

Step 1: Create your side within a new world folder (Ex: XYZ)

--------------------------------------------------------------------------------------------

Step 2: Aquire ABCc_con.lua and add your custom units/heroes/vehicles.
Place it Here - C:\BF2_ModTools\data_\Common\scripts\XYZ

--------------------------------------------------------------------------------------------

Step 3: Add the line ABCc_con to the mission.req file under "lvl"
Located Here - C:\BF2_ModTools\data_ZCM\Common

REQN
{
"lvl"
"ABCc_con"
"cor1c_c"
"cor1c_con"
"cor1c_ctf"

--------------------------------------------------------------------------------------------

Step 4: Create a req file named ABCc_con and add the following lines.
Place it Here - C:\BF2_ModTools\data_ZCM\Common\mission

ucft
{
REQN
{
"script"
"ABCc_con"
}
}

--------------------------------------------------------------------------------------------

Step 5: Add the following lines to the addme.lua file (These need to be placed correctly)
Located Here - C:\BF2_ModTools\data_XYZ\addme

Under the the first line that says AddNewGameModes (.....etc) Place this
AddNewGameModes( sp_missionselect_listbox_contents, "ABCc_con", {era_c = 1, mode_con_c = 1,} )

Under the the first line that says AddDownloadableContent (.....etc) Place this
AddDownloadableContent("ABC","ABCc_con",4)

--------------------------------------------------------------------------------------------

Step 6: Munge your custom side and make sure the XYZ map name was placed in
C:\Program Files (x86)\Steam\SteamApps\common\Star Wars Battlefront II\GameData\Addon
C:\Program Files (x86)\LucasArts\Star Wars Battlefront II\GameData\Addon
And that you have the pre-existing map in the addon folder as well.

--------------------------------------------------------------------------------------------

****Additional Notes*****
-I did not include any information on how to setup the side within the mission.lua files.

-To remove the pre-set map that goes along with munging a new side simply remove the following

1. Delete everything that lies in this folder C:\BF2_ModTools\data_XYZ\Worlds\XYZ

2. Delete these files from C:\BF2_ModTools\data_XYZ\Common\scripts\XYZ
XYZc_con.lua
XYZg_con.lua

3. Remove these lines from the mission.req file
"XYZc_con"
"XYZg_con"

4. Delete these files from C:\BF2_ModTools\data_ZCM\Common\mission
XYZc_con.req
XYZg_con.req

5. Remove these lines from the addme.lua file
AddNewGameModes( sp_missionselect_listbox_contents, "XYZc_con", {era_c = 1, mode_con_c = 1,} )
AddNewGameModes( sp_missionselect_listbox_contents, "XYZg_con", {era_g = 1, mode_con_g = 1,} )
AddDownloadableContent("XYZ","XYZc_con",4)
AddDownloadableContent("XYZ","XYZg_con",4)

--------------------------------------------------------------------------------------------
User avatar
EliteJay
Private Second Class
Posts: 62
Joined: Tue Nov 13, 2012 2:56 pm
Projects :: Star Destroyer V1.0
Games I'm Playing :: SWBFII SWRC
xbox live or psn: No gamertag set
Contact:

Re: Making your Map Mod Compatible (Tutorial)

Post by EliteJay »

Wait so basically you mean add a era to the map.
User avatar
Glitch25
Sergeant Major
Sergeant Major
Posts: 222
Joined: Mon May 07, 2012 1:01 pm
Projects :: [ISM] [BFU]
Games I'm Playing :: [SWBFII] [SWBFI]
Location: Baktoid Combat Automata
Contact:

Re: Making your Map Mod Compatible (Tutorial)

Post by Glitch25 »

That tutorial allows you to add custom sides to mod maps that are already in your addon folder. It cannot be done without the mission.lua files (Unless of course you can re-create them) which is why for BFU, we are releasing the files needed. I'm not sure if that works the same way for adding eras, may be a few additional changes.
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: Making your Map Mod Compatible (Tutorial)

Post by Nedarb7 »

I did all of that :? .
Hidden/Spoiler:
(ABC = Pre-Existing Map Name)
(XYZ = Custom Side World Name)
(c_con is the example era/mode)

--------------------------------------------------------------------------------------------

Step 1: Create your side within a new world folder (Ex: XYZ)

--------------------------------------------------------------------------------------------

Step 2: Aquire ABCc_con.lua and add your custom units/heroes/vehicles.
Place it Here - C:\BF2_ModTools\data_\Common\scripts\XYZ

--------------------------------------------------------------------------------------------

Step 3: Add the line ABCc_con to the mission.req file under "lvl"
Located Here - C:\BF2_ModTools\data_ZCM\Common

REQN
{
"lvl"
"ABCc_con"
"cor1c_c"
"cor1c_con"
"cor1c_ctf"

--------------------------------------------------------------------------------------------

Step 4: Create a req file named ABCc_con and add the following lines.
Place it Here - C:\BF2_ModTools\data_ZCM\Common\mission

ucft
{
REQN
{
"script"
"ABCc_con"
}
}

--------------------------------------------------------------------------------------------

Step 5: Add the following lines to the addme.lua file (These need to be placed correctly)
Located Here - C:\BF2_ModTools\data_XYZ\addme

Under the the first line that says AddNewGameModes (.....etc) Place this
AddNewGameModes( sp_missionselect_listbox_contents, "ABCc_con", {era_c = 1, mode_con_c = 1,} )

Under the the first line that says AddDownloadableContent (.....etc) Place this
AddDownloadableContent("ABC","ABCc_con",4)

--------------------------------------------------------------------------------------------

Step 6: Munge your custom side and make sure the XYZ map name was placed in
C:\Program Files (x86)\Steam\SteamApps\common\Star Wars Battlefront II\GameData\Addon
C:\Program Files (x86)\LucasArts\Star Wars Battlefront II\GameData\Addon
And that you have the pre-existing map in the addon folder as well.

--------------------------------------------------------------------------------------------

****Additional Notes*****
-I did not include any information on how to setup the side within the mission.lua files.

-To remove the pre-set map that goes along with munging a new side simply remove the following

1. Delete everything that lies in this folder C:\BF2_ModTools\data_XYZ\Worlds\XYZ

2. Delete these files from C:\BF2_ModTools\data_XYZ\Common\scripts\XYZ
XYZc_con.lua
XYZg_con.lua

3. Remove these lines from the mission.req file
"XYZc_con"
"XYZg_con"

4. Delete these files from C:\BF2_ModTools\data_ZCM\Common\mission
XYZc_con.req
XYZg_con.req

5. Remove these lines from the addme.lua file
AddNewGameModes( sp_missionselect_listbox_contents, "XYZc_con", {era_c = 1, mode_con_c = 1,} )
AddNewGameModes( sp_missionselect_listbox_contents, "XYZg_con", {era_g = 1, mode_con_g = 1,} )
AddDownloadableContent("XYZ","XYZc_con",4)
AddDownloadableContent("XYZ","XYZg_con",4)

--------------------------------------------------------------------------------------------
I could have done something wrong though. I'll try and see if I can get it to work.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Making your Map Mod Compatible (Tutorial)

Post by AQT »

This is how you load something from someone else's map/mod located in the addon folder:

Code: Select all

ReadDataFile("..\\..\\addon\\***\\data\\_LVL_PC\\ingame.lvl")
The example shown loads the ingame.lvl, but the directory location can be changed to load a map .lvl, side .lvl, etc.
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: Making your Map Mod Compatible (Tutorial)

Post by Nedarb7 »

Thank you AQT that helps a ton :D . So this tutorial is pointless I guess (unless you want to use it rather than the basic method).
Post Reply