Page 1 of 1

Game crashes when showing team name!

Posted: Tue Dec 30, 2008 1:59 pm
by 666rulerofclones
i tried munging my own mission.lvl recently, and i modded the kamino gcw level to include the campaign clones against the empire, but, when it loaded, the game crashed! this is 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 = 1;
IMP = 2;
-- These variables do not change
ATT = 1;
DEF = 2;

---------------------------------------------------------------------------
-- 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 ScriptPostLoad()
SetProperty("cp1", "Team", "1")
SetProperty("cp2", "Team", "2")
SetProperty("cp3", "Team", "2")
SetProperty("cp4", "Team", "2")
SetProperty("cp5", "Team", "1")
SetProperty("cp6", "Team", "1")
DisableBarriers("camp")
SetAIDamageThreshold("Comp1", 0 )
SetAIDamageThreshold("Comp2", 0 )
SetAIDamageThreshold("Comp3", 0 )
SetAIDamageThreshold("Comp4", 0 )
SetAIDamageThreshold("Comp5", 0 )
SetAIDamageThreshold("Comp6", 0 )
SetAIDamageThreshold("Comp7", 0 )
SetAIDamageThreshold("Comp8", 0 )
SetAIDamageThreshold("Comp9", 0 )
SetAIDamageThreshold("Comp10", 0 )

SetProperty("Kam_Bldg_Podroom_Door32", "Islocked", 1)

SetProperty("Kam_Bldg_Podroom_Door33", "Islocked", 1)
SetProperty("Kam_Bldg_Podroom_Door32", "Islocked", 1)
SetProperty("Kam_Bldg_Podroom_Door34", "Islocked", 1)
SetProperty("Kam_Bldg_Podroom_Door35", "Islocked", 1)
SetProperty("Kam_Bldg_Podroom_Door27", "Islocked", 0)
SetProperty("Kam_Bldg_Podroom_Door28", "Islocked", 1)
SetProperty("Kam_Bldg_Podroom_Door36", "Islocked", 1)
SetProperty("Kam_Bldg_Podroom_Door20", "Islocked", 0)
UnblockPlanningGraphArcs("connection71")

--Objective1
UnblockPlanningGraphArcs("connection85")
UnblockPlanningGraphArcs("connection48")
UnblockPlanningGraphArcs("connection63")
UnblockPlanningGraphArcs("connection59")
UnblockPlanningGraphArcs("close")
UnblockPlanningGraphArcs("open")
DisableBarriers("frog")
DisableBarriers("close")
DisableBarriers("open")

--blocking Locked Doors
UnblockPlanningGraphArcs("connection194");
UnblockPlanningGraphArcs("connection200");
UnblockPlanningGraphArcs("connection118");
DisableBarriers("FRONTDOOR2-3");
DisableBarriers("FRONTDOOR2-1");
DisableBarriers("FRONTDOOR2-2");

--Lower cloning facility
UnblockPlanningGraphArcs("connection10")
UnblockPlanningGraphArcs("connection159")
UnblockPlanningGraphArcs("connection31")
DisableBarriers("FRONTDOOR1-3")
DisableBarriers("FRONTDOOR1-1")
DisableBarriers("FRONTDOOR1-2")

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

SetProperty("cp2", "spawnpath", "cp2_spawn")
SetProperty("cp2", "captureregion", "cp2_capture")

end

--START BRIDGEWORK!

-- OPEN

function ScriptInit()
-- Designers, these two lines *MUST* be first!
SetPS2ModelMemory(3600000)
ReadDataFile("ingame.lvl")




ReadDataFile("sound\\kam.lvl;kam1gcw")


--SetMaxFlyHeight(43)
--SetMaxPlayerFlyHeight (43)

ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_pilot",
"rep_hero_obiwan")

ReadDataFile("SIDE\\fix.lvl",
"rep_inf_ep2_jettrooper_rifleman",
"rep_inf_ep2_jettrooper_sniper",
"rep_inf_ep2_rocketeer_chaingun",
"rep_inf_ep2_officer")

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

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_chaingun_roof",
"tur_weap_built_gunturret")

