Custom Unit CTD
Posted: Fri Aug 26, 2011 8:41 pm
by yuke5
So, I changed my GCW conquest to feature the Republic vs Wookies. At first, it worked fine. Then I added a wookie sniper to the mix. I can load the map fine, but then it crashes after one second.
I can't find anything useful in my error log, and if someone does, that would be appreciated. I have also posted all my odf's. Hopefully those might help.
My only un-explainable error(from my small source of knowledge)
The rest of the errors were level 2 errors, all relating to soldier animation banks.
My LUA:
My unit's ODF:
My units's sniper rifle:
It's ordinance:
Thank you in advance, and as always, your help is very much appreciated.
-yuke5
My only un-explainable error(from my small source of knowledge)
Hidden/Spoiler:
Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\HintManager.cpp(210)
Hint references nonexistant command post "cp1"
C:\Battlefront2\main\Battlefront2\Source\HintManager.cpp(210)
Hint references nonexistant command post "cp1"
My LUA:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")
-- Empire Attacking (attacker is always #1)
ALL = 2
REP = 1
-- These variables do not change
ATT = 1
DEF = 2
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"}
--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:Start()
EnableSPHeroRules()
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()
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("sound\\tat.lvl;tat2gcw")
ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("dc:SIDE\\wok.lvl",
"wok_inf_basic")
ReadDataFile("dc: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_hover_barcspeeder")
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_tat_barge",
"tur_bldg_laser")
SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "wok_inf_warrior",9, 25},
assault = { "wok_inf_rocketeer",1,4},
engineer = { "wok_inf_mechanic",1,4},
},
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},
},
}
AddUnitClass(ALL, "wok_inf_sniper")
-- 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)
SetMemoryPoolSize("Aimer", 14)
SetMemoryPoolSize("EntityCloth", 25)
SetMemoryPoolSize("EntityFlyer", 6) -- to account for rocket upgrade
SetMemoryPoolSize("MountedTurret", 14)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 384)
SetMemoryPoolSize("TreeGridStack", 500)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:OI2\\OI2.lvl", "OI2_conquest")
SetDenseEnvironment("false")
-- Sound Stats
voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "rep_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", "rep_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")
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(REP, 1.0, "rep_tat_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_tat_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_tat_amb_end", 2,1)
SetVictoryMusic(ALL, "all_tat_amb_victory")
SetDefeatMusic (ALL, "all_tat_amb_defeat")
SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_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
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")
-- Empire Attacking (attacker is always #1)
ALL = 2
REP = 1
-- These variables do not change
ATT = 1
DEF = 2
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"}
--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:Start()
EnableSPHeroRules()
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()
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("sound\\tat.lvl;tat2gcw")
ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("dc:SIDE\\wok.lvl",
"wok_inf_basic")
ReadDataFile("dc: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_hover_barcspeeder")
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_tat_barge",
"tur_bldg_laser")
SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "wok_inf_warrior",9, 25},
assault = { "wok_inf_rocketeer",1,4},
engineer = { "wok_inf_mechanic",1,4},
},
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},
},
}
AddUnitClass(ALL, "wok_inf_sniper")
-- 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)
SetMemoryPoolSize("Aimer", 14)
SetMemoryPoolSize("EntityCloth", 25)
SetMemoryPoolSize("EntityFlyer", 6) -- to account for rocket upgrade
SetMemoryPoolSize("MountedTurret", 14)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 384)
SetMemoryPoolSize("TreeGridStack", 500)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:OI2\\OI2.lvl", "OI2_conquest")
SetDenseEnvironment("false")
-- Sound Stats
voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "rep_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", "rep_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")
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(REP, 1.0, "rep_tat_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_tat_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_tat_amb_end", 2,1)
SetVictoryMusic(ALL, "all_tat_amb_victory")
SetDefeatMusic (ALL, "all_tat_amb_defeat")
SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_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
Hidden/Spoiler:
[GameObjectClass]
ClassParent = "wok_inf_default_wookie"
GeometryName = "wok_inf_wookiewarrior.msh"
[Properties]
//ClothODF = "wok_inf_wookiewarrior_dreads1"
//ClothODF = "wok_inf_wookiewarrior_dreads2"
//ClothODF = "wok_inf_wookiewarrior_dreads3"
//ClothODF = "wok_inf_wookiewarrior_dreads4"
// the cool bit - Mike Z
AnimatedAddon = "DREADS"
GeometryAddon = "wok_inf_wookiedreads"
AddonAttachJoint = "bone_head"
NumTentacles = "4"
BonesPerTentacle = "5"
TentacleCollType = "1"
UnitType = "Scout"
GeometryName = "wok_inf_wookiewarrior"
GeometryLowRes = "wok_inf_wookiewarrior_low1"
FirstPerson = "all\allwook;all_1st_wookie"
SkeletonName = "wookie"
SkeletonLowRes = "wookielz"
//OverrideTexture = "wookie02"
//OverrideTexture2 = "wookieface02"
MaxHealth = 250.0
WEAPONSECTION = 1
WeaponName = "wok_weap_inf_sniper_rifle"
WeaponAmmo = 6
WEAPONSECTION = 3
WeaponName = "wok_weap_inf_thermaldetonator"
WeaponAmmo = 2
WeaponChannel = 1]
ClassParent = "wok_inf_default_wookie"
GeometryName = "wok_inf_wookiewarrior.msh"
[Properties]
//ClothODF = "wok_inf_wookiewarrior_dreads1"
//ClothODF = "wok_inf_wookiewarrior_dreads2"
//ClothODF = "wok_inf_wookiewarrior_dreads3"
//ClothODF = "wok_inf_wookiewarrior_dreads4"
// the cool bit - Mike Z
AnimatedAddon = "DREADS"
GeometryAddon = "wok_inf_wookiedreads"
AddonAttachJoint = "bone_head"
NumTentacles = "4"
BonesPerTentacle = "5"
TentacleCollType = "1"
UnitType = "Scout"
GeometryName = "wok_inf_wookiewarrior"
GeometryLowRes = "wok_inf_wookiewarrior_low1"
FirstPerson = "all\allwook;all_1st_wookie"
SkeletonName = "wookie"
SkeletonLowRes = "wookielz"
//OverrideTexture = "wookie02"
//OverrideTexture2 = "wookieface02"
MaxHealth = 250.0
WEAPONSECTION = 1
WeaponName = "wok_weap_inf_sniper_rifle"
WeaponAmmo = 6
WEAPONSECTION = 3
WeaponName = "wok_weap_inf_thermaldetonator"
WeaponAmmo = 2
WeaponChannel = 1]
Hidden/Spoiler:
[WeaponClass]
ClassParent = "com_weap_inf_sniper_rifle"
GeometryName = "kot_bowc.msh"
[Properties]
GeometryName = "kot_bowc"
HighResGeometry = "kot_bowc"
OrdnanceName = "wok_weap_inf_sniper_rifle_ord"
FirePointName = "hp_fire"
//************************************************
//******************* SOUND *****************
//************************************************
FireSound = "all_weap_inf_bowcaster_fire"
ReloadSound = "com_weap_inf_reload_med"
ChangeModeSound = "com_weap_inf_equip_med"
FireEmptySound = "com_weap_inf_ammo_empty"
WeaponChangeSound = "com_weap_inf_equip_med"
JumpSound = "com_weap_inf_rifle_mvt_jump"
LandSound = "com_weap_inf_rifle_mvt_land"
RollSound = "com_weap_inf_rifle_mvt_roll"
//ProneSound = "com_weap_inf_rifle_mvt_lie"
SquatSound = "com_weap_inf_rifle_mvt_squat"
//StandSound = "com_weap_inf_rifle_mvt_getup"
ClassParent = "com_weap_inf_sniper_rifle"
GeometryName = "kot_bowc.msh"
[Properties]
GeometryName = "kot_bowc"
HighResGeometry = "kot_bowc"
OrdnanceName = "wok_weap_inf_sniper_rifle_ord"
FirePointName = "hp_fire"
//************************************************
//******************* SOUND *****************
//************************************************
FireSound = "all_weap_inf_bowcaster_fire"
ReloadSound = "com_weap_inf_reload_med"
ChangeModeSound = "com_weap_inf_equip_med"
FireEmptySound = "com_weap_inf_ammo_empty"
WeaponChangeSound = "com_weap_inf_equip_med"
JumpSound = "com_weap_inf_rifle_mvt_jump"
LandSound = "com_weap_inf_rifle_mvt_land"
RollSound = "com_weap_inf_rifle_mvt_roll"
//ProneSound = "com_weap_inf_rifle_mvt_lie"
SquatSound = "com_weap_inf_rifle_mvt_squat"
//StandSound = "com_weap_inf_rifle_mvt_getup"
Hidden/Spoiler:
[OrdnanceClass]
ClassParent = "com_weap_inf_sniper_rifle_ord"
[Properties]
LaserTexture = "com_sfx_laser_yellow"
LaserGlowColor = "224 224 160 100"
LightColor = "224 224 160 150"
LightRadius = "4.0"
ClassParent = "com_weap_inf_sniper_rifle_ord"
[Properties]
LaserTexture = "com_sfx_laser_yellow"
LaserGlowColor = "224 224 160 100"
LightColor = "224 224 160 150"
LightRadius = "4.0"
-yuke5