I did it, but the new mod does not appear in the game :/
Re: Change ctf mod
Posted: Fri Jun 03, 2011 3:48 pm
by Marth8880
DraK wrote:I did it, but the new mod does not appear in the game :/
Did you adjust your addme.lua and mission.req files and did you add ABCc_1flag.req and/or ABCg_1flag.req (where ABC is your map's three-letter name) to your Mission folder?
Re: Change ctf mod
Posted: Fri Jun 03, 2011 5:43 pm
by DraK
I adjusted addme.lua and mission.req and the mode appears!! But I don't find ABCc1_flag.req and the map bug when I launch it: "Could not open MISSION/ABCc_1flag.lvl"
Re: Change ctf mod
Posted: Fri Jun 03, 2011 7:09 pm
by acryptozoo
DraK wrote:I adjusted addme.lua and mission.req and the mode appears!! But I don't find ABCc1_flag.req and the map bug when I launch it: "Could not open MISSION/ABCc_1flag.lvl"
post your addme.lua and mission.req
and
your ABCc1_flag.req should be
in your Data_ABC/common/mission folder
Re: Change ctf mod
Posted: Fri Jun 03, 2011 9:18 pm
by Marth8880
DraK wrote:I adjusted addme.lua and mission.req and the mode appears!! But I don't find ABCc1_flag.req and the map bug when I launch it: "Could not open MISSION/ABCc_1flag.lvl"
Make a copy of another map's REQ file for the mode - for example, kam1c_1flag.req - and rename it to ABCc_1flag and/or ABCg_1flag (again, replacing ABC with your map's three-letter name). Then open, it up, and change this part of the script:
(once again, changing ABC to your map's three-letter name )
Re: Change ctf mod
Posted: Sat Jun 04, 2011 5:17 am
by DraK
There is always the same problem :/
My addme.lua :
Hidden/Spoiler:
--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end
--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)
-- 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)
--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end
--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)
-- 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)
Did you do what I just told you to do? You have your addme LUA and mission REQ set up properly but did you add TTBc_1flag.req and TTBg_1flag.req to your mission folder?
Re: Change ctf mod
Posted: Sat Jun 04, 2011 5:17 pm
by DraK
Yes, but it doesn't work
Re: Change ctf mod
Posted: Sat Jun 04, 2011 6:05 pm
by Marth8880
DraK wrote:Yes, but it doesn't work
What exactly did you do? Please explain in a step-by-step process.
Re: Change ctf mod
Posted: Sat Jun 04, 2011 6:17 pm
by DraK
Ok.
I did teancum's tutorial to add the mode 1flag to my map. Then I adjusted addme.lua and mission.req. In addition I changed kam1c_1flag & kam1g_1flag to TTBc_1flag & TTBg_1flag which I put in data_TTB/Common/mission.
Re: Change ctf mod
Posted: Sat Jun 04, 2011 6:31 pm
by DarthD.U.C.K.
for adding the general gamemode scripts, you should follow the adding hunt tutorial. the mission luas belong into the data_XXX\Common\scripts\XXX folder.
Re: Change ctf mod
Posted: Sat Jun 04, 2011 7:53 pm
by Marth8880
DraK wrote:Ok.
I did teancum's tutorial to add the mode 1flag to my map. Then I adjusted addme.lua and mission.req. In addition I changed kam1c_1flag & kam1g_1flag to TTBc_1flag & TTBg_1flag which I put in data_TTB/Common/mission.
Did you read what I posted yesterday?
Marth8880 wrote:...Then open [TTBc_1flag.req] up, and change this part of the script: