Adding Dark Times Trouble [Solved!]

Discussion, progress updates, and downloads for the Dark Times and Rising Son mods.

Moderator: Moderators

Post Reply
User avatar
The Nasal Abyss
1st Lieutenant
1st Lieutenant
Posts: 428
Joined: Sun Sep 14, 2008 12:55 pm
Projects :: Currently Working on an Indie Game
Games I'm Playing :: Splatoon 2
xbox live or psn: Stm: Tight Verbage

Adding Dark Times Trouble [Solved!]

Post by The Nasal Abyss »

Mav told me to post my problem here so that's what I'm going to do! Here is the mungelog error:
Hidden/Spoiler:
[code]C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\FCS\FCS1_con.lua:294: `end' expected (to close `function' at line 18) near `<eof>'
ERROR[scriptmunge scripts\FCS\FCS1_con.lua]:Could not read input file.ERROR[scriptmunge scripts\FCS\FCS1_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

ERROR[levelpack mission\FCS1_con.req]:Expecting bracket, but none was found.
File : munged\pc\fcs1_con.script.req(1)...

ucft <--
ERROR[levelpack mission\FCS1_con.req]:Expecting bracket, but none was found.
File : munged\pc\fcs1_con.script.req(1)...

ucft <--

2 Errors 0 Warnings

ERROR[levelpack mission.req]:Expecting bracket, but none was found.
File : munged\pc\fcs1_con.lvl.req(1)...

ucft <--
ERROR[levelpack mission.req]:Expecting bracket, but none was found.
File : munged\pc\fcs1_con.lvl.req(1)...

ucft <--

2 Errors 0 Warnings[/code]
The ucft errors are no big deal as I can fix them myself (hopefully) but the other I'm not so sure about. Here are my scripts:

fcs1_con.lua:
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("TFURandom")
ScriptCB_DoFile("AIHeroSupport")

-- Empire Attacking (attacker is always #1)
local ALL = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\core.lvl")

function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

EnableSPHeroRules()

if not ScriptCB_InMultiplayer() then
herosupport = AIHeroSupport:New{AIATTHeroHealth = 4000, AIDEFHeroHealth = 4000, gameMode = "NonConquest",}
herosupport:SetHeroClass(ALL, herostrAll)
herosupport:SetHeroClass(IMP, herostrEmp)
herosupport:AddSpawnCP("CP1","CP1SpawnPath")
herosupport:AddSpawnCP("CP2","CP2SpawnPath")
herosupport:AddSpawnCP("CP3","CP3SpawnPath")
herosupport:AddSpawnCP("CP4","CP4SpawnPath")
herosupport:AddSpawnCP("CP5","CP5SpawnPath")
herosupport:AddSpawnCP("CP6","CP6SpawnPath")
herosupport:Start()
else

end


---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------

function ScriptInit()

gcwera = math.random(1,4)

if not ScriptCB_InMultiplayer() then
bothan = "all_inf_bothan_offline"
if gcwera < 3 then
DecideUnitsANH(1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2)
allsoldier = "all_inf_soldier_anh"
allheavy = "all_inf_heavy_anh"
allmarksman = "all_inf_marksman_anh"
impsoldier = "imp_inf_soldier_anh"
impheavy = "imp_inf_heavy_anh"
impmarksman = "imp_inf_marksman_anh"
allsupport = "all_inf_honorguard"
impsupport = "imp_inf_darktrooper_p1"
elseif gcwera > 2 then
DecideUnits(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
allsoldier = "all_inf_soldier"
allheavy = "all_inf_heavy"
allmarksman = "all_inf_marksman"
impsoldier = "imp_inf_soldier"
impheavy = "imp_inf_heavy"
impmarksman = "imp_inf_marksman"
allsupport = "all_inf_durosmerc"
impsupport = "imp_inf_heavymelee"
end
elseif ScriptCB_InMultiplayer() then
allsoldier = "all_inf_soldier"
allheavy = "all_inf_heavy"
allmarksman = "all_inf_marksman"
impsoldier = "imp_inf_soldier"
impheavy = "imp_inf_heavy"
impmarksman = "imp_inf_marksman"
allsupport = "all_inf_durosmerc"
impsupport = "imp_inf_heavymelee"
bothan = "all_inf_bothan"
herostrAll = "all_hero_kento"
supportstrAll = "all_inf_clone"
herostrEmp = "imp_hero_marek"
supportstrEmp = "imp_inf_commander"
end


SetMaxFlyHeight(100)
SetMaxPlayerFlyHeight(100)


SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",30) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",500) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",400) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",4000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",88) -- should be ~1x #combo

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\ingame.lvl")

ReadDataFile("ingame.lvl")


ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\sound\\tes.lvl;tescw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\sound\\bgl.lvl;bglgcw")

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\dark.lvl",
"all_hero_bail",
allsoldier,
allheavy,
allmarksman,
"all_inf_moncaleng",
allsupport,
bothan,
impsoldier,
impmarksman,
impheavy,
"imp_inf_gunner",
impsupport,
"imp_inf_commando",
"imp_inf_jumptrooper",
supportstrAll,
supportstrEmp)

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\lead.lvl",
herostrAll,
herostrEmp)

SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { allsoldier,9, 25},
assault = { allheavy,1,4},
engineer = { "all_inf_moncaleng",1,4},
sniper = { allmarksman,1,4},
officer = { allsupport,1,4},
special = { bothan,1,4},

},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { impsoldier,9, 25},
assault = { impheavy,1,4},
engineer = { "imp_inf_gunner",1,4},
sniper = { impmarksman,1,4},
officer = { impsupport,1,4},
special = { "imp_inf_jumptrooper",1,4},
},

}




AddUnitClass(IMP, supportstrEmp, 1, 4)
AddUnitClass(ALL, supportstrAll, 1, 4)

if ScriptCB_InMultiplayer() then
SetHeroClass(ALL, herostrAll)
SetHeroClass(IMP, herostrEmp)
else
end

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)

local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:FCS\\FCS.lvl", "FCS_conquest")
SetDenseEnvironment("false")


-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "des_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\tat.lvl", "tat2")
OpenAudioStream("sound\\tat.lvl", "tat2")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Allleaving")
SetOutOfBoundsVoiceOver(1, "Impleaving")

SetAmbientMusic(ALL, 1.0, "all_tat_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_tat_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_tat_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_tat_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_tat_amb_end", 2,1)

SetVictoryMusic(ALL, "all_tat_amb_victory")
SetDefeatMusic (ALL, "all_tat_amb_defeat")
SetVictoryMusic(IMP, "imp_tat_amb_victory")
SetDefeatMusic (IMP, "imp_tat_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")

-- Camera Stats
--Tat2 Mos Eisley
AddCameraShot(0.974338, -0.222180, 0.035172, 0.008020, -82.664650, 23.668301, 43.955681);
AddCameraShot(0.390197, -0.089729, -0.893040, -0.205362, 23.563562, 12.914885, -101.465561);
AddCameraShot(0.169759, 0.002225, -0.985398, 0.012916, 126.972809, 4.039628, -22.020613);
AddCameraShot(0.677453, -0.041535, 0.733016, 0.044942, 97.517807, 4.039628, 36.853477);
AddCameraShot(0.866029, -0.156506, 0.467299, 0.084449, 7.685640, 7.130688, -10.895234);
end
[/code]
addme.lua:
Hidden/Spoiler:
[code]--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

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\dtshell.lvl")

--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 = "FCS%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c = 1, mode_ctf_g = 1, mode_ctf_c = 1, mode_eli_g = 1,} change = {
era_1 = { name="Dark Times", icon2="darktimes_icon" },
},
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("FCS","FCSg_con",4)
AddDownloadableContent("FCS","FCSc_con",4)
AddDownloadableContent("FCS","FCSg_ctf",4)
AddDownloadableContent("FCS","FCSc_ctf",4)
AddDownloadableContent("FCS","FCSg_eli",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\FCS\\data\\_LVL_PC\\core.lvl")
[/code]
mission.req:
Hidden/Spoiler:
[code]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"
"TFURandom"
"AIHeroSupport"
}

REQN
{
"lvl"
"FCSg_con"
"FCSc_con"
"FCSg_ctf"
"FCSc_ctf"
"FCSg_eli"
"FCS1_con"
}
}[/code]
FCS1_con.req
Hidden/Spoiler:
[code]ucft
{
REQN
{
"script"
"FCS1_con"
}
}[/code]
I now realize that these may have some absolutely horrid mistakes and wrongs, as this is my first time doing something like this. I have always believed in "Trial By Fire" but in some things it doesn't work. LUA and general scripting is probably one of those things.

