Page 1 of 1

Problem with VisualMunge [Solved]

Posted: Wed Feb 12, 2014 10:58 pm
by commanderawesome
Whenever I munge a map, nothing munges properly, it just leaves a bunch of 1 kb files and reqs. The map is still selectable in the instant action menu, but obviously it crashes on start. Is there a solution? (the lua is the only thing I changed, the map is just a copy of the death star.)

.lua scripts:

EP4c_con:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
---------------------------------------------------------------------------
-- 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()
TrashStuff();
PlayAnimExtend();
PlayAnimTakExtend();

BlockPlanningGraphArcs("compactor")
OnObjectKillName(CompactorConnectionOn, "grate01")

DisableBarriers("start_room_barrier")
DisableBarriers("dr_left")
DisableBarriers("circle_bar1")
DisableBarriers("circle_bar2")

-- handle reinforcment loss and defeat condition
OnCharacterDeathTeam(function(character, killer) AddReinforcements(1, -1) end, 1)
OnTicketCountChange(function(team, count) if count == 0 then MissionDefeat(team) end end)

OnObjectRespawnName(PlayAnimExtend, "Panel-Chasm");
OnObjectKillName(PlayAnimRetract, "Panel-Chasm");

OnObjectRespawnName(PlayAnimTakExtend, "Panel-Tak");
OnObjectKillName(PlayAnimTakRetract, "Panel-Tak");

EnableSPHeroRules()
SetObjectTeam("CP1", 1)
KillObject("CP3")
KillObject("CP4")
KillObject("CP5")
KillObject("CP6")
KillObject("CP7")
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"}
--cp7 = CommandPost:New{name = "CP7"}

--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:AddCommandPost(cp7)

conquest:Start()

AddDeathRegion("DeathRegion01")
AddDeathRegion("DeathRegion02")
AddDeathRegion("DeathRegion03")
AddDeathRegion("DeathRegion04")
AddDeathRegion("DeathRegion05")

end

function CompactorConnectionOn()
UnblockPlanningGraphArcs ("compactor")
end
--START BRIDGEWORK!

-- OPEN
function PlayAnimExtend()
PauseAnimation("bridgeclose");
RewindAnimation("bridgeopen");
PlayAnimation("bridgeopen");

-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection122");
DisableBarriers("BridgeBarrier");

end
-- CLOSE
function PlayAnimRetract()
PauseAnimation("bridgeopen");
RewindAnimation("bridgeclose");
PlayAnimation("bridgeclose");

-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection122");
EnableBarriers("BridgeBarrier");

end

--START BRIDGEWORK TAK!!!

-- OPEN
function PlayAnimTakExtend()
PauseAnimation("TakBridgeOpen");
RewindAnimation("TakBridgeClose");
PlayAnimation("TakBridgeClose");

-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection128");
DisableBarriers("Barrier222");

end
-- CLOSE
function PlayAnimTakRetract()
PauseAnimation("TakBridgeClose");
RewindAnimation("TakBridgeOpen");
PlayAnimation("TakBridgeOpen");

-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection128");
EnableBarriers("Barrier222");

end

function TrashStuff()

trash_open = 1
trash_closed = 0

trash_timer = CreateTimer("trash_timer")
SetTimerValue(trash_timer, 7)
StartTimer(trash_timer)
trash_death = OnTimerElapse(
function(timer)
if trash_open == 1 then
AddDeathRegion("deathregion")
SetTimerValue(trash_timer, 5)
StartTimer(trash_timer)
trash_closed = 1
trash_open = 0
print("death region added")

elseif trash_closed == 1 then
RemoveRegion("deathregion")
SetTimerValue(trash_timer, 15)
StartTimer(trash_timer)
print("death region removed")
trash_closed = 0
trash_open = 1
end
end,
trash_timer
)
end




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

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

ReadDataFile("sound\\dea.lvl;dea1gcw")


SetMaxFlyHeight(72)
SetMaxPlayerFlyHeight (72)
AISnipeSuitabilityDist(30)

ReadDataFile("SIDE\\all.lvl",
"all_hero_luke_storm",
"all_hero_hansolo_storm",
"all_hero_chewbacca")
ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_marine",
"imp_inf_engineer",
"imp_inf_pilot",
"imp_inf_officer")

ReadDataFile("SIDE\\imp.lvl",
"imp_hero_darthvader")

SetupTeams{

all={
team = ALL,
units = 3,
reinforcements = 50,
soldier = {"all_hero_luke_storm",0, 1},
assault = {"all_hero_hansolo_storm",0, 1},
engineer = {"all_hero_chewbacca",0, 1},

},

imp={
team = IMP,
units = 32,
reinforcements = 50,
soldier = {"imp_inf_rifleman",7, 25},
assault = {"imp_inf_marine",1, 4},
engineer = {"imp_inf_engineer",1, 4},
sniper = {"imp_inf_pilot",1, 4},
officer = {"imp_inf_officer",1, 4},


}
}

SetHeroClass(ALL, "rep_hero_obiwan")
SetHeroClass(IMP, "imp_hero_darthvader")

-- Level Stats
ClearWalkers()
-- AddWalkerType(0, 0) -- 8 droidekas (special case: 0 leg pairs)
-- AddWalkerType(1, 0) -- 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
local weaponCnt = 200
SetMemoryPoolSize ("Aimer", 0)
SetMemoryPoolSize ("AmmoCounter", weaponCnt)
SetMemoryPoolSize ("BaseHint", 300)
SetMemoryPoolSize ("EnergyBar", weaponCnt)
SetMemoryPoolSize ("EntityCloth", 18)
SetMemoryPoolSize ("EntityLight", 100)
SetMemoryPoolSize ("EntitySoundStatic", 30)
SetMemoryPoolSize ("SoundSpaceRegion", 50)
SetMemoryPoolSize ("MountedTurret", 0)
SetMemoryPoolSize ("Navigator", 50)
SetMemoryPoolSize ("Obstacle", 260)
SetMemoryPoolSize ("PathFollower", 50)
SetMemoryPoolSize ("PathNode", 512)
SetMemoryPoolSize ("RedOmniLight", 130)
SetMemoryPoolSize ("ShieldEffect", 0)
SetMemoryPoolSize ("TreeGridStack", 200)
SetMemoryPoolSize ("UnitAgent", 50)
SetMemoryPoolSize ("UnitController", 50)
SetMemoryPoolSize ("Weapon", weaponCnt)
SetMemoryPoolSize ("EntityFlyer", 6)

-- Local Stats
--SetTeamName (3, "locals")
--AddUnitClass (3, "ewk_inf_trooper", 4)
--AddUnitClass (3, "ewk_inf_repair", 6)
--SetUnitCount (3, 14)
--SetTeamAsFriend(3,ATT)
--SetTeamAsEnemy(3,DEF)


SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:EP4\\EP4.lvl", "dea1_Conquest")
SetDenseEnvironment("true")

--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\\dea.lvl", "dea1")
OpenAudioStream("sound\\dea.lvl", "dea1")
-- OpenAudioStream("sound\\cor.lvl", "dea1gcw_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_dea_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_dea_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2,"all_dea_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_dea_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_dea_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2,"imp_dea_amb_end", 2,1)

