SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF2 Modding => Topic started by: i2Bros on December 23, 2017, 09:36:50 AM

Title: How do I add space battles?
Post by: i2Bros on December 23, 2017, 09:36:50 AM
I know it looks like a dumb question, but I can't seem to be able to add them in my mod, check this

[spoiler]

--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

--add my modes to the singleplayer map selection screen

AddNewGameModes( sp_missionselect_listbox_contents, "tan1%s_%s", {era_x = 1, mode_con_x = 1, change = { era_x = { name="Sequel Trilogy"},},})
AddNewGameModes( mp_missionselect_listbox_contents, "tan1%s_%s", {era_x = 1, mode_con_x = 1, change = { era_x = { name="Sequel Trilogy"},},})

AddNewGameModes( sp_missionselect_listbox_contents, "spa1%s_%s", {era_x = 1, mode_ass_x = 1, change = { era_x = { name="Sequel Trilogy"},},})
AddNewGameModes( mp_missionselect_listbox_contents, "spa1%s_%s", {era_x = 1, mode_ass_x = 1, change = { era_x = { name="Sequel Trilogy"},},})

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier.  the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("tan1","tan1x_con",4)
AddDownloadableContent("spa","spa1x_ass",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\TLJ\\data\\_LVL_PC\\core.lvl")[/spoiler]

What am I doing wrong?
Title: Re: How do I add space battles?
Post by: Ascertes on December 25, 2017, 01:45:53 PM
The only thing I'm noticing is this part right here:
AddDownloadableContent("tan1","tan1x_con",4)
AddDownloadableContent("spa","spa1x_ass",4)


IIRC, doesn't it usually follow the format of "c" and "g" to denote Clone wars/GCw instead of "x"? So it would look like:
AddDownloadableContent("tan1","tan1c_con",4)
AddDownloadableContent("spa","spa1c_ass",4)


I'm not familiar with adding mods to existing maps, so maybe idk what I'm talking about...
EhPortal 1.34 © 2024, WebDev