Thanks for the help ahead of time!
Last edited by The Nasal Abyss on Wed Dec 29, 2010 1:54 am, edited 1 time in total.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Adding Dark Times Trouble

Post by AQT »

You are missing the following in the fcs1_con.lua (yes, you need another one):
Hidden/Spoiler:
[quote]if not ScriptCB_InMultiplayer() then
herosupport = AIHeroSupport:New{AIATTHeroHealth = 4000, AIDEFHeroHealth = 4000, gameMode = "NonConquest",}
herosupport:SetHeroClass(ALL, herostrAll)
herosupport:SetHeroClass(IMP, herostrEmp)
herosupport:AddSpawnCP("CP1","CP1SpawnPath")
herosupport:AddSpawnCP("CP2","CP2SpawnPath")
herosupport:AddSpawnCP("CP3","CP3SpawnPath")
herosupport:AddSpawnCP("CP4","CP4SpawnPath")
herosupport:AddSpawnCP("CP5","CP5SpawnPath")
herosupport:AddSpawnCP("CP6","CP6SpawnPath")
herosupport:Start()
else
end
[/quote]
Also, you need the following line in the addme.lua:
Hidden/Spoiler:
[quote]AddDownloadableContent("FCS","FCSg_con",4)
AddDownloadableContent("FCS","FCSc_con",4)
AddDownloadableContent("FCS","FCSg_ctf",4)
AddDownloadableContent("FCS","FCSc_ctf",4)
AddDownloadableContent("FCS","FCSg_eli",4)
AddDownloadableContent("FCS","FCS1_con",4)[/quote]
That's everything I saw that is missing, but there might be others.
User avatar
The Nasal Abyss
1st Lieutenant
1st Lieutenant
Posts: 428
Joined: Sun Sep 14, 2008 12:55 pm
Projects :: Currently Working on an Indie Game
Games I'm Playing :: Splatoon 2
xbox live or psn: Stm: Tight Verbage

Re: Adding Dark Times Trouble

Post by The Nasal Abyss »

I added those lines and stopped getting errors, but now my game won't even start when I have the map in the addon folder.

Something weird though is that I get a quick glimpse of a .bat file saying that something already exists, or something like that. Any ideas?

EDIT: At the end of munging, of course.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Adding Dark Times Trouble

Post by Maveritchell »

Please clarify "game won't even start," and if you are moving past munge errors, then we will need to see your BFront2.log file as well. Please note that even if everything else were correct, you would not be able to select the Dark Times era in the Instant Action screen. This:

Code: Select all

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "FCS%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c  = 1, mode_ctf_g = 1, mode_ctf_c  = 1, mode_eli_g = 1,} change = {
      era_1 = { name="Dark Times", icon2="darktimes_icon" },
      },
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]
...needs to be this:

Code: Select all

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "FCS%s_%s", era_g = 1, era_c = 1, era_1 = 1, mode_con_g = 1, mode_con_c  = 1, mode_con_1 = 1, mode_ctf_g = 1, mode_ctf_c  = 1, mode_eli_g = 1,} change = {
      era_1 = { name="Dark Times", icon2="darktimes_icon" },
      },
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]
Please post updated code/data when you have modified it.
User avatar
The Nasal Abyss
1st Lieutenant
1st Lieutenant
Posts: 428
Joined: Sun Sep 14, 2008 12:55 pm
Projects :: Currently Working on an Indie Game
Games I'm Playing :: Splatoon 2
xbox live or psn: Stm: Tight Verbage

Re: Adding Dark Times Trouble

Post by The Nasal Abyss »

By "game won't even start," I mean that whenever I have my (munged) map in the addon folder, Battlefront crashes before I even see the logo screen.