-- Level Stats
ClearWalkers()
-- AddWalkerType(0, 0) -- 8 droidekas (special case: 0 leg pairs)
-- AddWalkerType(1, 3) -- 8 droidekas (special case: 0 leg pairs)
-- AddWalkerType(2, 0) -- 2 spider walkers with 2 leg pairs each
-- AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
SetMemoryPoolSize ("EntityCloth", 33)
SetMemoryPoolSize ("EntityLight", 64)
SetMemoryPoolSize ("Obstacle", 800)
SetMemoryPoolSize("EntitySoundStream", 3)
SetMemoryPoolSize ("SoundSpaceRegion", 36)
SetMemoryPoolSize("EntitySoundStatic", 85)
SetMemoryPoolSize ("Weapon", 260)

SetupTeams{
all = {
team = ALL,
units = 32,
reinforcements = 150,
soldier = { "rep_inf_ep2_jettrooper_rifleman",9, 25},
assault = { "rep_inf_ep2_rocketeer",1, 4},
engineer = { "rep_inf_ep2_pilot",1, 4},
sniper = { "rep_inf_ep2_jettrooper_sniper",1, 4},
officer = { "rep_inf_ep2_officer",1, 4},
special = { "rep_inf_ep2_rocketeer_chaingun",1,4},
},

}

SetupTeams{
imp = {
team = IMP,
units = 32,
reinforcements = 150,
soldier = { "imp_inf_rifleman",9, 25},
assault = { "imp_inf_rocketeer",1, 4},
engineer = { "imp_inf_engineer", 1, 4},
sniper = { "imp_inf_sniper",1, 4},
officer = { "imp_inf_officer",1, 4},
special = { "imp_inf_dark_trooper",1, 4},

},

}
SetHeroClass(ALL, "rep_hero_obiwan")
SetHeroClass(IMP, "imp_hero_bobafett")

SetSpawnDelay(10.0, 0.25)
-- AddDeathRegion("deathregion")
ReadDataFile("KAM\\kam1.lvl", "kamino1_conquest")
SetMemoryPoolSize("EntityFlyer", 6)
SetDenseEnvironment("false")
SetMinFlyHeight(60)
SetAllowBlindJetJumps(0)
SetMaxFlyHeight(102)
SetMaxPlayerFlyHeight(102)
--SetStayInTurrets(1)


-- Movies
-- SetVictoryMovie(ALL, "all_end_victory")
-- SetDefeatMovie(ALL, "imp_end_victory")
-- SetVictoryMovie(IMP, "imp_end_victory")
-- SetDefeatMovie(IMP, "all_end_victory")

-- Sound

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\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\kam.lvl", "kam1")
OpenAudioStream("sound\\kam.lvl", "kam1")
-- OpenAudioStream("sound\\mus.lvl", "kamino1_emt")

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, "all_kam_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_kam_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_kam_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_kam_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_kam_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_kam_amb_end", 2,1)

SetVictoryMusic(ALL, "all_kam_amb_victory")
SetDefeatMusic (ALL, "all_kam_amb_defeat")
SetVictoryMusic(IMP, "imp_kam_amb_victory")
SetDefeatMusic (IMP, "imp_kam_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
-- SetSoundEffect("BirdScatter", "birdsFlySeq1")
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)
AddDeathRegion("deathregion")


AddCameraShot(0.564619, -0.121047, 0.798288, 0.171142, 68.198814, 79.137611, 110.850922);

AddCameraShot(-0.281100, 0.066889, -0.931340, -0.221616, 10.076019, 82.958336, -26.261774);

AddCameraShot(0.209553, -0.039036, -0.960495, -0.178923, 92.558563, 58.820618, 130.675919);

AddCameraShot(0.968794, 0.154227, 0.191627, -0.030506, -173.914413, 69.858940, 52.532421);

