If you look at the top of every single addme.lua, you'll notice a function mentioned and described called AddNewGameModes. You use this function to tell the game to open up a slot an a preexisting map and then with the AddDownloadableContent function, you assign whatever your script name is to the map you wish it to be on. If you don't do the first part and only do the second, then a duplicate map will show up.
For example, I can create a new world called ABC. In data_ABC, I find the script ABCg_con.lua. Here, to make sure that things like death regions are included, copy the contents of the Lua file for whichever map and game mode you are trying to replicate into your Lua file. For example, copying Kamino, I take kam1g_con.lua, copy everything inside, and paste it on top of everything in ABCg_con.lua, deleting the original contents of ABCg_con.lua. Now I change the sides to whatever I want them to be in the Lua script. The last thing to change is the addme.lua which should look like this:
Code: Select all
AddNewGameModes(sp_missionselect_listbox_contents, "nab1%s_%s", {era_g = 1, mode_con2_g = 1})
AddNewGameModes(mp_missionselect_listbox_contents, "nab2%s_%s", {era_g = 1, mode_con2_g = 1})
AddDownloadableContent("KAM1","ABCg_con",4)
This adds the mode to both single player and multi player. Notice I used the mode name "con2" since I don't want to overwrite (would it overwrite the original?) the original game mode. Now "con2" doesn't exist as a mode, so you'll want to make it a mode that does exist, or see Zerted's documentation for the 1.3 patch to make your own mode.
Mind you, I haven't checked this myself to make sure it works, but I'm fairly sure it's correct and not at my modding computer for the moment. If you're wondering, it's the same process that ARC_commander used to create BFX and if you care to search the site, you'll find his addme.lua posted somewhere.