Here is my BFront2log:
Hidden/Spoiler:
[code]Opened logfile BFront2.log 2010-12-28 0103
shell_interface: Entered
shell_interface: gPlatformStr, gOnlineServiceStr, gLangStr, gLangEnum: PC GameSpy english 0
ifs_era_handler - Entered
ifs_era_handler - Exited
shell_interface: No custom_gc_0.lvl
shell_interface: No custom_gc_1.lvl
shell_interface: No custom_gc_2.lvl
shell_interface: No custom_gc_3.lvl
shell_interface: No custom_gc_4.lvl
shell_interface: No custom_gc_5.lvl
shell_interface: No custom_gc_6.lvl
shell_interface: No custom_gc_7.lvl
shell_interface: No custom_gc_8.lvl
shell_interface: No custom_gc_9.lvl
shell_interface: Found custom_gc_10.lvl
custom_gc_10: Entered
custom_gc_10: Found custom_gc_11.lvl
custom_gc_11: Entered
ifs_freeform_init_dt.lua
ifs_freeform_start_dt.lua
custom_gc_11: Taking control of custom_GetGCButtonList()...
custom_gc_11: Taking control of custom_PressedGCButton()...
custom_gc_11: Exited
custom_gc_10: No custom_gc_12.lvl. Will stop searching for any more cGC scripts.
custom_gc_10: Exited
custom_EraButtonList(): Finished building era button table Known eras buttons: 28
custom_GetGMapEras(): Finished building era table Known eras: 28
custom_GetGMapModes(): Finished building game mode table Known Modes: 39
custom_GetMPGameModeList(): Finished building game mode list table List Length: 40
custom_SetMovieLocation()
custom_gc_11: custom_GetGCButtonList(): Entered
custom_GetGCButtonList()
custom_gc_11: custom_GetGCButtonList(): Exited
custom_SetMovieLocation()
custom_GetFreeformBattleModeList(): Finished building freeform battle mode list Known Modes: 39
ingame stream movies\crawl.mvs
shell_interface: Opening movie: movies\shell.mvs
shell_interface: Leaving
Mission Checker: Entered addme
Mission Checker: addme: Now listening in on AddDownloadableContent() calls
Mission Checker: Exited addme
Found side\rvs.lvl. Adding ADS's extra missions

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaScript.cpp(435)
Script file addme not found[/code]
And here are the other scripts:


fcs1_con.lua:
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
--load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("TFURandom")
ScriptCB_DoFile("AIHeroSupport")

-- Empire Attacking (attacker is always #1)
local ALL = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\core.lvl")

function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}



--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}

--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()

EnableSPHeroRules()

if not ScriptCB_InMultiplayer() then
herosupport = AIHeroSupport:New{AIATTHeroHealth = 4000, AIDEFHeroHealth = 4000, gameMode = "NonConquest",}
herosupport:SetHeroClass(ALL, herostrAll)
herosupport:SetHeroClass(IMP, herostrEmp)
herosupport:AddSpawnCP("CP1","CP1SpawnPath")
herosupport:AddSpawnCP("CP2","CP2SpawnPath")
herosupport:AddSpawnCP("CP3","CP3SpawnPath")
herosupport:AddSpawnCP("CP4","CP4SpawnPath")
herosupport:AddSpawnCP("CP5","CP5SpawnPath")
herosupport:AddSpawnCP("CP6","CP6SpawnPath")
herosupport:Start()
else

end

end

---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------

function ScriptInit()

gcwera = math.random(1,4)

if not ScriptCB_InMultiplayer() then
bothan = "all_inf_bothan_offline"
if gcwera < 3 then
DecideUnitsANH(1, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2)
allsoldier = "all_inf_soldier_anh"
allheavy = "all_inf_heavy_anh"
allmarksman = "all_inf_marksman_anh"
impsoldier = "imp_inf_soldier_anh"
impheavy = "imp_inf_heavy_anh"
impmarksman = "imp_inf_marksman_anh"
allsupport = "all_inf_honorguard"
impsupport = "imp_inf_darktrooper_p1"
elseif gcwera > 2 then
DecideUnits(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
allsoldier = "all_inf_soldier"
allheavy = "all_inf_heavy"
allmarksman = "all_inf_marksman"
impsoldier = "imp_inf_soldier"
impheavy = "imp_inf_heavy"
impmarksman = "imp_inf_marksman"
allsupport = "all_inf_durosmerc"
impsupport = "imp_inf_heavymelee"
end
elseif ScriptCB_InMultiplayer() then
allsoldier = "all_inf_soldier"
allheavy = "all_inf_heavy"
allmarksman = "all_inf_marksman"
impsoldier = "imp_inf_soldier"
impheavy = "imp_inf_heavy"
impmarksman = "imp_inf_marksman"
allsupport = "all_inf_durosmerc"
impsupport = "imp_inf_heavymelee"
bothan = "all_inf_bothan"
herostrAll = "all_hero_kento"
supportstrAll = "all_inf_clone"
herostrEmp = "imp_hero_marek"
supportstrEmp = "imp_inf_commander"
end


SetMaxFlyHeight(100)
SetMaxPlayerFlyHeight(100)


SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",30) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",500) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",400) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",4000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",88) -- should be ~1x #combo

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\ingame.lvl")