SetVictoryMusic(ALL, "all_dea_amb_victory")
SetDefeatMusic (ALL, "all_dea_amb_defeat")
SetVictoryMusic(IMP, "imp_dea_amb_victory")
SetDefeatMusic (IMP, "imp_dea_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)



AddCameraShot(-0.404895, 0.000992, -0.514360, -0.002240, -121.539894, 62.536297, -257.699493)
--Homestead
AddCameraShot(0.040922, -0.004049, -0.994299, -0.098381, -103.729523, 55.546598, -225.360893)
--Sarlac Pit
AddCameraShot(-1.0, 0.0, -0.514360, 0.0, -55.381485, 50.450953, -96.514324)
end
EP4g_con:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
---------------------------------------------------------------------------
-- 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()
TrashStuff();
PlayAnimExtend();
PlayAnimTakExtend();

BlockPlanningGraphArcs("compactor")
OnObjectKillName(CompactorConnectionOn, "grate01")

DisableBarriers("start_room_barrier")
DisableBarriers("dr_left")
DisableBarriers("circle_bar1")
DisableBarriers("circle_bar2")

-- handle reinforcment loss and defeat condition
OnCharacterDeathTeam(function(character, killer) AddReinforcements(1, -1) end, 1)
OnTicketCountChange(function(team, count) if count == 0 then MissionDefeat(team) end end)

OnObjectRespawnName(PlayAnimExtend, "Panel-Chasm");
OnObjectKillName(PlayAnimRetract, "Panel-Chasm");

OnObjectRespawnName(PlayAnimTakExtend, "Panel-Tak");
OnObjectKillName(PlayAnimTakRetract, "Panel-Tak");

EnableSPHeroRules()
SetObjectTeam("CP2", 1)
SetObjectTeam("CP7", 2)
KillObject("CP3")
KillObject("CP4")
KillObject("CP5")
KillObject("CP6")
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"}
cp7 = CommandPost:New{name = "CP7"}

--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:AddCommandPost(cp7)

conquest:Start()

AddDeathRegion("DeathRegion01")
AddDeathRegion("DeathRegion02")
AddDeathRegion("DeathRegion03")
AddDeathRegion("DeathRegion04")
AddDeathRegion("DeathRegion05")

end

function CompactorConnectionOn()
UnblockPlanningGraphArcs ("compactor")
end
--START BRIDGEWORK!

-- OPEN
function PlayAnimExtend()
PauseAnimation("bridgeclose");
RewindAnimation("bridgeopen");
PlayAnimation("bridgeopen");

-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection122");
DisableBarriers("BridgeBarrier");

end
-- CLOSE
function PlayAnimRetract()
PauseAnimation("bridgeopen");
RewindAnimation("bridgeclose");
PlayAnimation("bridgeclose");

-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection122");
EnableBarriers("BridgeBarrier");

end

--START BRIDGEWORK TAK!!!

-- OPEN
function PlayAnimTakExtend()
PauseAnimation("TakBridgeOpen");
RewindAnimation("TakBridgeClose");
PlayAnimation("TakBridgeClose");

-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection128");
DisableBarriers("Barrier222");

end
-- CLOSE
function PlayAnimTakRetract()
PauseAnimation("TakBridgeClose");
RewindAnimation("TakBridgeOpen");
PlayAnimation("TakBridgeOpen");

-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection128");
EnableBarriers("Barrier222");

end

function TrashStuff()

trash_open = 1
trash_closed = 0

trash_timer = CreateTimer("trash_timer")
SetTimerValue(trash_timer, 7)
StartTimer(trash_timer)
trash_death = OnTimerElapse(
function(timer)
if trash_open == 1 then
AddDeathRegion("deathregion")
SetTimerValue(trash_timer, 5)
StartTimer(trash_timer)
trash_closed = 1
trash_open = 0
print("death region added")

elseif trash_closed == 1 then
RemoveRegion("deathregion")
SetTimerValue(trash_timer, 15)
StartTimer(trash_timer)
print("death region removed")
trash_closed = 0
trash_open = 1
end
end,
trash_timer
)
end




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

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

ReadDataFile("sound\\dea.lvl;dea1gcw")


SetMaxFlyHeight(72)
SetMaxPlayerFlyHeight (72)
AISnipeSuitabilityDist(30)

ReadDataFile("SIDE\\all.lvl",
"all_hero_luke_storm",
"all_hero_hansolo_tat",
"all_hero_chewbacca",
"all_hero_leia")
ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_marine",
"imp_inf_engineer",
"imp_inf_pilot",
"imp_inf_officer")

ReadDataFile("SIDE\\imp.lvl",
"imp_hero_darthvader")

SetupTeams{

all={
team = ALL,
units = 4,
reinforcements = 50,
soldier = {"all_hero_luke_storm",0, 1},
assault = {"all_hero_hansolo_tat",0, 1},
engineer = {"all_hero_chewbacca",0, 1},
sniper = {"all_hero_leia",0, 1},

},

imp={
team = IMP,
units = 32,
reinforcements = 50,
soldier = {"imp_inf_rifleman",7, 25},
assault = {"imp_inf_marine",1, 4},
engineer = {"imp_inf_engineer",1, 4},
sniper = {"imp_inf_pilot",1, 4},
officer = {"imp_inf_officer",1, 4},


}
}

SetHeroClass(ALL, "rep_hero_obiwan")
SetHeroClass(IMP, "imp_hero_darthvader")

-- Level Stats
ClearWalkers()
-- AddWalkerType(0, 0) -- 8 droidekas (special case: 0 leg pairs)
-- AddWalkerType(1, 0) -- 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
local weaponCnt = 200
SetMemoryPoolSize ("Aimer", 0)
SetMemoryPoolSize ("AmmoCounter", weaponCnt)
SetMemoryPoolSize ("BaseHint", 300)
SetMemoryPoolSize ("EnergyBar", weaponCnt)
SetMemoryPoolSize ("EntityCloth", 18)
SetMemoryPoolSize ("EntityLight", 100)
SetMemoryPoolSize ("EntitySoundStatic", 30)
SetMemoryPoolSize ("SoundSpaceRegion", 50)
SetMemoryPoolSize ("MountedTurret", 0)
SetMemoryPoolSize ("Navigator", 50)
SetMemoryPoolSize ("Obstacle", 260)
SetMemoryPoolSize ("PathFollower", 50)
SetMemoryPoolSize ("PathNode", 512)
SetMemoryPoolSize ("RedOmniLight", 130)
SetMemoryPoolSize ("ShieldEffect", 0)
SetMemoryPoolSize ("TreeGridStack", 200)
SetMemoryPoolSize ("UnitAgent", 50)
SetMemoryPoolSize ("UnitController", 50)
SetMemoryPoolSize ("Weapon", weaponCnt)
SetMemoryPoolSize ("EntityFlyer", 6)

-- Local Stats
--SetTeamName (3, "locals")
--AddUnitClass (3, "ewk_inf_trooper", 4)
--AddUnitClass (3, "ewk_inf_repair", 6)
--SetUnitCount (3, 14)
--SetTeamAsFriend(3,ATT)
--SetTeamAsEnemy(3,DEF)


SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:EP4\\EP4.lvl", "dea1_Conquest")
SetDenseEnvironment("true")