AddCameraShot(0.744389, 0.123539, 0.647364, -0.107437, 97.475639, 53.216236, 76.477089);

AddCameraShot(-0.344152, 0.086702, -0.906575, -0.228393, 95.062233, 105.285820, -37.661552);
end
and this is my mission.req:
Hidden/Spoiler:
ucft
{
REQN
{
"config"
"ingame_movies"
"cor_movies"
"dea_movies"
"fel_movies"
"geo_movies"
"hot_movies"
"kam_movies"
"kas_movies"
"mus_movies"
"myg_movies"
"nab_movies"
"pol_movies"
"spa1_movies"
"spa2_movies"
"spa2c_c_movies"
"spa3_movies"
"spa4_movies"
"tan_movies"
"uta_movies"
"yav_movies"
}

REQN
{
"script"
"setup_teams"
"error_popup"
"game_interface"
"gametype_capture"
"globals"
"ifelem_animationmgr"
"ifelem_borderrect"
"ifelem_button"
"ifelem_buttomwindow"
"ifelem_editbox"
"ifelem_flatbutton"
"ifelem_form"
"ifelem_helptext"
"ifelem_hslider"
"ifelem_listmanager"
"ifelem_popup"
"ifelem_roundbutton"
"ifelem_segline"
"ifelem_shellscreen"
"ifelem_tabmanager"
"ifelem_titlebar"
"ifs_awardstats"
"ifs_careerstats"
"ifs_charselect"
"ifs_fakeconsole"
"ifs_mapselect"
"ifs_movietrans_game"
"ifs_mp_lobby"
"ifs_mpgs_friends"
"ifs_mpxl_feedback"
"ifs_mpxl_friends"
"ifs_mpxl_voicemail"
"ifs_opt_controller_mode"
"ifs_opt_controller_vehunit"
"ifs_opt_general"
"ifs_opt_mp"
"ifs_opt_pccontrols"
"ifs_opt_pckeyboard"
"ifs_opt_pcvideo"
"ifs_opt_sound"
"ifs_opt_top"
"ifs_pausemenu"
"ifs_pc_spawnselect"
"ifs_pc_spectator"
"ifs_personalstats"
"ifs_readyselect"
"ifs_saveop"
"ifs_sideselect"
"ifs_stats"
"ifs_teamstats"
"its_teaser"
"ifutil_mouse"
"interface_util"
"ObjectiveGoto"
"points"
"popup_ab"
"popup_busy"
"popup_loadsave_2"
"popup_ok"
"popup_vote"
"popup_yesno"
"popup_yesno_large"
"popups_common"
"popups_lobby"
"unused"
"gametype_conquest"
"gametype_capture"
"Objective"
"MultiObjectiveContainer"
"ObjectiveCTF"
"ObjectiveAssault"
"ObjectiveSpaceAssault"
"ObjectiveConquest"
"ObjectiveTDM"
"ObjectiveOneFlagCTF"
"SoundEvent_ctf"
"ObjectiveGoto"
"LinkedShields"
"LinkedDestroyables"
"LinkedTurrets"
"Ambush"
"PlayMovieWithTransition"
}

REQN
{
"lvl"
"cor1c_c"
"cor1c_con"
"cor1c_ctf"
"cor1g_con"
"cor1g_ctf"
"dag1c_con"
"dag1c_ctf"
"dag1g_con"
"dag1g_ctf"
"dea1c_con"
"dea1c_1flag"
"dea1g_c"
"dea1g_con"
"dea1g_1flag"
"end1g_con"
"end1g_ctf"
"end1g_hunt"
"fel1c_c"
"fel1c_con"
"fel1c_ctf"
"fel1g_con"
"fel1g_ctf"
"geo1c_c"
"geo1c_con"
"geo1c_ctf"
"geo1c_hunt"
"geo1c_xl"
"hot1g_c"
"hot1g_con"
"hot1g_1flag"
"hot1g_hunt"
"hot1g_xl"
"kam1c_c"
"kam1c_con"
"kam1c_ctf"
"kam1g_con"
"kam1g_ctf"
"kas2c_c"
"kas2c_con"
"kas2c_ctf"
"kas2c_hunt"
"kas2c_xl"
"kas2g_con"
"kas2g_ctf"
"kas2g_xl"
"mus1c_c"
"mus1c_con"
"mus1c_ctf"
"mus1g_con"
"mus1g_ctf"
"myg1c_c"
"myg1c_con"
"myg1c_ctf"
"myg1g_con"
"myg1g_ctf"
"nab2c_con"
"nab2c_ctf"
"nab2c_hunt"
"nab2g_c"
"nab2g_con"
"nab2g_ctf"
"pol1c_con"
"pol1c_ctf"
"pol1g_c"
"pol1g_con"
"pol1g_ctf"
"spa1g_1flag"
"spa1g_Diet Dr. Pepper"
"spa2c_c"
"spa3c_c"
"spa3c_Diet Dr. Pepper"
"spa3c_1flag"
"spa4g_c"
"spa6c_1flag"
"spa6c_Diet Dr. Pepper"
"spa7c_Diet Dr. Pepper"
"spa7c_1flag"
"spa8g_1flag"
"spa8g_Diet Dr. Pepper"
"spa9g_1flag"
"spa9g_Diet Dr. Pepper"
"tan1c_con"
"tan1c_1flag"
"tan1g_c"
"tan1g_con"
"tan1g_1flag"
"tat2c_con"
"tat2c_ctf"
"tat2g_con"
"tat2g_eli"
"tat2g_hunt"
"tat3c_con"
"tat3c_1flag"
"tat3g_con"
"tat3g_1flag"
"uta1c_c"
"uta1c_con"
"uta1c_1flag"
"uta1g_con"
"uta1g_1flag"
"yav1c_con"
"yav1c_ctf"
"yav1g_c"
"yav1g_con"
"yav1g_ctf"

}
}
does anyone see any errors, the .odf files werent the problem im sure, and i also didnt get any errors, any help?