ReadDataFile("ingame.lvl")


ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\sound\\tes.lvl;tescw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\sound\\bgl.lvl;bglgcw")

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\dark.lvl",
"all_hero_bail",
allsoldier,
allheavy,
allmarksman,
"all_inf_moncaleng",
allsupport,
bothan,
impsoldier,
impmarksman,
impheavy,
"imp_inf_gunner",
impsupport,
"imp_inf_commando",
"imp_inf_jumptrooper",
supportstrAll,
supportstrEmp)

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\lead.lvl",
herostrAll,
herostrEmp)

SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { allsoldier,9, 25},
assault = { allheavy,1,4},
engineer = { "all_inf_moncaleng",1,4},
sniper = { allmarksman,1,4},
officer = { allsupport,1,4},
special = { bothan,1,4},

},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { impsoldier,9, 25},
assault = { impheavy,1,4},
engineer = { "imp_inf_gunner",1,4},
sniper = { impmarksman,1,4},
officer = { impsupport,1,4},
special = { "imp_inf_jumptrooper",1,4},
},

}




AddUnitClass(IMP, supportstrEmp, 1, 4)
AddUnitClass(ALL, supportstrAll, 1, 4)

if ScriptCB_InMultiplayer() then
SetHeroClass(ALL, herostrAll)
SetHeroClass(IMP, herostrEmp)
else
end

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)

local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:FCS\\FCS.lvl", "FCS_conquest")
SetDenseEnvironment("false")


-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "des_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)

OpenAudioStream("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\tat.lvl", "tat2")
OpenAudioStream("sound\\tat.lvl", "tat2")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Allleaving")
SetOutOfBoundsVoiceOver(1, "Impleaving")

SetAmbientMusic(ALL, 1.0, "all_tat_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_tat_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_tat_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_tat_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_tat_amb_end", 2,1)

SetVictoryMusic(ALL, "all_tat_amb_victory")
SetDefeatMusic (ALL, "all_tat_amb_defeat")
SetVictoryMusic(IMP, "imp_tat_amb_victory")
SetDefeatMusic (IMP, "imp_tat_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")

-- Camera Stats
--Tat2 Mos Eisley
AddCameraShot(0.974338, -0.222180, 0.035172, 0.008020, -82.664650, 23.668301, 43.955681);
AddCameraShot(0.390197, -0.089729, -0.893040, -0.205362, 23.563562, 12.914885, -101.465561);
AddCameraShot(0.169759, 0.002225, -0.985398, 0.012916, 126.972809, 4.039628, -22.020613);
AddCameraShot(0.677453, -0.041535, 0.733016, 0.044942, 97.517807, 4.039628, 36.853477);
AddCameraShot(0.866029, -0.156506, 0.467299, 0.084449, 7.685640, 7.130688, -10.895234);
end
[/code]
addme.lua:
Hidden/Spoiler:
[code]--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

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\dtshell.lvl")

--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 = "FCS%s_%s", era_g = 1, era_c = 1, era_1 = 1, mode_con_g = 1, mode_con_c = 1, mode_con_1 = 1, mode_ctf_g = 1, mode_ctf_c = 1, mode_eli_g = 1,} change = {
era_1 = { name="Dark Times", icon2="darktimes_icon" },
},
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("FCS","FCSg_con",4)
AddDownloadableContent("FCS","FCSc_con",4)
AddDownloadableContent("FCS","FCSg_ctf",4)
AddDownloadableContent("FCS","FCSc_ctf",4)
AddDownloadableContent("FCS","FCSg_eli",4)
AddDownloadableContent("FCS","FCS1_con",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\FCS\\data\\_LVL_PC\\core.lvl")

[/code]
mission.req:
Hidden/Spoiler:
[code]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"
"TFURandom"
"AIHeroSupport"
}