--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\\dea.lvl", "dea1")
OpenAudioStream("sound\\dea.lvl", "dea1")
-- OpenAudioStream("sound\\cor.lvl", "dea1gcw_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_dea_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_dea_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2,"all_dea_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_dea_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_dea_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2,"imp_dea_amb_end", 2,1)

SetVictoryMusic(ALL, "all_dea_amb_victory")
SetDefeatMusic (ALL, "all_dea_amb_defeat")
SetVictoryMusic(IMP, "imp_dea_amb_victory")
SetDefeatMusic (IMP, "imp_dea_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)



AddCameraShot(-0.404895, 0.000992, -0.514360, -0.002240, -121.539894, 62.536297, -257.699493)
--Homestead
AddCameraShot(0.040922, -0.004049, -0.994299, -0.098381, -103.729523, 55.546598, -225.360893)
--Sarlac Pit
AddCameraShot(-1.0, 0.0, -0.514360, 0.0, -55.381485, 50.450953, -96.514324)
end
EP4g_eli:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
---------------------------------------------------------------------------
-- 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()
TrashStuff();
PlayAnimExtend();
PlayAnimTakExtend();

BlockPlanningGraphArcs("compactor")
OnObjectKillName(CompactorConnectionOn, "grate01")

DisableBarriers("start_room_barrier")
DisableBarriers("dr_left")
DisableBarriers("circle_bar1")
DisableBarriers("circle_bar2")

-- handle reinforcment loss and defeat condition
OnCharacterDeathTeam(function(character, killer) AddReinforcements(1, -1) end, 1)
OnTicketCountChange(function(team, count) if count == 0 then MissionDefeat(team) end end)

OnObjectRespawnName(PlayAnimExtend, "Panel-Chasm");
OnObjectKillName(PlayAnimRetract, "Panel-Chasm");

OnObjectRespawnName(PlayAnimTakExtend, "Panel-Tak");
OnObjectKillName(PlayAnimTakRetract, "Panel-Tak");

SetObjectTeam("CP1", 1)
KillObject("CP1")
KillObject("CP2")
KillObject("CP3")
KillObject("CP4")
KillObject("CP6")
--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"}
cp7 = CommandPost:New{name = "CP7"}

--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:AddCommandPost(cp7)

conquest:Start()

AddDeathRegion("DeathRegion01")
AddDeathRegion("DeathRegion02")
AddDeathRegion("DeathRegion03")
AddDeathRegion("DeathRegion04")
AddDeathRegion("DeathRegion05")

end

function CompactorConnectionOn()
UnblockPlanningGraphArcs ("compactor")
end
--START BRIDGEWORK!

-- OPEN
function PlayAnimExtend()
PauseAnimation("bridgeclose");
RewindAnimation("bridgeopen");
PlayAnimation("bridgeopen");

-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection122");
DisableBarriers("BridgeBarrier");

end
-- CLOSE
function PlayAnimRetract()
PauseAnimation("bridgeopen");
RewindAnimation("bridgeclose");
PlayAnimation("bridgeclose");

-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection122");
EnableBarriers("BridgeBarrier");

end

--START BRIDGEWORK TAK!!!

-- OPEN
function PlayAnimTakExtend()
PauseAnimation("TakBridgeOpen");
RewindAnimation("TakBridgeClose");
PlayAnimation("TakBridgeClose");

-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection128");
DisableBarriers("Barrier222");

end
-- CLOSE
function PlayAnimTakRetract()
PauseAnimation("TakBridgeClose");
RewindAnimation("TakBridgeOpen");
PlayAnimation("TakBridgeOpen");

-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection128");
EnableBarriers("Barrier222");

end

function TrashStuff()

trash_open = 1
trash_closed = 0

trash_timer = CreateTimer("trash_timer")
SetTimerValue(trash_timer, 7)
StartTimer(trash_timer)
trash_death = OnTimerElapse(
function(timer)
if trash_open == 1 then
AddDeathRegion("deathregion")
SetTimerValue(trash_timer, 5)
StartTimer(trash_timer)
trash_closed = 1
trash_open = 0
print("death region added")

elseif trash_closed == 1 then
RemoveRegion("deathregion")
SetTimerValue(trash_timer, 15)
StartTimer(trash_timer)
print("death region removed")
trash_closed = 0
trash_open = 1
end
end,
trash_timer
)
end




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

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

ReadDataFile("sound\\dea.lvl;dea1gcw")


SetMaxFlyHeight(72)
SetMaxPlayerFlyHeight (72)
AISnipeSuitabilityDist(30)

ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")
ReadDataFile("SIDE\\imp.lvl",
"imp_hero_darthvader")

SetupTeams{

all={
team = ALL,
units = 1,
reinforcements = 15,
soldier = {"rep_hero_obiwan",0, 1},

},

imp={
team = IMP,
units = 1,
reinforcements = 15,
soldier = {"imp_hero_darthvader",0, 1},


}
}


-- Level Stats
ClearWalkers()
-- AddWalkerType(0, 0) -- 8 droidekas (special case: 0 leg pairs)
-- AddWalkerType(1, 0) -- 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
local weaponCnt = 200
SetMemoryPoolSize ("Aimer", 0)
SetMemoryPoolSize ("AmmoCounter", weaponCnt)
SetMemoryPoolSize ("BaseHint", 300)
SetMemoryPoolSize ("EnergyBar", weaponCnt)
SetMemoryPoolSize ("EntityCloth", 18)
SetMemoryPoolSize ("EntityLight", 100)
SetMemoryPoolSize ("EntitySoundStatic", 30)
SetMemoryPoolSize ("SoundSpaceRegion", 50)
SetMemoryPoolSize ("MountedTurret", 0)
SetMemoryPoolSize ("Navigator", 50)
SetMemoryPoolSize ("Obstacle", 260)
SetMemoryPoolSize ("PathFollower", 50)
SetMemoryPoolSize ("PathNode", 512)
SetMemoryPoolSize ("RedOmniLight", 130)
SetMemoryPoolSize ("ShieldEffect", 0)
SetMemoryPoolSize ("TreeGridStack", 200)
SetMemoryPoolSize ("UnitAgent", 50)
SetMemoryPoolSize ("UnitController", 50)
SetMemoryPoolSize ("Weapon", weaponCnt)
SetMemoryPoolSize ("EntityFlyer", 6)

-- Local Stats
--SetTeamName (3, "locals")
--AddUnitClass (3, "ewk_inf_trooper", 4)
--AddUnitClass (3, "ewk_inf_repair", 6)
--SetUnitCount (3, 14)
--SetTeamAsFriend(3,ATT)
--SetTeamAsEnemy(3,DEF)


SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:EP4\\EP4.lvl", "dea1_Conquest")
SetDenseEnvironment("true")

--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\\dea.lvl", "dea1")
OpenAudioStream("sound\\dea.lvl", "dea1")
-- OpenAudioStream("sound\\cor.lvl", "dea1gcw_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_dea_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_dea_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2,"all_dea_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_dea_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_dea_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2,"imp_dea_amb_end", 2,1)

SetVictoryMusic(ALL, "all_dea_amb_victory")
SetDefeatMusic (ALL, "all_dea_amb_defeat")
SetVictoryMusic(IMP, "imp_dea_amb_victory")
SetDefeatMusic (IMP, "imp_dea_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)



AddCameraShot(-0.404895, 0.000992, -0.514360, -0.002240, -121.539894, 62.536297, -257.699493)
--Homestead
AddCameraShot(0.040922, -0.004049, -0.994299, -0.098381, -103.729523, 55.546598, -225.360893)
--Sarlac Pit
AddCameraShot(-1.0, 0.0, -0.514360, 0.0, -55.381485, 50.450953, -96.514324)
end
(Take a guess as to what I was trying to recreate. :wink: )

munge log:
Hidden/Spoiler:
ERROR[levelpack EP4.req]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
ERROR[levelpack EP4.req]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
[continuing]
2 Errors 0 Warnings

ERROR[levelpack EP4_eli.mrq]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
ERROR[levelpack EP4_eli.mrq]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
[continuing]
2 Errors 0 Warnings

ERROR[levelpack EP4.req]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
ERROR[levelpack EP4.req]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
[continuing]
2 Errors 0 Warnings

ERROR[levelpack dea1.req]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
ERROR[levelpack dea1.req]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
[continuing]
2 Errors 0 Warnings

ERROR[levelpack dea1_Conquest.mrq]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
ERROR[levelpack dea1_Conquest.mrq]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
[continuing]
ERROR[levelpack dea1_CTF-SingleFlag.mrq]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
ERROR[levelpack dea1_CTF-SingleFlag.mrq]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
[continuing]
4 Errors 0 Warnings

ERROR[levelpack dea1.req]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
ERROR[levelpack dea1.req]:Could not open ..\..\common\munged\pc\core.files for input. DOS reports:
No such file or directory
[continuing]
2 Errors 0 Warnings
Since I also brought up custom sides (and the above map obviously doesn't have any), it should be noted that I tried to munge the 212 side/skins from the BFX assets with the same outcome, the only change being the "ClassParent" line for commander cody to the ARC trooper from the "Rising Conflict" mod (for personal mod, will not be released to the public (the side not the map)).

Re: Problem with VisualMunge

Posted: Thu Feb 13, 2014 1:25 am
by Noobasaurus
Have you tried the munge fix?

Re: Problem with VisualMunge

Posted: Thu Feb 13, 2014 9:54 pm
by commanderawesome
Noobasaurus wrote:Have you tried the munge fix?
I run XP, not vista, would it still work?

Re: Problem with VisualMunge

Posted: Fri Feb 14, 2014 12:24 am
by Noobasaurus
It might. I used to run Windows 7 and it worked for me. Give it a try.

Re: Problem with VisualMunge

Posted: Fri Feb 14, 2014 11:34 pm
by commanderawesome
New issues: The map now munges into 2 files: EP4.lvl (2,834 KB) and dea1.lvl (39,801 KB), sides don't munge at all (different side this time, but similar concept, it just includes child classes of Pilot Luke and Stormtrooper Luke with Tatooine Luke's geometry. It of course also includes the model, (and all related files), cloth .odf and .reqs), the map still crashes and it doesn't leave a munge log!

I have modified the .lua:
EP4c_con
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
---------------------------------------------------------------------------
-- 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()
TrashStuff();
PlayAnimExtend();
PlayAnimTakExtend();

BlockPlanningGraphArcs("compactor")
OnObjectKillName(CompactorConnectionOn, "grate01")

DisableBarriers("start_room_barrier")
DisableBarriers("dr_left")
DisableBarriers("circle_bar1")
DisableBarriers("circle_bar2")

-- handle reinforcment loss and defeat condition
OnCharacterDeathTeam(function(character, killer) AddReinforcements(1, -1) end, 1)
OnTicketCountChange(function(team, count) if count == 0 then MissionDefeat(team) end end)

OnObjectRespawnName(PlayAnimExtend, "Panel-Chasm");
OnObjectKillName(PlayAnimRetract, "Panel-Chasm");

OnObjectRespawnName(PlayAnimTakExtend, "Panel-Tak");
OnObjectKillName(PlayAnimTakRetract, "Panel-Tak");

EnableSPHeroRules()
SetObjectTeam("CP1", 1)
KillObject("CP3")
KillObject("CP4")
KillObject("CP5")
KillObject("CP6")
KillObject("CP7")
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"}
--cp7 = CommandPost:New{name = "CP7"}

--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:AddCommandPost(cp7)

conquest:Start()

AddDeathRegion("DeathRegion01")
AddDeathRegion("DeathRegion02")
AddDeathRegion("DeathRegion03")
AddDeathRegion("DeathRegion04")
AddDeathRegion("DeathRegion05")

end

function CompactorConnectionOn()
UnblockPlanningGraphArcs ("compactor")
end
--START BRIDGEWORK!

-- OPEN
function PlayAnimExtend()
PauseAnimation("bridgeclose");
RewindAnimation("bridgeopen");
PlayAnimation("bridgeopen");

-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection122");
DisableBarriers("BridgeBarrier");

end
-- CLOSE
function PlayAnimRetract()
PauseAnimation("bridgeopen");
RewindAnimation("bridgeclose");
PlayAnimation("bridgeclose");

-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection122");
EnableBarriers("BridgeBarrier");

end

--START BRIDGEWORK TAK!!!

-- OPEN
function PlayAnimTakExtend()
PauseAnimation("TakBridgeOpen");
RewindAnimation("TakBridgeClose");
PlayAnimation("TakBridgeClose");

-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection128");
DisableBarriers("Barrier222");

end
-- CLOSE
function PlayAnimTakRetract()
PauseAnimation("TakBridgeClose");
RewindAnimation("TakBridgeOpen");
PlayAnimation("TakBridgeOpen");

-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection128");
EnableBarriers("Barrier222");

end

function TrashStuff()

trash_open = 1
trash_closed = 0

trash_timer = CreateTimer("trash_timer")
SetTimerValue(trash_timer, 7)
StartTimer(trash_timer)
trash_death = OnTimerElapse(
function(timer)
if trash_open == 1 then
AddDeathRegion("deathregion")
SetTimerValue(trash_timer, 5)
StartTimer(trash_timer)
trash_closed = 1
trash_open = 0
print("death region added")

elseif trash_closed == 1 then
RemoveRegion("deathregion")
SetTimerValue(trash_timer, 15)
StartTimer(trash_timer)
print("death region removed")
trash_closed = 0
trash_open = 1
end
end,
trash_timer
)
end




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

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

ReadDataFile("sound\\dea.lvl;dea1gcw")


SetMaxFlyHeight(72)
SetMaxPlayerFlyHeight (72)
AISnipeSuitabilityDist(30)

ReadDataFile("SIDE\\all.lvl",
"all_hero_luke_storm",
"all_hero_hansolo_storm",
"all_hero_chewbacca")
ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_marine",
"imp_inf_engineer",
"imp_inf_pilot",
"imp_inf_officer")

ReadDataFile("SIDE\\imp.lvl",
"imp_hero_darthvader")

SetupTeams{

all={
team = ALL,
units = 3,
reinforcements = 50,
soldier = {"all_hero_luke_storm",1, 1},
assault = {"all_hero_hansolo_storm",1, 1},
engineer = {"all_hero_chewbacca",1, 1},

},

imp={
team = IMP,
units = 32,
reinforcements = 50,
soldier = {"imp_inf_rifleman",7, 25},
assault = {"imp_inf_marine",1, 4},
engineer = {"imp_inf_engineer",1, 4},
sniper = {"imp_inf_pilot",1, 4},
officer = {"imp_inf_officer",1, 4},


}
}

SetHeroClass(ALL, "rep_hero_obiwan")
SetHeroClass(IMP, "imp_hero_darthvader")

-- Level Stats
ClearWalkers()
-- AddWalkerType(0, 0) -- 8 droidekas (special case: 0 leg pairs)
-- AddWalkerType(1, 0) -- 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
local weaponCnt = 200
SetMemoryPoolSize ("Aimer", 0)
SetMemoryPoolSize ("AmmoCounter", weaponCnt)
SetMemoryPoolSize ("BaseHint", 300)
SetMemoryPoolSize ("EnergyBar", weaponCnt)
SetMemoryPoolSize ("EntityCloth", 18)
SetMemoryPoolSize ("EntityLight", 100)
SetMemoryPoolSize ("EntitySoundStatic", 30)
SetMemoryPoolSize ("SoundSpaceRegion", 50)
SetMemoryPoolSize ("MountedTurret", 0)
SetMemoryPoolSize ("Navigator", 50)
SetMemoryPoolSize ("Obstacle", 260)
SetMemoryPoolSize ("PathFollower", 50)
SetMemoryPoolSize ("PathNode", 512)
SetMemoryPoolSize ("RedOmniLight", 130)
SetMemoryPoolSize ("ShieldEffect", 0)
SetMemoryPoolSize ("TreeGridStack", 200)
SetMemoryPoolSize ("UnitAgent", 50)
SetMemoryPoolSize ("UnitController", 50)
SetMemoryPoolSize ("Weapon", weaponCnt)
SetMemoryPoolSize ("EntityFlyer", 6)

-- Local Stats
--SetTeamName (3, "locals")
--AddUnitClass (3, "ewk_inf_trooper", 4)
--AddUnitClass (3, "ewk_inf_repair", 6)
--SetUnitCount (3, 14)
--SetTeamAsFriend(3,ATT)
--SetTeamAsEnemy(3,DEF)


SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:EP4\\EP4.lvl", "dea1_Conquest")
SetDenseEnvironment("true")

--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\\dea.lvl", "dea1")
OpenAudioStream("sound\\dea.lvl", "dea1")
-- OpenAudioStream("sound\\cor.lvl", "dea1gcw_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_dea_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_dea_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2,"all_dea_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_dea_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_dea_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2,"imp_dea_amb_end", 2,1)

SetVictoryMusic(ALL, "all_dea_amb_victory")
SetDefeatMusic (ALL, "all_dea_amb_defeat")
SetVictoryMusic(IMP, "imp_dea_amb_victory")
SetDefeatMusic (IMP, "imp_dea_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)



AddCameraShot(-0.404895, 0.000992, -0.514360, -0.002240, -121.539894, 62.536297, -257.699493)
--Homestead
AddCameraShot(0.040922, -0.004049, -0.994299, -0.098381, -103.729523, 55.546598, -225.360893)
--Sarlac Pit
AddCameraShot(-1.0, 0.0, -0.514360, 0.0, -55.381485, 50.450953, -96.514324)
end
EP4g_con
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
---------------------------------------------------------------------------
-- 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()
TrashStuff();
PlayAnimExtend();
PlayAnimTakExtend();

BlockPlanningGraphArcs("compactor")
OnObjectKillName(CompactorConnectionOn, "grate01")

DisableBarriers("start_room_barrier")
DisableBarriers("dr_left")
DisableBarriers("circle_bar1")
DisableBarriers("circle_bar2")

-- handle reinforcment loss and defeat condition
OnCharacterDeathTeam(function(character, killer) AddReinforcements(1, -1) end, 1)
OnTicketCountChange(function(team, count) if count == 0 then MissionDefeat(team) end end)

OnObjectRespawnName(PlayAnimExtend, "Panel-Chasm");
OnObjectKillName(PlayAnimRetract, "Panel-Chasm");

OnObjectRespawnName(PlayAnimTakExtend, "Panel-Tak");
OnObjectKillName(PlayAnimTakRetract, "Panel-Tak");

EnableSPHeroRules()
SetObjectTeam("CP2", 1)
SetObjectTeam("CP7", 2)
KillObject("CP3")
KillObject("CP4")
KillObject("CP5")
KillObject("CP6")
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"}
cp7 = CommandPost:New{name = "CP7"}

--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:AddCommandPost(cp7)

conquest:Start()

AddDeathRegion("DeathRegion01")
AddDeathRegion("DeathRegion02")
AddDeathRegion("DeathRegion03")
AddDeathRegion("DeathRegion04")
AddDeathRegion("DeathRegion05")

end

function CompactorConnectionOn()
UnblockPlanningGraphArcs ("compactor")
end
--START BRIDGEWORK!

-- OPEN
function PlayAnimExtend()
PauseAnimation("bridgeclose");
RewindAnimation("bridgeopen");
PlayAnimation("bridgeopen");

-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection122");
DisableBarriers("BridgeBarrier");

end
-- CLOSE
function PlayAnimRetract()
PauseAnimation("bridgeopen");
RewindAnimation("bridgeclose");
PlayAnimation("bridgeclose");

-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection122");
EnableBarriers("BridgeBarrier");

end

--START BRIDGEWORK TAK!!!

-- OPEN
function PlayAnimTakExtend()
PauseAnimation("TakBridgeOpen");
RewindAnimation("TakBridgeClose");
PlayAnimation("TakBridgeClose");

-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection128");
DisableBarriers("Barrier222");

end
-- CLOSE
function PlayAnimTakRetract()
PauseAnimation("TakBridgeClose");
RewindAnimation("TakBridgeOpen");
PlayAnimation("TakBridgeOpen");

-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection128");
EnableBarriers("Barrier222");

end

function TrashStuff()

trash_open = 1
trash_closed = 0

trash_timer = CreateTimer("trash_timer")
SetTimerValue(trash_timer, 7)
StartTimer(trash_timer)
trash_death = OnTimerElapse(
function(timer)
if trash_open == 1 then
AddDeathRegion("deathregion")
SetTimerValue(trash_timer, 5)
StartTimer(trash_timer)
trash_closed = 1
trash_open = 0
print("death region added")

elseif trash_closed == 1 then
RemoveRegion("deathregion")
SetTimerValue(trash_timer, 15)
StartTimer(trash_timer)
print("death region removed")
trash_closed = 0
trash_open = 1
end
end,
trash_timer
)
end




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

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

ReadDataFile("sound\\dea.lvl;dea1gcw")


SetMaxFlyHeight(72)
SetMaxPlayerFlyHeight (72)
AISnipeSuitabilityDist(30)

ReadDataFile("SIDE\\all.lvl",
"all_hero_luke_storm",
"all_hero_hansolo_tat",
"all_hero_chewbacca",
"all_hero_leia")
ReadDataFile("SIDE\\rep.lvl",
"rep_hero_obiwan")
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_marine",
"imp_inf_engineer",
"imp_inf_pilot",
"imp_inf_officer")

ReadDataFile("SIDE\\imp.lvl",
"imp_hero_darthvader")

SetupTeams{

all={
team = ALL,
units = 4,
reinforcements = 50,
soldier = {"all_hero_luke_storm",1, 1},
assault = {"all_hero_hansolo_tat",1, 1},
engineer = {"all_hero_chewbacca",1, 1},
sniper = {"all_hero_leia",1, 1},

},

imp={
team = IMP,
units = 32,
reinforcements = 50,
soldier = {"imp_inf_rifleman",7, 25},
assault = {"imp_inf_marine",1, 4},
engineer = {"imp_inf_engineer",1, 4},
sniper = {"imp_inf_pilot",1, 4},
officer = {"imp_inf_officer",1, 4},


}
}

SetHeroClass(ALL, "rep_hero_obiwan")
SetHeroClass(IMP, "imp_hero_darthvader")

-- Level Stats
ClearWalkers()
-- AddWalkerType(0, 0) -- 8 droidekas (special case: 0 leg pairs)
-- AddWalkerType(1, 0) -- 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
local weaponCnt = 200
SetMemoryPoolSize ("Aimer", 0)
SetMemoryPoolSize ("AmmoCounter", weaponCnt)
SetMemoryPoolSize ("BaseHint", 300)
SetMemoryPoolSize ("EnergyBar", weaponCnt)
SetMemoryPoolSize ("EntityCloth", 18)
SetMemoryPoolSize ("EntityLight", 100)
SetMemoryPoolSize ("EntitySoundStatic", 30)
SetMemoryPoolSize ("SoundSpaceRegion", 50)
SetMemoryPoolSize ("MountedTurret", 0)
SetMemoryPoolSize ("Navigator", 50)
SetMemoryPoolSize ("Obstacle", 260)
SetMemoryPoolSize ("PathFollower", 50)
SetMemoryPoolSize ("PathNode", 512)
SetMemoryPoolSize ("RedOmniLight", 130)
SetMemoryPoolSize ("ShieldEffect", 0)
SetMemoryPoolSize ("TreeGridStack", 200)
SetMemoryPoolSize ("UnitAgent", 50)
SetMemoryPoolSize ("UnitController", 50)
SetMemoryPoolSize ("Weapon", weaponCnt)
SetMemoryPoolSize ("EntityFlyer", 6)

-- Local Stats
--SetTeamName (3, "locals")
--AddUnitClass (3, "ewk_inf_trooper", 4)
--AddUnitClass (3, "ewk_inf_repair", 6)
--SetUnitCount (3, 14)
--SetTeamAsFriend(3,ATT)
--SetTeamAsEnemy(3,DEF)


SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:EP4\\EP4.lvl", "dea1_Conquest")
SetDenseEnvironment("true")

--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\\dea.lvl", "dea1")
OpenAudioStream("sound\\dea.lvl", "dea1")
-- OpenAudioStream("sound\\cor.lvl", "dea1gcw_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_dea_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_dea_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2,"all_dea_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_dea_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_dea_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2,"imp_dea_amb_end", 2,1)

SetVictoryMusic(ALL, "all_dea_amb_victory")
SetDefeatMusic (ALL, "all_dea_amb_defeat")
SetVictoryMusic(IMP, "imp_dea_amb_victory")
SetDefeatMusic (IMP, "imp_dea_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)



AddCameraShot(-0.404895, 0.000992, -0.514360, -0.002240, -121.539894, 62.536297, -257.699493)
--Homestead
AddCameraShot(0.040922, -0.004049, -0.994299, -0.098381, -103.729523, 55.546598, -225.360893)
--Sarlac Pit
AddCameraShot(-1.0, 0.0, -0.514360, 0.0, -55.381485, 50.450953, -96.514324)
end
EP4g_eli
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("setup_teams")
---------------------------------------------------------------------------
-- 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()

ReadDataFile("dc:SIDE\\dea1.lvl", "dea1g_eli")

TrashStuff();
PlayAnimExtend();
PlayAnimTakExtend();

BlockPlanningGraphArcs("compactor")
OnObjectKillName(CompactorConnectionOn, "grate01")

DisableBarriers("start_room_barrier")
DisableBarriers("dr_left")
DisableBarriers("circle_bar1")
DisableBarriers("circle_bar2")

-- handle reinforcment loss and defeat condition
OnCharacterDeathTeam(function(character, killer) AddReinforcements(1, -1) end, 1)
OnTicketCountChange(function(team, count) if count == 0 then MissionDefeat(team) end end)

OnObjectRespawnName(PlayAnimExtend, "Panel-Chasm");
OnObjectKillName(PlayAnimRetract, "Panel-Chasm");

OnObjectRespawnName(PlayAnimTakExtend, "Panel-Tak");
OnObjectKillName(PlayAnimTakRetract, "Panel-Tak");

EnableSPHeroRules()
KillObject("CP1")
KillObject("CP4")
KillObject("CP3")
KillObject("CP4")
KillObject("CP6")
SetProperty("CP5", "Team", "1")
SetProperty("CP7", "Team", "2")
SetProperty("CP1", "CaptureRegion", "nil")
SetProperty("CP2", "CaptureRegion", "nil")
SetProperty("CP3", "CaptureRegion", "nil")
SetProperty("CP4", "CaptureRegion", "nil")
SetProperty("CP5", "CaptureRegion", "nil")
SetProperty("CP7", "CaptureRegion", "nil")
SetProperty("CP1", "HUDIndexDisplay", "")
SetProperty("CP2", "HUDIndexDisplay", "")
SetProperty("CP3", "HUDIndexDisplay", "")
SetProperty("CP4", "HUDIndexDisplay", "")
SetProperty("CP5", "HUDIndexDisplay", "")
SetProperty("CP7", "HUDIndexDisplay", "")
SetClassProperty("com_bldg_major_controlzone", "SwitchClassRadius", 5.0)

--This sets up the actual objective. This needs to happen after cp's are defined
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", 15)
AddAIGoal(2, "Deathmatch", 15)

AddDeathRegion("DeathRegion01")
AddDeathRegion("DeathRegion02")
AddDeathRegion("DeathRegion03")
AddDeathRegion("DeathRegion04")
AddDeathRegion("DeathRegion05")

end

function CompactorConnectionOn()
UnblockPlanningGraphArcs ("compactor")
end
--START BRIDGEWORK!

-- OPEN
function PlayAnimExtend()
PauseAnimation("bridgeclose");
RewindAnimation("bridgeopen");
PlayAnimation("bridgeopen");

-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection122");
DisableBarriers("BridgeBarrier");

end
-- CLOSE
function PlayAnimRetract()
PauseAnimation("bridgeopen");
RewindAnimation("bridgeclose");
PlayAnimation("bridgeclose");

-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection122");
EnableBarriers("BridgeBarrier");

end

--START BRIDGEWORK TAK!!!

-- OPEN
function PlayAnimTakExtend()
PauseAnimation("TakBridgeOpen");
RewindAnimation("TakBridgeClose");
PlayAnimation("TakBridgeClose");

-- allow the AI to run across it
UnblockPlanningGraphArcs("Connection128");
DisableBarriers("Barrier222");

end
-- CLOSE
function PlayAnimTakRetract()
PauseAnimation("TakBridgeClose");
RewindAnimation("TakBridgeOpen");
PlayAnimation("TakBridgeOpen");

-- prevent the AI from running across it
BlockPlanningGraphArcs("Connection128");
EnableBarriers("Barrier222");

end

function TrashStuff()

trash_open = 1
trash_closed = 0

trash_timer = CreateTimer("trash_timer")
SetTimerValue(trash_timer, 7)
StartTimer(trash_timer)
trash_death = OnTimerElapse(
function(timer)
if trash_open == 1 then
AddDeathRegion("deathregion")
SetTimerValue(trash_timer, 5)
StartTimer(trash_timer)
trash_closed = 1
trash_open = 0
print("death region added")

elseif trash_closed == 1 then
RemoveRegion("deathregion")
SetTimerValue(trash_timer, 15)
StartTimer(trash_timer)
print("death region removed")
trash_closed = 0
trash_open = 1
end
end,
trash_timer
)
end




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

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

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

ReadDataFile("sound\\dea.lvl;dea1gcw")


SetMaxFlyHeight(72)
SetMaxPlayerFlyHeight (72)
AISnipeSuitabilityDist(30)

ReadDataFile("sound\\tat.lvl;tat2gcw")

ReadDataFile("SIDE\\imp.lvl",
"imp_hero_darthvader")

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


SetupTeams{
hero = {
team = ALL,
units = 1,
reinforcements = -1,
soldier = { "rep_hero_obiwan",1,1},
},
}


SetupTeams{
villain = {
team = IMP,
units = 1,
reinforcements = -1,
soldier = { "imp_hero_darthvader", 1,1},

},
}

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

-- Local Stats
--SetTeamName (3, "locals")
--AddUnitClass (3, "ewk_inf_trooper", 4)
--AddUnitClass (3, "ewk_inf_repair", 6)
--SetUnitCount (3, 14)
--SetTeamAsFriend(3,ATT)
--SetTeamAsEnemy(3,DEF)


SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:EP4\\EP4.lvl", "dea1_Conquest")
SetDenseEnvironment("true")

--SetStayInTurrets(1)


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

-- Sound

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)



AddCameraShot(-0.404895, 0.000992, -0.514360, -0.002240, -121.539894, 62.536297, -257.699493)
--Homestead
AddCameraShot(0.040922, -0.004049, -0.994299, -0.098381, -103.729523, 55.546598, -225.360893)
--Sarlac Pit
AddCameraShot(-1.0, 0.0, -0.514360, 0.0, -55.381485, 50.450953, -96.514324)
end
Here is the BFront2 log:
Hidden/Spoiler:
Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(866)
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

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

ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to compare two nil values
stack traceback:
(none): in function `ifs_login_EnterInterface'
(none): in function <(none):598>

ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to compare two nil values
stack traceback:
(none): in function `ifs_login_EnterInterface'
(none): in function <(none):598>

ifs_sp_campaign: Input_Accept(): Entered: _tab_instant
missionlist_ExpandMapList()
ifs_missionselect_pcMulti_fnSetMapPreview(): Defaulting index to 1
this.CurButton = check_mode1
cur_button = nil
Checkbox for check_era3 clicked
this.CurButton = check_era3
cur_button = nil
custom_AddMapNew()
custom_printTable(): table: 03CE122C
The key, value is: era_g 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: era_c 1
The key, value is: mode_eli_g 1
The key is mapluafile, the formated value is: EP4<A>_<B>
The key, value is: mode_con_g 1
The key, value is: mode_ctf_g 1
The key, value is: mode_ctf_c 1
custom_printTable(): Returning
custom_printTable(): table: 03CE67EC
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_c Era = era_c subst = c
Adding map: EP4c_con idx: 1
this.CurButton = _map_add
cur_button = nil
this.CurButton = Launch
cur_button = nil

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture hud_target_hint_offscreen

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture hud_target_hint_offscreen

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture btn_directional_pad_LR
game_interface: Entered
utility_functions2: Listening on AddUnitClass() calls
utility_functions2: Listening on SetHeroClass() calls
utility_functions2: Listening on ReadDataFile() calls
game_interface: Reading in custom strings
game_interface: No user_script_0.lvl
game_interface: No user_script_1.lvl
game_interface: No user_script_2.lvl
game_interface: No user_script_3.lvl
game_interface: No user_script_4.lvl
game_interface: No user_script_5.lvl
game_interface: No user_script_6.lvl
game_interface: No user_script_7.lvl
game_interface: No user_script_8.lvl
game_interface: No user_script_9.lvl
game_interface: No user_script_10.lvl
ifs_sideselect_fnBuildScreen()
game_interface: Exited

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1058)
Entity "com_weap_veh_guided_rocket_ord" unknown terrain collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1073)
Entity "com_weap_veh_guided_rocket_ord" unknown vehicle collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1065)
Entity "com_weap_veh_guided_rocket_ord" unknown building collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1051)
Entity "com_weap_veh_guided_rocket_ord" unknown targetable collision "CollisionMesh"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1058)
Entity "com_weap_award_rocket_launcher_" unknown terrain collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1073)
Entity "com_weap_award_rocket_launcher_" unknown vehicle collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1065)
Entity "com_weap_award_rocket_launcher_" unknown building collision "p_front_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1051)
Entity "com_weap_award_rocket_launcher_" unknown targetable collision "CollisionMesh"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1065)
Entity "com_weap_inf_remotedroid_ord" unknown building collision "p_buildingsphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1073)
Entity "com_weap_inf_remotedroid_ord" unknown vehicle collision "p_buildingsphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1089)
Entity "com_weap_inf_remotedroid_ord" unknown ordnance collision "p_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\EntityGeometry.cpp(1081)
Entity "com_weap_inf_remotedroid_ord" unknown soldier collision "p_sphere"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp2_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp2_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp2_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp2_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp2_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp2_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp2_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp2_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_hostile_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_bacta_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_mechanic_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_ammo_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_backup_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_clear_area_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (imp1_inf_pc_com_defend_inVehicle): unknown modifier "InVehicle"

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (d6c288e8)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (6616778a)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (ef255e37)!

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (c3a9860f)!
uf_updateClassIndex(): Added class: all_hero_luke_storm
uf_updateClassIndex(): Added class: all_hero_hansolo_storm
uf_updateClassIndex(): Added class: all_hero_chewbacca
uf_updateClassIndex(): Added class: imp_inf_rifleman
uf_updateClassIndex(): Added class: imp_inf_marine
uf_updateClassIndex(): Added class: imp_inf_pilot
uf_updateClassIndex(): Added class: imp_inf_engineer
uf_updateClassIndex(): Added class: imp_inf_officer
uf_updateClassIndex(): Added class: rep_hero_obiwan
uf_updateClassIndex(): Added class: imp_hero_darthvader
utility_functions2: ReadDataFile(): This map's code, mode: ep4 dea1_conquest

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\SkyManager.cpp(122)
Skyfile FarSceneRange is in old format

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(829)
Unable to find level chunk dea1_Conquest in C:\Program Files\LucasArts\Star Wars Battlefront II\GameData\AddOn\EP4\Data\_lvl_pc\EP4\EP4.lvl


Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(1019)
Unable to find level chunk in dc:EP4\EP4.lvl



Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 336

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "SoldierAnimation" is full; raise count to at least 340

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(3355)
Animation group "bridgeclose" not found

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(3368)
Animation group "bridgeopen" not found

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(3342)
Animation group "bridgeopen" not found

