Map Crash without any reason

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Map Crash without any reason

Post by elfie »

Oddly my map crashed that I have been working on for a very long time. I haven't touched any of the luas, World.req files, sky files, fx files or any part of the sides for a while. All i did was place an object that I had made in XSI in ZE and it appeared translucent in Zeroeditor also for an unknown reason. I munged my map and got only three errors:
Hidden/Spoiler:
Message Severity: 3
.\Source\LoadUtil.cpp(1019)
Unable to find level chunk in MISSION.lvl


Message Severity: 3
.\Source\LuaHelper.cpp(112)
OpenScript(WARg_hunt): script (0df6034e) not found

Message Severity: 5
.\Source\GameState.cpp(1283)
Could not open MISSION\WARg_hunt.lvl
Munge log:
Hidden/Spoiler:
C:\BF2\ToolsFL\Bin\luac.exe: cannot read ..\..\common\scripts\Copy: No such file or directory
ERROR[scriptmunge scripts\Copy of ObjectiveTDM.lua]:Could not read input file.ERROR[scriptmunge scripts\Copy of ObjectiveTDM.lua]:Could not read input file. [continuing]
C:\BF2\ToolsFL\Bin\luac.exe: cannot read ..\..\common\scripts\WAR\Copy: No such file or directory
ERROR[scriptmunge scripts\WAR\Copy of WARg_ctf.lua]:Could not read input file.ERROR[scriptmunge scripts\WAR\Copy of WARg_ctf.lua]:Could not read input file. [continuing]
I haven't touched the scripts in over a month but here is the lua to look at anyhow:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveTDM")
ScriptCB_DoFile("setup_teams")

-- Empire Attacking (attacker is always #1)
ALL = 2
IMP = 1
-- 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()

AddDeathRegion("fall")

DisableBarriers("conquestbar")
DisableBarriers("bombbar")
--force all the human players onto the attacking side

KillObject("CP7OBJ")
KillObject("shieldgen")
KillObject("CP7OBJ")
KillObject("hangarcp")
KillObject("enemyspawn")
KillObject("enemyspawn2")
KillObject("echoback2")
KillObject("echoback1")
KillObject("shield")
SetProperty("ship", "MaxHealth", 1e+37)
SetProperty("ship", "CurHealth", 1e+37)
SetProperty("ship2", "MaxHealth", 1e+37)
SetProperty("ship2", "CurHealth", 1e+37)
SetProperty("ship3", "MaxHealth", 1e+37)
SetProperty("ship3", "CurHealth", 1e+37)
-- SetProperty("echoback1", "MaxHealth", 1500)
-- SetProperty("echoback1", "CurHealth", 1500)
-- SetProperty("echoback2", "MaxHealth", 1500)
-- SetProperty("echoback2", "CurHealth", 1500)

hunt = ObjectiveTDM:New{teamATT = 1, teamDEF = 2, pointsPerKillATT = 1, pointsPerKillDEF = 3, textATT = "game.modes.hunt", textDEF = "game.modes.hunt2", multiplayerRules = true}

hunt.OnStart = function(self)
AddAIGoal(ATT, "Deathmatch", 1000)
AddAIGoal(DEF, "Deathmatch", 1000)
end


hunt:Start()
SetUberMode(1);
EnableSPHeroRules()

end

function ScriptInit()
if(ScriptCB_GetPlatform() == "PS2") then
StealArtistHeap(1024*1024) -- steal 1MB from art heap
end

-- Designers, these two lines *MUST* be first.
--SetPS2ModelMemory(4500000)
SetPS2ModelMemory(3300000)
ReadDataFile("ingame.lvl")

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

--SetAttackingTeam(ATT)


SetMaxFlyHeight(7000)
SetMaxPlayerFlyHeight(7000)
SetGroundFlyerMap(1);

ReadDataFile("sound\\kam.lvl;kam1cw")
ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_rifleman_jungle",
"all_inf_rifleman_desert",
"all_inf_rifleman_urban",
"all_inf_engineer",
"all_inf_robot",
"all_inf_robot_assault",
"all_inf_sergeant")


ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_terrorist",
"all_inf_terrorist2",
"all_inf_terrorist3",
"all_inf_terrorist4",
"all_inf_robot",
"all_inf_robot_assault",
"all_inf_terrorist_commander")

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


SetupTeams{

all={
team = ALL,
units = 42,
reinforcements = -1,
soldier = {"all_inf_rifleman_jungle",9, 35},
assault = {"all_inf_rifleman_desert",1,5},
engineer = {"all_inf_engineer",1,5},
sniper = {"all_inf_rifleman_urban",1,5},
officer = {"all_inf_robot",1,5},
special = {"all_inf_robot_assault",1,5},

},

wampa={
team = IMP,
units = 42,
reinforcements = -1,
soldier = { "all_inf_terrorist",9, 35},
assault = { "all_inf_terrorist2",1,5},
engineer = { "all_inf_terrorist3",1,5},
sniper = { "all_inf_terrorist4",1,5},
officer = { "all_inf_robot",1,5},
special = { "all_inf_robot_assault",1,5},
}
}