REQN
{
"lvl"
"FCSg_con"
"FCSc_con"
"FCSg_ctf"
"FCSc_ctf"
"FCSg_eli"
"FCS1_con"
}
}[/code]
fcs1_con.req:
Hidden/Spoiler:
[code]ucft
{
REQN
{
"script"
"FCS1_con"
}
}[/code]
Again, I can't stress enough how thankful I am for any help I get from you guys.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Adding Dark Times Trouble

Post by Maveritchell »

There's obviously some problem with your addme.lua - it's not immediately apparent, but do a manual clean and remunge to see if you generate some munge errors.
User avatar
The Nasal Abyss
1st Lieutenant
1st Lieutenant
Posts: 428
Joined: Sun Sep 14, 2008 12:55 pm
Projects :: Currently Working on an Indie Game
Games I'm Playing :: Splatoon 2
xbox live or psn: Stm: Tight Verbage

Re: Adding Dark Times Trouble

Post by The Nasal Abyss »

I did a manual clean and the problem persists. Battlefront II crashes before I even see the logo. Same Bfront2 log, and no munge errors. I'll go over my addme again.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Adding Dark Times Trouble

Post by THEWULFMAN »

Change this
Hidden/Spoiler:
[code]sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "FCS%s_%s", era_g = 1, era_c = 1, era_1 = 1, mode_con_g = 1, mode_con_c = 1, mode_con_1 = 1, mode_ctf_g = 1, mode_ctf_c = 1, mode_eli_g = 1,} change = {
era_1 = { name="Dark Times", icon2="darktimes_icon" },
},[/code]
to this
Hidden/Spoiler:
[code]
sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "FCS%s_%s",
era_g = 1,
era_c = 1,
era_1 = 1,
mode_con_g = 1,
mode_con_c = 1,
mode_con_1 = 1,
mode_ctf_g = 1,
mode_ctf_c = 1,
mode_eli_g = 1,}
change = {
era_1 = { name="Dark Times", icon2="darktimes_icon" },
},
}[/code]
I added a } and reorganized it
User avatar
The Nasal Abyss
1st Lieutenant
1st Lieutenant
Posts: 428
Joined: Sun Sep 14, 2008 12:55 pm
Projects :: Currently Working on an Indie Game
Games I'm Playing :: Splatoon 2
xbox live or psn: Stm: Tight Verbage

Re: Adding Dark Times Trouble

Post by The Nasal Abyss »

I did that and the same thing is still happening. Before I changed it to what you said I was getting this error in the form of a batch file:
Hidden/Spoiler:
Image
Does that help?
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Adding Dark Times Trouble

Post by THEWULFMAN »

The Nasal Abyss wrote:I did that and the same thing is still happening. Before I changed it to what you said I was getting this error in the form of a batch file:
Hidden/Spoiler:
Image
Does that help?
well i figured the way you had the addme.lua you must have had the munge log error
which screws everything up!

What say you Mav?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Adding Dark Times Trouble

Post by AQT »

You have an unnecessary bracket here that needs to be removed:
Hidden/Spoiler:
[quote]sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "FCS%s_%s",
era_g = 1,
era_c = 1,
era_1 = 1,
mode_con_g = 1,
mode_con_c = 1,
mode_con_1 = 1,
mode_ctf_g = 1,
mode_ctf_c = 1,
mode_eli_g = 1,}
change = {
era_1 = { name="Dark Times", icon2="darktimes_icon" },
},
}[/quote]
User avatar
The Nasal Abyss
1st Lieutenant
1st Lieutenant
Posts: 428
Joined: Sun Sep 14, 2008 12:55 pm
Projects :: Currently Working on an Indie Game
Games I'm Playing :: Splatoon 2
xbox live or psn: Stm: Tight Verbage

Re: Adding Dark Times Trouble

Post by The Nasal Abyss »

It works now! Thank you very much you three!
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Adding Dark Times Trouble [Solved!]

Post by THEWULFMAN »

no problem :oops: sorry about the extra brackect, but i helped solve part of the puzzle :P
Post Reply