Re: Problem with VisualMunge

Posted: Sat Feb 15, 2014 2:54 am
by Noobasaurus
Have you tried munging a non edited map? Try that and start from there if it works. Take small steps.

Code: Select all

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(829)
Unable to find level chunk dea1_Conquest in C:\Program Files\LucasArts\Star Wars Battlefront II\GameData\AddOn\EP4\Data\_lvl_pc\EP4\EP4.lvl
There's your problem. It's trying to find a layer in the map that doesn't exist. What do your layers look like in ZE, and what does your EP4.req (located in the worlds folder) look like? -- Nevermind.

How did you go about importing the Death Star map into your level?

For your sides, did you include a common folder along with your edited side? Is your side a completely new 3 letter comination (ex UWH) or is it a stock one (ex IMP)? If you made a completely new one, there's some extra steps you'll need to take to get it working.

And if you're looking to simply made a side mod/era for the Death Star, you don't need to whole map for it. You can do it via your lua and addme scripts.

Re: Problem with VisualMunge

Posted: Sun Feb 16, 2014 7:02 pm
by commanderawesome
Noobasaurus wrote:Have you tried munging a non edited map? Try that and start from there if it works. Take small steps.

Code: Select all

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LoadUtil.cpp(829)
Unable to find level chunk dea1_Conquest in C:\Program Files\LucasArts\Star Wars Battlefront II\GameData\AddOn\EP4\Data\_lvl_pc\EP4\EP4.lvl
There's your problem. It's trying to find a layer in the map that doesn't exist. What do your layers look like in ZE, and what does your EP4.req (located in the worlds folder) look like? -- Nevermind.

How did you go about importing the Death Star map into your level?

The tutorial in DeathRow's post: viewtopic.php?f=27&t=8519

For your sides, did you include a common folder along with your edited side?

No. Is that required? How would I do that?

Is your side a completely new 3 letter comination (ex UWH) or is it a stock one (ex IMP)?

The side name is "luke".

If you made a completely new one, there's some extra steps you'll need to take to get it working.

Can you give me a link to a tutorial for that?

And if you're looking to simply made a side mod/era for the Death Star, you don't need to whole map for it. You can do it via your lua and addme scripts.

I don't wan't it to override the stock missions. Is it possible to just load the original map in the lua instead of a copy? Either way, though, I DO plan on making completely original maps in the future.
Answers in italics.

Re: Problem with VisualMunge

Posted: Mon Feb 17, 2014 1:44 am
by Noobasaurus
Alright, I didn't look at that tutorial, but I'm assuming that it works and that you followed it correctly. I'm lazy right now, don't judge.

For the common folder, you'll want to go into the side assets that come with the mod tools and copy over the entire common folder to your sides folder. Now you'll have two folders in your sides folder. The common folder includes all of the bases for weapons and units. Without it, not many things will work.

For your side name, I'm pretty sure you can't have over 3 letters. So change it to LUK or something, along with all of the files inside. Only the reqs though because everything else should still work.