SetHeroClass(ALL, "all_inf_sergeant")
SetHeroClass(IMP, "all_inf_terrorist_commander")

-- Level Stats
ClearWalkers()
SetMemoryPoolSize("EntityWalker", -2)
AddWalkerType(0, 0) -- 0 droidekas
AddWalkerType(1, 5) -- 6 atsts with 1 leg pairs each
AddWalkerType(2, 2) -- 2 atats with 2 leg pairs each

SetMemoryPoolSize("Aimer", 90)
SetMemoryPoolSize("AmmoCounter", 269)
SetMemoryPoolSize("BaseHint", 250)
SetMemoryPoolSize("CommandWalker", 2)
SetMemoryPoolSize("ConnectivityGraphFollower", 56)
SetMemoryPoolSize("EnergyBar", 269)
SetMemoryPoolSize("EntityCloth", 28)
SetMemoryPoolSize("EntityFlyer", 6)
SetMemoryPoolSize("EntityLight", 225)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntitySoundStatic", 16)
SetMemoryPoolSize("EntitySoundStream", 5)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 54)
SetMemoryPoolSize("MountedTurret", 46)
SetMemoryPoolSize("Navigator", 63)
SetMemoryPoolSize("Obstacle", 400)
SetMemoryPoolSize("OrdnanceTowCable", 40) -- !!!! need +4 extra for wrapped/fallen cables !!!!
SetMemoryPoolSize("PathFollower", 63)
SetMemoryPoolSize("PathNode", 268)
SetMemoryPoolSize("RedOmniLight", 240)
SetMemoryPoolSize("TreeGridStack", 329)
SetMemoryPoolSize("UnitController", 63)
SetMemoryPoolSize("UnitAgent", 63)
SetMemoryPoolSize("Weapon", 269)

ReadDataFile("dc:WAR\\WAR.lvl", "WAR_hunt")
--ReadDataFile("tan\\tan1.lvl", "tan1_obj")
SetSpawnDelay(10.0, 0.25)
SetDenseEnvironment("false")
SetDefenderSnipeRange(170)
AddDeathRegion("Death")


-- Sound Stats

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\\hot.lvl", "hot1gcw")
OpenAudioStream("sound\\hot.lvl", "hot1gcw")

-- 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, IMP, "all_hot_transport_away", .75, 1)
-- SetLowReinforcementsVoiceOver(ALL, IMP, "all_hot_transport_away", .5, 1)
-- SetLowReinforcementsVoiceOver(ALL, IMP, "all_hot_transport_away", .25, 1)

-- SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
-- SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
-- SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
-- SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Allleaving")
-- SetOutOfBoundsVoiceOver(1, "Impleaving")

SetAmbientMusic(ALL, 1.0, "all_hot_amb_hunt", 0,1)
-- SetAmbientMusic(ALL, 0.9, "all_hot_amb_middle", 1,1)
-- SetAmbientMusic(ALL, 0.1, "all_hot_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_hot_amb_hunt", 0,1)
-- SetAmbientMusic(IMP, 0.9, "imp_hot_amb_middle", 1,1)
-- SetAmbientMusic(IMP, 0.1, "imp_hot_amb_end", 2,1)

SetVictoryMusic(ALL, "all_hot_amb_victory")
SetDefeatMusic (ALL, "all_hot_amb_defeat")
SetVictoryMusic(IMP, "imp_hot_amb_victory")
SetDefeatMusic (IMP, "imp_hot_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")


-- Camera Stats
--Hoth
--Hangar
AddCameraShot(0.944210, 0.065541, 0.321983, -0.022350, -500.489838, 0.797472, -68.773849)
--Shield Generator
AddCameraShot(0.371197, 0.008190, -0.928292, 0.020482, -473.384155, -17.880533, 132.126801)
--Battlefield
AddCameraShot(0.927083, 0.020456, -0.374206, 0.008257, -333.221558, 0.676043, -14.027348)


