Adding BFX
Posted: Wed Feb 10, 2010 5:52 pm
Could someone please tell me how to add BFX to my map ( i already have got the assets ). if it helps, i am going to use Galactic Marines
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 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 = "ABC%s_%s", era_g = 1, era_c = 1, era_a = 1, mode_con_a = 1, mode_con_g = 1, mode_con_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("ABC","ABCg_con",4)
AddDownloadableContent("ABC","ABCc_con",4)
AddDownloadableContent("ABC","ABCa_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"
"ABCg_con"
"ABCc_con"
[color=#004000]"ABCa_con"[/color] ---this line
}
}Code: Select all
ucft
{
REQN
{
"config"
"cor_movies"
}
REQN
{
"script"
"ABCa_con"
}
}Code: Select all
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_hover_fightertank",
"rep_hero_anakin",
"rep_hover_barcspeeder")
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_inf_officer",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_hover_aat")
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower")
SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep3_rifleman",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},
},
cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}
SetHeroClass(CIS, "cis_hero_darthmaul")
SetHeroClass(REP, "rep_hero_anakin")Code: Select all
ReadDataFile("SIDE\\BFX\\rep.lvl",
"rep_inf_ep3_rifleman",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_inf_commando",
"rep_inf_barc",
"rep_inf_ep2_commander",
"rep_walk_atte",
"rep_walk_atxt",
"rep_hero_kiyadimundi")
ReadDataFile("SIDE\\BFX\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_pilot",
"cis_inf_sniper",
"cis_hover_stap",
"cis_fly_dsf",
"cis_inf_officer",
"cis_inf_droideka",
"cis_inf_recon",
"cis_inf_droideka",
"cis_inf_magnaguard",
"cis_inf_commander",
"cis_hero_countdooku")
ReadDataFile("SIDE\\BFX\\snow.lvl",
"rep_inf_mar_rifleman",
"rep_inf_mar_rocketeer",
"rep_inf_mar_engineer",
"rep_inf_mar_sniper",
"rep_inf_mar_officer",
"rep_inf_mar_jettrooper",
"rep_inf_mar_commander")
ReadDataFile("SIDE\\BFX\\jungle.lvl",
"cis_inf_kas_rifleman",
"cis_inf_kas_rocketeer",
"cis_inf_kas_sniper")
ReadDataFile("SIDE\\BFX\\tur.lvl",
"tur_bldg_hoth_dishturret",
"tur_bldg_hoth_lasermortar")
ReadDataFile("SIDE\\cis.lvl",
"cis_fly_droidfighter_DOME")
ReadDataFile("SIDE\\rep.lvl",
"rep_fly_assault_DOME",
"rep_fly_jedifighter_dome")
SetupTeams{
rep={
team = REP,
units = 32,
reinforcements = 400,
soldier = {"rep_inf_mar_rifleman", 20, 40},
assault = {"rep_inf_mar_rocketeer",2,5},
engineer = {"rep_inf_mar_engineer",2,5},
sniper = {"rep_inf_ep3_sniper",2,5},
officer = {"rep_inf_mar_officer",2, 4},
special = {"rep_inf_ep3_jettrooper",2, 4},
},
cis={
team = CIS,
units = 32,
reinforcements = 400,
soldier = {"cis_inf_rifleman", 20, 40},
assault = {"cis_inf_rocketeer",2,5},
engineer = {"cis_inf_pilot",2,5},
sniper = {"cis_inf_sniper",2,5},
officer = {"cis_inf_officer",2, 4},
special = {"cis_inf_droideka",2, 4},
}
}
AddUnitClass(REP, "rep_inf_barc",1,2)
AddUnitClass(REP, "rep_inf_commando",1,2)
AddUnitClass(REP, "rep_inf_mar_commander",0,1)
AddUnitClass(CIS, "cis_inf_recon",1,2)
AddUnitClass(CIS, "cis_inf_magnaguard",1,2)
AddUnitClass(CIS, "cis_inf_commander",0,1)
-- Hero Setup Section --
SetHeroClass(REP, "rep_hero_kiyadimundi")
SetHeroClass(CIS, "cis_hero_countdooku")EDITReadDataFile("SIDE\\BFX\\snow.lvl",
"rep_inf_mar_rifleman",
"rep_inf_mar_rocketeer",
"rep_inf_mar_engineer",
"rep_inf_mar_sniper",
"rep_inf_mar_officer",
"rep_inf_mar_jettrooper",
"rep_inf_mar_commander")
Yes, I copied it from the bfx Mygeeto luaFilipinio wrote:ok, ill try, is this galactic marines?
Filipinio wrote:but the annoying thing is ( after i munge and load SWB2 ) it frezzes when i click on conqest and BFX Clone Wars, and then when i close SWB2, it says "fatal, could not open MYE(tell me what this is. I can tell you what is wrong if I know what to tell you to post it."
Code: Select all
ReadDataFile("dc:TAO\\TAO.lvl", "TAO_conquest")Code: Select all
ReadDataFile("dc:MYE\\MYE.lvl", "MYE_conquest")Code: Select all
ReadDataFile("dc:MYE\\fel1.lvl", "fel1_conquest")Code: Select all
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--