Tutorial wise for your era, I'd recommend this: http://starwarsbattlefront.filefront.co ... ial;106441 (I'm lazy and stuff is broken, so you get a link)
I used that so many times it's not even funny. I'm pretty sure it says how to create a completely new side and get it to munge, but if not tell me and I'll explain it.

For the side/era mod part: it won't override the stock missions. Instead, it'll be added on below the default eras as a new era. Or if you want to make a mode you can do that as well. If you want to load the Death Star map from the lua, copy over the lua from the death star and rename it according to your new era (ex dea1p_con). Then load your new sides in it. Don't forget to copy/paste/edit all of the reqs in the mission folder as well as the mission.lua. There's a tutorial somewhere for this. You'll probably find it in the FAQ. The addon information is also in a tutorial in the FAQ. If you can't find the things I'm talking about then I'll fetch links for you.

...ok, so I decided to fetch the links but they aren't working. In the FAQ, search for "Custom side: How to" and "Era/Mode Side Mod Tutorial". Those tutorials should be good.

Re: Problem with VisualMunge

Posted: Fri Feb 21, 2014 2:38 pm
by commanderawesome
Noobasaurus wrote:Alright, I didn't look at that tutorial, but I'm assuming that it works and that you followed it correctly. I'm lazy right now, don't judge.

