Adding an Era to All Maps
Posted: Sat Jul 18, 2009 12:30 pm
I want to add a new era to every original BF2 map, like in the conversion pack. How do I do this?
well first to all, install patch 1.3, then create a mod, and on addme.lua add for example era AFierfek wrote:I want to add a new era to every original BF2 map, like in the conversion pack. How do I do this?
And in english?DEVISS-REX wrote:well first to all, install patch 1.3, then create a mod, and on addme.lua add for example era AFierfek wrote:I want to add a new era to every original BF2 map, like in the conversion pack. How do I do this?
AddNewGameModes( sp_missionselect_listbox_contents, "mus1%s_%s", {era_a = 1, mode_con_a = 1})
and add the mission.lua files to your mission.req
so sorry no problem, i am bad explain things for this reason i use examples:Fierfek wrote:And in english?
Sorry, I really didn't understand much of that.
Code: Select all
--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 the new gamemodes or maps here for pre-existing maps:
AddNewGameModes( sp_missionselect_listbox_contents, "mus1%s_%s", {era_a = 1, mode_con_a = 1})
--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)
sp_n = table.getn(sp_missionselect_listbox_contents)
sp_missionselect_listbox_contents[sp_n+1] = { mapluafile = "bes2%s_%s", era_y = 1, mode_con_y = 1, change = {era_y = { name="50th Gamma Legion", icon2="mode_icon_ord66" },},}
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("MUS1","mus1a_con",4)
-- all done
newEntry = nil
n = nil
-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\ABC\\data\\_LVL_PC\\core.lvl")Code: Select all
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"
"mus1a_con"
}
}I'll post instructions in different colours.AddNewGameModes( sp_missionselect_listbox_contents, "mus1%s_%s", {era_a = 1, mode_con_a = 1})
But this is just for my map, right? How do I add an era to all stock maps? I want to for a mod I am making - because I want it to be compatible with sides mods (I don't want to replace the rep and cis sides, I want to add a new era).DEVISS-REX wrote:Hidden/Spoiler:
well is simple, repeat the same process with all maps so add the same lines but change for example for mygeeto put myg1%s_%s then myg1 for example this is my addme.lua, i have new eras for some maps:Fierfek wrote:But this is just for my map, right? How do I add an era to all stock maps? I want to for a mod I am making - because I want it to be compatible with sides mods (I don't want to replace the rep and cis sides, I want to add a new era).
Woah, looks pretty complicated. Maybe I'll just start with a sides mod....DEVISS-REX wrote:well is simple, repeat the same process with all maps so add the same lines but change for example for mygeeto put myg1%s_%s then myg1 for example this is my addme.lua, i have new eras for some maps:Fierfek wrote:But this is just for my map, right? How do I add an era to all stock maps? I want to for a mod I am making - because I want it to be compatible with sides mods (I don't want to replace the rep and cis sides, I want to add a new era).Hidden/Spoiler:
no, no is complicated because i can did it lol, if you like i could make the addme.lua for you and you only should create the mission files as you likeFierfek wrote:Woah, looks pretty complicated. Maybe I'll just start with a sides mod....
Ah, thanks, but you don't have to do that. I don't know how to do the mission thing anyway.DEVISS-REX wrote:no, no is complicated because i can did it lol, if you like i could make the addme.lua for you and you only should create the mission files as you likeFierfek wrote:Woah, looks pretty complicated. Maybe I'll just start with a sides mod....
well also can help you how to do mission files, is simple use the original for example myg1c_con found in assets - scripts and modify itFierfek wrote:Ah, thanks, but you don't have to do that. I don't know how to do the mission thing anyway.
Oh, you mean lua file? I thought you meant to mission.lvl file.DEVISS-REX wrote:well also can help you how to do mission files, is simple use the original for example myg1c_con found in assets - scripts and modify itFierfek wrote:Ah, thanks, but you don't have to do that. I don't know how to do the mission thing anyway., please don't surrender always can learn new things
yes, cool i will use N letters for don't have troubles with others modsFierfek wrote:Oh, you mean lua file? I thought you meant to mission.lvl file.
I know all about luas. Okay, so then can you please make the addme for me? Make the era letter whatever you want.
Could you please make it CW Spec Ops? Thanks.DEVISS-REX wrote:yes, cool i will use N letters for don't have troubles with others modsFierfek wrote:Oh, you mean lua file? I thought you meant to mission.lvl file.
I know all about luas. Okay, so then can you please make the addme for me? Make the era letter whatever you want.i will send you a PM with the addme.lua soon
, also i can put custom name to new era, what do you like??
yes no problemFierfek wrote:Could you please make it CW Spec Ops? Thanks.DEVISS-REX wrote:yes, cool i will use N letters for don't have troubles with others modsFierfek wrote:Oh, you mean lua file? I thought you meant to mission.lvl file.
I know all about luas. Okay, so then can you please make the addme for me? Make the era letter whatever you want.i will send you a PM with the addme.lua soon
, also i can put custom name to new era, what do you like??
Thanks, man. What would I do without gametoast?DEVISS-REX wrote:yes no problemFierfek wrote:Could you please make it CW Spec Ops? Thanks.DEVISS-REX wrote:yes, cool i will use N letters for don't have troubles with others modsFierfek wrote:Oh, you mean lua file? I thought you meant to mission.lvl file.
I know all about luas. Okay, so then can you please make the addme for me? Make the era letter whatever you want.i will send you a PM with the addme.lua soon
, also i can put custom name to new era, what do you like??
, also i will send you the mission.req file
mm sleep? lol maybe play other gameFierfek wrote:Thanks, man. What would I do without gametoast?
mm a few late no? lol wow i dk the mission limits thanksFrisbeetarian wrote:For an example of how to do you, you could also look at ARC_Commander's stuff for BFX:
http://www.gametoast.com/forums/viewtop ... 67#p262467