end
:( :(
Hebes24
Sith Master
Sith Master
Posts: 2594
Joined: Sat Jun 03, 2006 5:15 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: In An Epic Space Battle!
Contact:

Re: Map Crash without any reason

Post by Hebes24 »

it looks like your .lua is named "copy of WARg_ctf.lua" rename it to get rid of "copy of"
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Map Crash without any reason

Post by Teancum »

Or, if you have the original files and "copy of" files, then move the "copy of"s to the root directory of your project, just to make sure they don't get munged. :yes:
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Map Crash without any reason

Post by elfie »

Did it and still got FATAL. I didn't think that was the problem. I have probably munged my map a hundred times since the last time I changed the scripts. The system seems to be acting bizare. It is munging files that I haven't edited for a whole month for some reason. :?

EDIT:
ARGHH!!!! It doesn't work anymore!! All that time I spent on this map is gone.
Last edited by elfie on Mon Jun 30, 2008 5:41 pm, edited 1 time in total.
theITfactor
Chief Warrant Officer
Chief Warrant Officer
Posts: 327
Joined: Wed Jun 28, 2006 12:56 pm
Projects :: The Pwnfest and Games Complex
Games I'm Playing :: SWTOR
xbox live or psn: You and I Know
Location: The Old Republic
Contact:

Re: Map Crash without any reason

Post by theITfactor »

elfie wrote:Did it and still got FATAL. I didn't think that was the problem. I have probably munged my map a hundred times since the last time I changed the scripts. The system seems to be acting bizare. It is munging files that I haven't edited for a whole month for some reason. :?
When do you get FATAL? I get it sometimes when I have too many programs open and try to test a map.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Map Crash without any reason

Post by Teancum »

elfie wrote:Did it and still got FATAL. I didn't think that was the problem. I have probably munged my map a hundred times since the last time I changed the scripts. The system seems to be acting bizare. It is munging files that I haven't edited for a whole month for some reason. :?

EDIT:
ARGHH!!!! It doesn't work anymore!! All that time I spent on this map is gone.
You haven't lost it entirely. If all else fails, do a manual clean and rar the side up, then upload it and give me the link. You're a good member of the community so it's no big deal to help you. Leave me as a last resort though as I'm pretty busy.
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Map Crash without any reason

Post by elfie »

You haven't lost it entirely. If all else fails, do a manual clean and rar the side up, then upload it and give me the link. You're a good member of the community so it's no big deal to help you. Leave me as a last resort though as I'm pretty busy.
:mrgreen: Thanks Tean, I really appreciate that! I promise I wont bug you unless I absolutly have to. And to everyone else who has been helping me thank you also! This is a pretty decent map and I don't want it to not work because then I can't release it so all of you guys can enjoy it. :D I will try and fix it as best I can. It is weird though, I think something happened to the files out of no where, because the munge was munging files that have not been modified for a long time and it usually never does that.
User avatar
wishihadaname
Captain
Captain
Posts: 493
Joined: Fri Dec 28, 2007 2:10 pm
Projects :: The Corellian Resistance
Games I'm Playing :: Halo Reach and LOTRO
Location: Look to your left.... no, your other left....

Re: Map Crash without any reason

Post by wishihadaname »

well as nooby as i am i think i know how something mite help. i have the same problem on one of my maps but i ditched it couldn't figure out what it was :( anyway if i got this correctly then you have an object or side that is messing you up i'm not sure hwo to get the object to work but if you have a different map with that side setup use the lvl file from it instead of your game also try using an lua from a different map with the same teams/gamemode setup (make sure to back up everything) if neither or those work try doing procces of elimination going through files that in any way COULD be dammaged or messed up and replacing them with usable files from other maps
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Map Crash without any reason

Post by Teancum »

FATALs have to do with the addme.lua file or anything that's related to it (mission.req, each of the luas, their reqs, etc). Have you touched any of those at all? Post mission.req and your addme.lua.
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Map Crash without any reason

Post by elfie »

Haven't touched them, that is what is strange. One moment it worked fine and then not. Here they are anyhow though:
Mission.req:
Hidden/Spoiler:
[code]ucft
{
REQN
{
"config"
"ingame_movies"
}

REQN
{
"script"
"setup_teams"
"gametype_conquest"
"gametype_capture"
"Objective"
"MultiObjectiveContainer"
"ObjectiveCTF"
"ObjectiveAssault"
"ObjectiveSpaceAssault"
"ObjectiveConquest"
"ObjectiveTDM"
"ObjectiveOneFlagCTF"
"SoundEvent_ctf"
"ObjectiveGoto"
"LinkedShields"
"LinkedDestroyables"
"LinkedTurrets"
"Ambush"
"PlayMovieWithTransition"
}

REQN
{
"lvl"
"WARg_ctf"
"WARg_hunt"
"WARc_ctf"
}
}[/code]
Addme.lua:
Hidden/Spoiler:
[code]--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end




--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "WAR%s_%s", era_g = 1, mode_hunt_g = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("WAR","WARg_ctf",4)
AddDownloadableContent("WAR","WARc_ctf",4)
AddDownloadableContent("WAR","WARg_hunt",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\WAR\\data\\_LVL_PC\\core.lvl")
[/code]
The only thing I remember doing before it crashed was placing an object that I made in Zeroeditor. That is it. No lua editing or anything. I remember placing it and the map crashed which it hasn't for a long time so I went in Zeroeditor and tried to delete the object when I noticed it wasn't there. I didn't even get a mungelog error saying that the reason it crashed was because of a bad object or anything.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Map Crash without any reason

Post by Teancum »

Well, it's barfing because it can't build mission.lvl properly. Did you end up moving all the "Copy of" lua files to your root folder so there's no way it tries to munge them?
User avatar
elfie
Field Commander
Field Commander
Posts: 931
Joined: Fri Jan 25, 2008 8:26 pm
Games I'm Playing :: no games
xbox live or psn: no live
Location: Coruscant, Jedi Temple
Contact:

Re: Map Crash without any reason

Post by elfie »

Hey great news, It works now!!!! :D :thumbs: Aparently the object that I made for some reason made the map crash. So I got rid of the object and now it works!!! Thanks again everyone for the great help you have given me.
Post Reply