For the common folder, you'll want to go into the side assets that come with the mod tools and copy over the entire common folder to your sides folder. Now you'll have two folders in your sides folder. The common folder includes all of the bases for weapons and units. Without it, not many things will work.

For your side name, I'm pretty sure you can't have over 3 letters. So change it to LUK or something, along with all of the files inside. Only the reqs though because everything else should still work.

Tutorial wise for your era, I'd recommend this: http://starwarsbattlefront.filefront.co ... ial;106441 (I'm lazy and stuff is broken, so you get a link)
I used that so many times it's not even funny. I'm pretty sure it says how to create a completely new side and get it to munge, but if not tell me and I'll explain it.

For the side/era mod part: it won't override the stock missions. Instead, it'll be added on below the default eras as a new era. Or if you want to make a mode you can do that as well. If you want to load the Death Star map from the lua, copy over the lua from the death star and rename it according to your new era (ex dea1p_con). Then load your new sides in it. Don't forget to copy/paste/edit all of the reqs in the mission folder as well as the mission.lua. There's a tutorial somewhere for this. You'll probably find it in the FAQ. The addon information is also in a tutorial in the FAQ. If you can't find the things I'm talking about then I'll fetch links for you.

...ok, so I decided to fetch the links but they aren't working. In the FAQ, search for "Custom side: How to" and "Era/Mode Side Mod Tutorial". Those tutorials should be good.
Map port tutorial: Don't worry, it works, here's an example (the sole map I've publicly released): http://starwarsbattlefront.filefront.com/file/;121689

Side name: I've seen sides with bigger name, the sides in the conversion pack for example.

Era mod: I'd prefer it to be a separate "map" on the instant action menu, as I wanted to add the BFX era to it.

EDIT
I still need help with this.

Re: Problem with VisualMunge

Posted: Fri Feb 21, 2014 9:48 pm
by Noobasaurus
Did you change anything within the map after you ported it over, such as object placement? If not, then you don't need to port it over. You can load any stock level from your lua. Near the bottom of your lua, there should be a line titled: "ReadDataFile(...)". You want to change all of that to "ReadDataFile("dea\\dea1.lvl", "dea1_Conquest")", without quotations on the outside of course. This way, the addme tells the game to load it as a separate map, but the lua tells it to load the stock Death Star level. Then you can safely delete anything in your worlds folder and do a clean so that the file size is much smaller.

You probably want to keep your side name as 3 letters, just to be on the safe side. Did you go to the sides part of that tutorial I linked to you? It tells you how to properly set up a custom side. Did you copy the common folder over to your sides folder?

Re: Problem with VisualMunge

Posted: Sat Feb 22, 2014 7:11 pm
by commanderawesome
Thread is dead, go HERE