Hero assault
Posted: Wed Sep 22, 2010 6:56 am
by THEWULFMAN
im trying to add Hero assault dark time to my mod, but it either plays for a 6 seconds, then crashes, or crashes outright. My error long is soo unbelievably long, over 402 kb, its sad, so heres y most recent lua
any ideas?
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Mos Eisley Hero Deathmatch (uses Space Assault rules)
-- First team to reach 100 kills wins
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("TFURandom")
ScriptCB_DoFile("AIHeroSupport")
---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\core.lvl")
function ScriptPostLoad()
EnableSPHeroRules()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2,
multiplayerScoreLimit = 100,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2", multiplayerRules = true, isCelebrityDeathmatch = true}
TDM:Start()
AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)
end
---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()
ReadDataFile("dc:Load\\common.lvl")
SetMemoryPoolSize ("ClothData",24)
SetMemoryPoolSize ("Combo",34) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",600) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",600) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",600) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",600) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",5000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",99) -- should be ~1x #combo
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("ingame.lvl")
ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2
SetMaxFlyHeight(77)
SetMaxPlayerFlyHeight(77)
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_kota",
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)
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\lead.lvl",
"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_skywalker",
"all_hero_solo",
"imp_hero_marajade",
"imp_hero_dengar",
"imp_hero_fett",
"imp_hero_stalker",
"all_hero_galenmarek",
"all_hero_colserra",
"all_hero_vace",
"imp_hero_bossk",
"imp_hero_ig88",
"all_hero_endorleia",
"all_hero_chewie",
"all_hero_skywalker_rotj",
"imp_hero_generic_sith")
--[[ Turrets disabled
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser")
SetMemoryPoolSize("MountedTurret", 15)
--]]
SetupTeams{
hero = {
team = ALL,
units = 32,
reinforcements = -1,
soldier = { "all_hero_kota",1,2},
assault = { "all_hero_chewbacca", 1,2},
engineer= { "all_hero_skywalker", 1,2},
sniper = { "all_hero_marek", 1,2},
officer = { "all_hero_vace", 1,2},
special = { "all_hero_oldben", 1,2},
},
}
AddUnitClass(ALL,"all_hero_shaakti", 1,2)
SetupTeams{
villain = {
team = IMP,
units = 32,
reinforcements = -1,
soldier = { "imp_hero_fett", 1,2},
assault = { "imp_hero_vader",1,2},
engineer= { "imp_hero_bossk", 1,2},
sniper = { "imp_hero_maris", 1,2},
officer = { "imp_hero_marajade", 1,2},
special = { "imp_hero_sidious", 1,2},
},
}
AddUnitClass(IMP, "imp_hero_ig88",1,2)
-- 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 = 96
SetMemoryPoolSize("Aimer", 1)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 320)
SetMemoryPoolSize("ConnectivityGraphFollower", 23)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth",41)
SetMemoryPoolSize("EntityDefenseGridTurret", 0)
SetMemoryPoolSize("EntityDroid", 0)
SetMemoryPoolSize("EntityFlyer", 5) -- to account for 5 chewbaccas
SetMemoryPoolSize("EntityLight", 80, 80) -- stupid trickery to actually set lights to 80
SetMemoryPoolSize("SoldierAnimation", 500)
SetMemoryPoolSize("ParticleTransformer::SizeTransf", 1800)
SetMemoryPoolSize("ParticleTransformer::ColorTrans", 1800)
SetMemoryPoolSize("EntityPortableTurret", 0) -- nobody has autoturrets AFAIK - MZ
SetMemoryPoolSize("EntitySoundStream", 2)
SetMemoryPoolSize("EntitySoundStatic", 45)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 0)
SetMemoryPoolSize("Navigator", 23)
SetMemoryPoolSize("Obstacle", 667)
SetMemoryPoolSize("Ordnance", 80) -- not much ordnance going on in the level
SetMemoryPoolSize("ParticleEmitter", 512)
SetMemoryPoolSize("ParticleEmitterInfoData", 512)
SetMemoryPoolSize("PathFollower", 23)
SetMemoryPoolSize("PathNode", 128)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize("TentacleSimulator", 24)
SetMemoryPoolSize("TreeGridStack", 290)
SetMemoryPoolSize("UnitAgent", 23)
SetMemoryPoolSize("UnitController", 23)
SetMemoryPoolSize("Weapon", weaponCnt)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:RYB\\RYB.lvl", "RYB_elimination")
SetDenseEnvironment("false")
-- Sound Stats
ScriptCB_EnableHeroMusic(0)
ScriptCB_EnableHeroVO(0)
voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_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(1, "Allleaving")
SetOutOfBoundsVoiceOver(2, "Impleaving")
SetAmbientMusic(ALL, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(ALL, 0.9, "all_tat_amb_middle", 1,1)
-- SetAmbientMusic(ALL, 0.1, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(IMP, 0.9, "imp_tat_amb_middle", 1,1)
-- SetAmbientMusic(IMP, 0.1, "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")
SetAttackingTeam(ATT)
-- 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
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Mos Eisley Hero Deathmatch (uses Space Assault rules)
-- First team to reach 100 kills wins
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("TFURandom")
ScriptCB_DoFile("AIHeroSupport")
---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\core.lvl")
function ScriptPostLoad()
EnableSPHeroRules()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2,
multiplayerScoreLimit = 100,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2", multiplayerRules = true, isCelebrityDeathmatch = true}
TDM:Start()
AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)
end
---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()
ReadDataFile("dc:Load\\common.lvl")
SetMemoryPoolSize ("ClothData",24)
SetMemoryPoolSize ("Combo",34) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",600) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",600) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",600) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",600) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",5000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",99) -- should be ~1x #combo
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("ingame.lvl")
ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2
SetMaxFlyHeight(77)
SetMaxPlayerFlyHeight(77)
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_kota",
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)
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\lead.lvl",
"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_skywalker",
"all_hero_solo",
"imp_hero_marajade",
"imp_hero_dengar",
"imp_hero_fett",
"imp_hero_stalker",
"all_hero_galenmarek",
"all_hero_colserra",
"all_hero_vace",
"imp_hero_bossk",
"imp_hero_ig88",
"all_hero_endorleia",
"all_hero_chewie",
"all_hero_skywalker_rotj",
"imp_hero_generic_sith")
--[[ Turrets disabled
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser")
SetMemoryPoolSize("MountedTurret", 15)
--]]
SetupTeams{
hero = {
team = ALL,
units = 32,
reinforcements = -1,
soldier = { "all_hero_kota",1,2},
assault = { "all_hero_chewbacca", 1,2},
engineer= { "all_hero_skywalker", 1,2},
sniper = { "all_hero_marek", 1,2},
officer = { "all_hero_vace", 1,2},
special = { "all_hero_oldben", 1,2},
},
}
AddUnitClass(ALL,"all_hero_shaakti", 1,2)
SetupTeams{
villain = {
team = IMP,
units = 32,
reinforcements = -1,
soldier = { "imp_hero_fett", 1,2},
assault = { "imp_hero_vader",1,2},
engineer= { "imp_hero_bossk", 1,2},
sniper = { "imp_hero_maris", 1,2},
officer = { "imp_hero_marajade", 1,2},
special = { "imp_hero_sidious", 1,2},
},
}
AddUnitClass(IMP, "imp_hero_ig88",1,2)
-- 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 = 96
SetMemoryPoolSize("Aimer", 1)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 320)
SetMemoryPoolSize("ConnectivityGraphFollower", 23)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth",41)
SetMemoryPoolSize("EntityDefenseGridTurret", 0)
SetMemoryPoolSize("EntityDroid", 0)
SetMemoryPoolSize("EntityFlyer", 5) -- to account for 5 chewbaccas
SetMemoryPoolSize("EntityLight", 80, 80) -- stupid trickery to actually set lights to 80
SetMemoryPoolSize("SoldierAnimation", 500)
SetMemoryPoolSize("ParticleTransformer::SizeTransf", 1800)
SetMemoryPoolSize("ParticleTransformer::ColorTrans", 1800)
SetMemoryPoolSize("EntityPortableTurret", 0) -- nobody has autoturrets AFAIK - MZ
SetMemoryPoolSize("EntitySoundStream", 2)
SetMemoryPoolSize("EntitySoundStatic", 45)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 0)
SetMemoryPoolSize("Navigator", 23)
SetMemoryPoolSize("Obstacle", 667)
SetMemoryPoolSize("Ordnance", 80) -- not much ordnance going on in the level
SetMemoryPoolSize("ParticleEmitter", 512)
SetMemoryPoolSize("ParticleEmitterInfoData", 512)
SetMemoryPoolSize("PathFollower", 23)
SetMemoryPoolSize("PathNode", 128)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize("TentacleSimulator", 24)
SetMemoryPoolSize("TreeGridStack", 290)
SetMemoryPoolSize("UnitAgent", 23)
SetMemoryPoolSize("UnitController", 23)
SetMemoryPoolSize("Weapon", weaponCnt)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:RYB\\RYB.lvl", "RYB_elimination")
SetDenseEnvironment("false")
-- Sound Stats
ScriptCB_EnableHeroMusic(0)
ScriptCB_EnableHeroVO(0)
voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_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(1, "Allleaving")
SetOutOfBoundsVoiceOver(2, "Impleaving")
SetAmbientMusic(ALL, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(ALL, 0.9, "all_tat_amb_middle", 1,1)
-- SetAmbientMusic(ALL, 0.1, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(IMP, 0.9, "imp_tat_amb_middle", 1,1)
-- SetAmbientMusic(IMP, 0.1, "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")
SetAttackingTeam(ATT)
-- 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
any ideas?