Re: game crashes when showing team name!

Posted: Tue Dec 30, 2008 4:10 pm
by fiddler_on_the_roof
If these are your added units,

Code: Select all

ReadDataFile("SIDE\\fix.lvl",
"rep_inf_ep2_jettrooper_rifleman",
"rep_inf_ep2_jettrooper_sniper",
"rep_inf_ep2_rocketeer_chaingun",
"rep_inf_ep2_officer")
it needs to be
ReadDataFile("dc:SIDE\\fix.lvl",
"rep_inf_ep2_jettrooper_rifleman",
"rep_inf_ep2_jettrooper_sniper",
"rep_inf_ep2_rocketeer_chaingun",
"rep_inf_ep2_officer")

that could be the problem. Try munging again after fixing.

Fixed your typo -Staff

Re: game crashes when showing team name!

Posted: Tue Dec 30, 2008 4:48 pm
by FragMe!
almost the right track, should be

ReadDataFile("dc:SIDE\\fix.lvl",

Re: game crashes when showing team name!

Posted: Tue Dec 30, 2008 5:55 pm
by fiddler_on_the_roof
yep, sorry, typo.

Re: game crashes when showing team name!

Posted: Tue Dec 30, 2008 7:11 pm
by 666rulerofclones
this wasnt for a mod map or an addon type of mod, the "fix.lvl" was in the SIDE folder in _lvl_pc, so that wasnt the problem

Re: game crashes when showing team name!

Posted: Wed Dec 31, 2008 1:21 pm
by [RDH]Zerted
You need to post your error log...

Re: Game crashes when showing team name!

Posted: Thu Jan 01, 2009 2:45 am
by 666rulerofclones
there werent any errors at all that i noticed in the logs

Re: Game crashes when showing team name!

Posted: Thu Jan 01, 2009 9:13 pm
by [RDH]Zerted
Any errors or problems with/in the Lua script or the req files would be shown in the error/debug log.