Change ctf mod

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
DraK
Recruit Womprat Killer
Posts: 6
Joined: Fri Jun 03, 2011 6:28 am
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Change ctf mod

Post by DraK »

Hi, I choose ctf2 flags for my map, but I would like to change to 1flag. My map is advanced, and I don't want to begin again :(

Is it possible?? If yes, how??
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Change ctf mod

Post by FragMe! »

From the FAQ, lots of good information there for questions just like this.


http://www.gametoast.com/forums/viewtop ... =27&t=3755
DraK
Recruit Womprat Killer
Posts: 6
Joined: Fri Jun 03, 2011 6:28 am
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: Change ctf mod

Post by DraK »

I did it, but the new mod does not appear in the game :/
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: Change ctf mod

Post 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?
DraK
Recruit Womprat Killer
Posts: 6
Joined: Fri Jun 03, 2011 6:28 am
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: Change ctf mod

Post 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" :(
User avatar
acryptozoo
Master Bounty Hunter
Master Bounty Hunter
Posts: 1642
Joined: Wed Jun 03, 2009 3:14 pm
Projects :: Yavin Mappack
Games I'm Playing :: Homeworld 2
xbox live or psn: acryptozoo
Location: in the jungles of Yavin IV
Contact:

Re: Change ctf mod

Post 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
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: Change ctf mod

Post 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:

Code: Select all

REQN
	{
		"script"
		"kam1c_1flag"
	}
}
to this:

Code: Select all

REQN
	{
		"script"
		"ABCc_1flag"
	}
}
(once again, changing ABC to your map's three-letter name :lol: )
DraK
Recruit Womprat Killer
Posts: 6
Joined: Fri Jun 03, 2011 6:28 am
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: Change ctf mod

Post 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)

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "TTB%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c = 1, mode_1flag_g = 1, mode_1flag_c = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- 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("TTB","TTBg_con",4)
AddDownloadableContent("TTB","TTBc_con",4)
AddDownloadableContent("TTB","TTBg_1flag",4)
AddDownloadableContent("TTB","TTBc_1flag",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\TTB\\data\\_LVL_PC\\core.lvl")
My mission.req :
Hidden/Spoiler:
ucft
{
REQN
{
"config"
"ingame_movies"
}

REQN
{
"script"
"setup_teams"
"gametype_conquest"
"gametype_capture"
"Objective"
"MultiObjectiveContainer"
"ObjectiveCTF"
"ObjectiveAssault"
"ObjectiveSpaceAssault"
"ObjectiveConquest"
"ObjectiveTDM"
"ObjectiveOneFlagCTF"
"SoundEvent_ctf"
"ObjectiveGoto"
"LinkedShields"
"LinkedDestroyables"
"LinkedTurrets"
"Ambush"
"PlayMovieWithTransition"
}

REQN
{
"lvl"
"TTBg_con"
"TTBc_con"
"TTBg_1flag"
"TTBc_1flag"
}
}
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: Change ctf mod

Post by Marth8880 »

DraK wrote: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)

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "TTB%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c = 1, mode_1flag_g = 1, mode_1flag_c = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- 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("TTB","TTBg_con",4)
AddDownloadableContent("TTB","TTBc_con",4)
AddDownloadableContent("TTB","TTBg_1flag",4)
AddDownloadableContent("TTB","TTBc_1flag",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\TTB\\data\\_LVL_PC\\core.lvl")
My mission.req :
Hidden/Spoiler:
ucft
{
REQN
{
"config"
"ingame_movies"
}

REQN
{
"script"
"setup_teams"
"gametype_conquest"
"gametype_capture"
"Objective"
"MultiObjectiveContainer"
"ObjectiveCTF"
"ObjectiveAssault"
"ObjectiveSpaceAssault"
"ObjectiveConquest"
"ObjectiveTDM"
"ObjectiveOneFlagCTF"
"SoundEvent_ctf"
"ObjectiveGoto"
"LinkedShields"
"LinkedDestroyables"
"LinkedTurrets"
"Ambush"
"PlayMovieWithTransition"
}

REQN
{
"lvl"
"TTBg_con"
"TTBc_con"
"TTBg_1flag"
"TTBc_1flag"
}
}
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?
DraK
Recruit Womprat Killer
Posts: 6
Joined: Fri Jun 03, 2011 6:28 am
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: Change ctf mod

Post by DraK »

Yes, but it doesn't work :(
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: Change ctf mod

Post by Marth8880 »

DraK wrote:Yes, but it doesn't work :(
What exactly did you do? Please explain in a step-by-step process.
DraK
Recruit Womprat Killer
Posts: 6
Joined: Fri Jun 03, 2011 6:28 am
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: Change ctf mod

Post 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.
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Change ctf mod

Post 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.
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: Change ctf mod

Post 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:

Code: Select all

REQN
	{
		"script"
		"kam1c_1flag"
	}
}
to this:

Code: Select all

REQN
	{
		"script"
		"TTBc_1flag"
	}
}
Then do the same thing with TTBg_1flag.req but instead changing the Kamino part to this:

Code: Select all

REQN
	{
		"script"
		"TTBg_1flag"
	}
}
In the end, your files should look like this:

TTBc_1flag.req

Code: Select all

ucft
{
	REQN
    	{

        "config"
        "cor_movies"	

    	}

	REQN
	{
		"script"
		"TTBc_1flag"
	}
}
TTBg_1flag.req

Code: Select all

ucft
{
	REQN
    	{

        "config"
        "cor_movies"	

    	}

	REQN
	{
		"script"
		"TTBg_1flag"
	}
}
Both files should be in your map's Common\mission\ folder.
Post Reply