Page 1 of 1

Both Methods for Making your Map Mod Compatible

Posted: Thu Feb 28, 2013 5:55 pm
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)

Re: Making your Map Mod Compatible (Tutorial)

Posted: Thu Feb 28, 2013 9:28 pm
by Marth8880
Wait, so like...what? What exactly is this teaching? :? I honestly cannot make any sense of it whatsoever.

Re: Making your Map Mod Compatible (Tutorial)

Posted: Thu Feb 28, 2013 10:49 pm
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.

Re: Making your Map Mod Compatible (Tutorial)

Posted: Sat Mar 02, 2013 2:19 am
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.

Re: Making your Map Mod Compatible (Tutorial)

Posted: Sat Mar 02, 2013 11:45 am
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?

Re: Making your Map Mod Compatible (Tutorial)

Posted: Sat Mar 02, 2013 1:52 pm
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)

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

Re: Making your Map Mod Compatible (Tutorial)

Posted: Sat Mar 02, 2013 2:28 pm
by EliteJay
Wait so basically you mean add a era to the map.

Re: Making your Map Mod Compatible (Tutorial)

Posted: Sat Mar 02, 2013 2:42 pm
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.

Re: Making your Map Mod Compatible (Tutorial)

Posted: Sat Mar 02, 2013 2:51 pm
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.

Re: Making your Map Mod Compatible (Tutorial)

Posted: Sat Mar 02, 2013 4:44 pm
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.

Re: Making your Map Mod Compatible (Tutorial)

Posted: Sat Mar 02, 2013 5:06 pm
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).