Everything related to Dark times is crashing! [Solved]

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
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Everything related to Dark times is crashing! [Solved]

Post by woner11 »

Okay, so yes this is a lua issue for adding the dark times era. I just wanted to get the basic layout for my lua before doing any editing. I followed Mavs instructions exactly, or so I thought, and double checked, but I still keep getting this error:
Hidden/Spoiler:
F:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\CMO\CMO1_con.lua:19: <eof> expected near `end'
ERROR[scriptmunge scripts\CMO\CMO1_con.lua]:Could not read input file.ERROR[scriptmunge scripts\CMO\CMO1_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings
Here is my lua, please let me know what I've done wrong. Thanks in advance!
Hidden/Spoiler:
--
-- 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)
ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2

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


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"}



--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:Start()

EnableSPHeroRules()

if not ScriptCB_InMultiplayer() then
herosupport = AIHeroSupport:New{AIATTHeroHealth = 4100, 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()

if not ScriptCB_InMultiplayer() then
DecideUnits(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
elseif ScriptCB_InMultiplayer() then
herostrAll = "all_hero_marek"
supportstrAll = "all_inf_elite"
herostrEmp = "imp_hero_shadowguard"
supportstrEmp = "imp_inf_shadowtrooper"
end

SetMemoryPoolSize ("ClothData",40)
SetMemoryPoolSize ("Combo",170) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",1850) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",1850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",1850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",1750) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",14000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",1140) -- should be ~1x #combo -- should be ~1x #combo

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

ReadDataFile("ingame.lvl")

SetMaxFlyHeight(40)
SetMaxPlayerFlyHeight(40)


SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo


ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\sound\\tes.lvl;tescw")
ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\dark.lvl",
"all_inf_moncaleng",
"all_inf_durosmerc",
"all_inf_soldier",
"all_inf_marksman",
"all_inf_heavy",
"all_inf_bothan",
"imp_inf_soldier",
"imp_inf_marksman",
"imp_inf_heavy",
"imp_inf_gunner",
"imp_inf_commando",
"imp_inf_jumptrooper",
"imp_bldg_mortar",
"imp_inf_heavymelee",
"all_inf_felucian",
"all_inf_elite",
"all_inf_clone",
"all_inf_guard",
"imp_inf_commander",
"imp_inf_royalguard",
"imp_inf_shadowtrooper",
"all_inf_wookieedef",
"all_hero_bail",
"imp_inf_evotrooper",
"imp_inf_dpilot",
"all_inf_dpilot",
"all_inf_keldor",
"fel_hero_rancor",
"all_hero_kota",
"all_hero_oldben",
"all_hero_marek",
"all_hero_shaakti",
"imp_hero_shadowguard",
"all_hero_yoda",
"imp_hero_sidious",
"imp_hero_vader",
"imp_hero_maris",
"imp_hero_marek",
"all_hero_kento",
"imp_hero_dooku",
"all_hero_macewindu",
"imp_hero_maul",
"all_hero_lukerotj",
"all_hero_bail",
"all_inf_soldier",
"all_inf_heavy",
"all_inf_marksman",
"all_inf_moncaleng",
"all_inf_durosmerc",
"all_inf_bothan",
"imp_inf_soldier",
"imp_inf_marksman",
"imp_inf_heavy",
"imp_inf_gunner",
"imp_inf_heavymelee",
"imp_inf_commando",
"imp_inf_jumptrooper",
supportstrAll,
supportstrEmp)

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

ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_hero_hansolo_tat")

ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_bobafett",
"imp_fly_destroyer_dome" )

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_tat_barge",
"tur_bldg_laser")

SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "all_inf_soldier",9, 25},
assault = { "all_inf_heavy",1,4},
engineer = { "all_inf_moncaleng",1,4},
sniper = { "all_inf_marksman",1,4},
officer = { "all_inf_durosmerc",1,4},
special = { "all_inf_bothan",1,4},

},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { "imp_inf_soldier",9, 25},
assault = { "imp_inf_heavy",1,4},
engineer = { "imp_inf_gunner",1,4},
sniper = { "imp_inf_marksman",1,4},
officer = { "imp_inf_heavymelee",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:CMO\\CMO.lvl", "CMO_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
Last edited by woner11 on Fri Jun 19, 2009 10:35 am, edited 2 times in total.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Lua issue

Post by Maveritchell »

You moved the "end" from the end of ScriptPostLoad above the actual start of ScriptPostLoad.
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: Lua issue

Post by woner11 »

Gratsias, however, now the map still isn't working, and I feel like I've made some sort of noobish error. I just keep getting the fatal message, Could not open MISSION\CMO1_con.lvl. I've tried to get a log but didn't get much, or so I think.

Entire Log:
Hidden/Spoiler:
pened logfile BFront2.log 2009-06-18 1332
ingame stream movies\crawl.mvs

Message Severity: 3
.\Source\LuaCallbacks_Mission.cpp(857)
Lua ReadDataFile: Could not open sound\shell.lvl

Message Severity: 3
.\Source\LuaCallbacks_Mission.cpp(857)
Lua ReadDataFile: Could not open ..\..\addon\BDT\data\_LVL_PC\dtshell.lvl
prev = none iLastPage = nil
prev = texture iLastPage = 1
prev = texture iLastPage = 2
prev = texture iLastPage = 3
ifs_legal.Exit
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList
It just seems way too short.
Any ideas as to what I'm doing wrong?

Edit:
just found this too, it has a severity of 5, so that's definitly why its crashing, just don't know what to do.
Hidden/Spoiler:
Opened logfile BFront2.log 2009-06-18 1249
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: Found custom_gc_5.lvl
custom_gc_5: Entered
ifs_freeform_init_jcw.lua
ifs_freeform_start_jcw.lua
custom_gc_5: Taking control of custom_GetGCButtonList()...
custom_gc_5: Taking control of custom_PressedGCButton()...
custom_gc_5: Exited
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: No custom_gc_10.lvl
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_5: custom_GetGCButtonList(): Entered
custom_GetGCButtonList()
custom_gc_5: 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
Found side\rvs.lvl. Adding ADS's extra missions
Mission Checker: Entered addme
Mission Checker: addme: Now listening in on AddDownloadableContent() calls
Mission Checker: Exited addme
Mission Checker: Entered addme
Mission Checker: Someone else is already listening...
Mission Checker: Exited addme
prev = none iLastPage = nil
prev = texture iLastPage = 1
prev = texture iLastPage = 2
prev = texture iLastPage = 3
ifs_legal.Exit

Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment shell_main

ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile
ifs_sp_campaign: Input_Accept(): Entered: _tab_instant
missionlist_ExpandMapList()
ifs_missionselect_pcMulti_fnSetMapPreview(): Defaulting index to 1
Checkbox for check_era27 clicked
this.CurButton = check_era27
cur_button = nil
this.CurButton = check_mode1
cur_button = nil
custom_AddMapNew()
custom_printTable(): table: 040B613C
The key, value is: mode_eli_c 1
The key, value is: mode_con_c 1
The key, value is: isModLevel 1
The key, value is: bSelected 1
The key, value is: mode_con_1 1
The key, value is: era_c 1
The key, value is: change table: 040B61F4
The key, value is: era_1 1
The key is mapluafile, the formated value is: CMO<A>_<B>
custom_printTable(): Returning
custom_printTable(): table: 03CA6B0C
The key, value is: key mode_con
The key, value is: subst con
The key, value is: showstr modename.name.con
The key, value is: descstr modename.description.con
The key, value is: icon mode_icon_con
custom_printTable(): Returning
gMapEras.key = era_1 Era = era_1 subst = 1
Adding map: CMO1_con idx: 1
this.CurButton = _map_add
cur_button = nil
this.CurButton = Launch
cur_button = nil

Message Severity: 3
.\Source\LoadUtil.cpp(1019)
Unable to find level chunk in MISSION.lvl


Message Severity: 3
.\Source\LuaHelper.cpp(112)
OpenScript(CMO1_con): script (5887a9c2) not found

Message Severity: 5
.\Source\GameState.cpp(1283)
Could not open MISSION\CMO1_con.lvl
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Getting back into modding and running into some issues

Post by 501st_commander »

:shock:
have you removed any maps from any addon folder? i did once got the same "type" of error.
...
EDIT:
can you repost your lua?
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: Getting back into modding and running into some issues

Post by woner11 »

Here's my lua, pretty much same as before.
Hidden/Spoiler:
--
-- 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)
ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
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"}



--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:Start()

EnableSPHeroRules()

if not ScriptCB_InMultiplayer() then
herosupport = AIHeroSupport:New{AIATTHeroHealth = 4100, 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()

if not ScriptCB_InMultiplayer() then
DecideUnits(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
elseif ScriptCB_InMultiplayer() then
herostrAll = "all_hero_marek"
supportstrAll = "all_inf_elite"
herostrEmp = "imp_hero_shadowguard"
supportstrEmp = "imp_inf_shadowtrooper"
end

SetMemoryPoolSize ("ClothData",40)
SetMemoryPoolSize ("Combo",170) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",1850) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",1850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",1850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",1750) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",14000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",1140) -- should be ~1x #combo -- should be ~1x #combo

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

ReadDataFile("ingame.lvl")

SetMaxFlyHeight(40)
SetMaxPlayerFlyHeight(40)


SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo


ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\sound\\tes.lvl;tescw")
ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\dark.lvl",
"all_inf_moncaleng",
"all_inf_durosmerc",
"all_inf_soldier",
"all_inf_marksman",
"all_inf_heavy",
"all_inf_bothan",
"imp_inf_soldier",
"imp_inf_marksman",
"imp_inf_heavy",
"imp_inf_gunner",
"imp_inf_commando",
"imp_inf_jumptrooper",
"imp_bldg_mortar",
"imp_inf_heavymelee",
"all_inf_felucian",
"all_inf_elite",
"all_inf_clone",
"all_inf_guard",
"imp_inf_commander",
"imp_inf_royalguard",
"imp_inf_shadowtrooper",
"all_inf_wookieedef",
"all_hero_bail",
"imp_inf_evotrooper",
"imp_inf_dpilot",
"all_inf_dpilot",
"all_inf_keldor",
"fel_hero_rancor",
"all_hero_kota",
"all_hero_oldben",
"all_hero_marek",
"all_hero_shaakti",
"imp_hero_shadowguard",
"all_hero_yoda",
"imp_hero_sidious",
"imp_hero_vader",
"imp_hero_maris",
"imp_hero_marek",
"all_hero_kento",
"imp_hero_dooku",
"all_hero_macewindu",
"imp_hero_maul",
"all_hero_lukerotj",
"all_hero_bail",
"all_inf_soldier",
"all_inf_heavy",
"all_inf_marksman",
"all_inf_moncaleng",
"all_inf_durosmerc",
"all_inf_bothan",
"imp_inf_soldier",
"imp_inf_marksman",
"imp_inf_heavy",
"imp_inf_gunner",
"imp_inf_heavymelee",
"imp_inf_commando",
"imp_inf_jumptrooper",
supportstrAll,
supportstrEmp)

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

ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_hero_hansolo_tat")

ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_bobafett",
"imp_fly_destroyer_dome" )

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_tat_barge",
"tur_bldg_laser")

SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "all_inf_soldier",9, 25},
assault = { "all_inf_heavy",1,4},
engineer = { "all_inf_moncaleng",1,4},
sniper = { "all_inf_marksman",1,4},
officer = { "all_inf_durosmerc",1,4},
special = { "all_inf_bothan",1,4},

},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { "imp_inf_soldier",9, 25},
assault = { "imp_inf_heavy",1,4},
engineer = { "imp_inf_gunner",1,4},
sniper = { "imp_inf_marksman",1,4},
officer = { "imp_inf_heavymelee",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:CMO\\CMO.lvl", "CMO_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
That addon thing won't affect it unless you've got too many maps in your addon folder, and no I haven't removed any.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Getting back into modding and running into some issues

Post by 501st_commander »

what with the

Code: Select all

("..\\..\\addon\\BDT\\data\\_LVL_PC\\*****.lvl")
things?

and why do you have all of these? you only put the ones you are loading in the game there.
Hidden/Spoiler:
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\dark.lvl",
"all_inf_moncaleng",
"all_inf_durosmerc",
"all_inf_soldier",
"all_inf_marksman",
"all_inf_heavy",
"all_inf_bothan",
"imp_inf_soldier",
"imp_inf_marksman",
"imp_inf_heavy",
"imp_inf_gunner",
"imp_inf_commando",
"imp_inf_jumptrooper",
"imp_bldg_mortar",
"imp_inf_heavymelee",
"all_inf_felucian",
"all_inf_elite",
"all_inf_clone",
"all_inf_guard",
"imp_inf_commander",
"imp_inf_royalguard",
"imp_inf_shadowtrooper",
"all_inf_wookieedef",
"all_hero_bail",
"imp_inf_evotrooper",
"imp_inf_dpilot",
"all_inf_dpilot",
"all_inf_keldor",
"fel_hero_rancor",
"all_hero_kota",
"all_hero_oldben",
"all_hero_marek",
"all_hero_shaakti",
"imp_hero_shadowguard",
"all_hero_yoda",
"imp_hero_sidious",
"imp_hero_vader",
"imp_hero_maris",
"imp_hero_marek",
"all_hero_kento",
"imp_hero_dooku",
"all_hero_macewindu",
"imp_hero_maul",
"all_hero_lukerotj",
"all_hero_bail",
"all_inf_soldier",
"all_inf_heavy",
"all_inf_marksman",
"all_inf_moncaleng",
"all_inf_durosmerc",
"all_inf_bothan",
"imp_inf_soldier",
"imp_inf_marksman",
"imp_inf_heavy",
"imp_inf_gunner",
"imp_inf_heavymelee",
"imp_inf_commando",
"imp_inf_jumptrooper",
supportstrAll,
supportstrEmp)
and these,

Code: Select all

"(...)",
supportstrAll,
supportstrEmp)
should have " at the end and begining of them,

Code: Select all

"(...)",
"supportstrAll",
"supportstrEmp")
User avatar
Sky_216
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2086
Joined: Mon Feb 13, 2006 3:28 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Getting back into modding and running into some issues

Post by Sky_216 »

The DT heroes are in a seperate lvl file, if you load them and all the troops you'll have too many anims so it'll crash, and....

You didn't make new mission req files did you? You have to edit mission.req and make a file called CMO1_con.req inside the COMMON/MISSION folder to add extra modes.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Getting back into modding and running into some issues

Post by Maveritchell »

501st_commander wrote: and these,

Code: Select all

"(...)",
supportstrAll,
supportstrEmp)
should have " at the end and begining of them,

Code: Select all

"(...)",
"supportstrAll",
"supportstrEmp")
Wrong. Please do not correct what you do not know is wrong. Those are variables and not names.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Getting back into modding and running into some issues

Post by 501st_commander »

Maveritchell wrote:
501st_commander wrote: and these,

Code: Select all

"(...)",
supportstrAll,
supportstrEmp)
should have " at the end and begining of them,

Code: Select all

"(...)",
"supportstrAll",
"supportstrEmp")
Wrong. Please do not correct what you do not know is wrong. Those are variables and not names.
oh, i thought they were some type of troop :oops: :oops:
woner11
Sith
Sith
Posts: 1361
Joined: Tue Sep 18, 2007 10:17 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: The lost world of pickels
Contact:

Re: Getting back into modding and running into some issues

Post by woner11 »

Skyhammer_216 wrote:You didn't make new mission req files did you? You have to edit mission.req and make a file called CMO1_con.req inside the COMMON/MISSION folder to add extra modes.
I did actually, though that was my first thought too. Maybe I did something wrong with it.
misson.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"
"TFURandom"
"AIHeroSupport"
}

REQN
{
"lvl"
"CMO1_con"
"CMOc_con"
"CMOc_eli"
}
}
and here is the CMO1_con.req:
Hidden/Spoiler:
ucft
{
REQN
{

"config"
"cor_movies"

}

REQN
{
"script"
"CMO1_con"
}
}
Edit: Everything works fine now. Thanks Mav, oh and this can be locked.
Post Reply