News:

Rings of Reznor!

Main Menu

Inconsistent problem with certain maps crashing

Started by mac402, April 20, 2015, 09:01:02 PM

Previous topic - Next topic

mac402

Hello good people. I was wondering does anyone had a problem with map crashing the game just after the mission loads? The situation is identical to what has been described in this archived post. Strangely though the solution (the name of the map folder was too long) doesn't work for other maps I'm having problems with. To be precise there are some maps for FF2 like:
ds_rockies
ds_kaliklak2
ds_medieval_village

and some maps converted from FF1 like:
ds_midway_city
ds_moonbase_alpha_ext
ds_original_enterprise
ds_sewer_tunnels

that will work correctly when viewed in FFEdit, they will work correctly when used in an easy script mission, but will crash at the beggining of the mission in any non-EZScripted rumble room mode. Sometimes (rarely) these maps will not crash at the beggining and can be played without any error. The script.log and FF.log don't show any error message during the crash, it's like the game just quits. Can anyone hint the problem? Is it the script that cannot find something on the map or spawns something at the wrong place? The maps do have  all the proper markers for skirmish mode.

Here is the Script.log from an example of crash:
Spoiler

>>> system/init.py executed
>>> system/localinit.py executed
>>> system\tredir.py executed
loading datfiles version 0.256000
loading cshelper ...
Starting ffx.py v. 3.3.1 build 0; branch = main release update
Loading m25ai.py v. 3.3.0 build 3; branch = Gold v.3.3 with Patch
importing missionobjvar.py v1.20
importing MLOG Reader 1.0.23
Starting General Utilities 1.0.1
missionobjvar(FixLongs): Fixing overflow issue with <SCSTATE_BUOYANT>
missionobjvar defining functions for Campaign play.
Loading m25cutscene.py v.3.3.07 January 30, 2009
CustomHeadCurrentTime 1429561759.525000
Starting Height Check module 1.4
Starting System Utilities 1.5
OBJECTS_HEIGHT: 604 entries
NIF_OBJECTS: 482 entries
BUILDINGS_IN_OBJECTS_DAT: 30 entries
BUILDING_DIMENSIONS: 30 entries
Starting skXMapInfo.py  v 0.79 beta
skXMapInfo: m25ai available
Loading m25aiopt.py v.3.2.0 final; branch = swingman 4
FFX Mission Plugin 'firehydrant' imported
FFX Mission Plugin 'irradiateradius' imported
FFX Mission Plugin 'zombie' imported
FFX Mission Plugin 'electricaldamage' imported
FFX Mission Plugin 'm25ai_lowjumper' imported
FFX Mission Plugin 'm25ai_realitymanipulation' imported
FFX Mission Plugin 'cutscene_dream' imported
FFX Mission Plugin 'cutscene_power' imported
Loading m25enc.py v.3.3.07 January 30, 2009
Loading m25freeroam.py v. 3.2.0 build 7; branch = m25 branch 1
FFX Mission Plugin 'm25encexit' imported
Loading     m25enc_OPENDOOR.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_opendoor' imported
FFX Mission Plugin 'm25enc_reqchar' imported
Loading     m25enc_simplechoice.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_simplechoice' imported
Loading m25pstory.py  v.3.3.07 January 30, 2009
FFX Mission Plugin 'm25encstory' imported
Starting Built-In Function Wrapper 1.5
('Object_CalcPrestige', 'js')
sk: missionobjvar already loaded; resetting mission type to skirmish for mission and object vars
missionobjvar.SetFunctionsByMissionType: isCampaignMission=0, long variable cache has already been written to.
__MISSIONVARS = {'heightcheck_sampling_default': (1, 8), '_event_pstory_cutsceneline': [['CutsceneDream_Check', 1], ['CutscenePower_CheckPower', 1]]}
__OBJECTVARS = {}
missionobjvar defining functions for Rumble Room play.
dcvsmarvel\Missions\Scripts\sk.py importing FFX
dcvsmarvel\Missions\Scripts\sk.py loaded
>>> C:\Users\Maciej Krauze\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\battle.py executed
>>> C:\Users\Maciej Krauze\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\danger.py executed
>>> C:\Users\Maciej Krauze\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\battle.py executed
>>> OnReceiveSelectedEnemies(('------------', ))
try to spawn ------------
sk.SpawnEnemy: energy for _sk------------01 (------------) changed from 0 to 0
MLOG_Init(keepRunningModules=0): starting up
mlogreader.MLOG_Init: current mission = 'DS_KALIKLAK2'
initialising FFX: skirmish=1
numberStr=96
storing hero_1: id_1,-96
! GetMapInfo

The FF.log is too big so I'll post only the part near the crash:
Spoiler

00:16:17.42: FF: GEOMETRY COUNTER AT 15323
00:16:17.42: FF: animator:(_sk------------01) setSequence idle
00:16:17.42: FF: animator:(_sk------------01) setSequence2
00:16:17.42: FF: animator:(_sk------------01) disableCurrentState
00:16:17.43: FF: animator:(_sk------------01) end disableCurrentState
00:16:17.43: FF: animator:(_sk------------01) end setSequence2
00:16:17.43: FF: animator:(_sk------------01) end setSequence idle
00:16:17.43: FF: animator:(_sk------------01) startAnimating idle
00:16:17.43: FF: animator:(_sk------------01) startAnimating Calling ActivateSequence for idle
00:16:17.43: FF: animator:(_sk------------01) end startAnimating idle
00:16:17.43: FF: animator:(hero_1) setSequence idle
00:16:17.43: FF: animator:(hero_1) setSequence2
00:16:17.43: FF: animator:(hero_1) disableCurrentState
00:16:17.43: FF: animator:(hero_1) end disableCurrentState
00:16:17.43: FF: animator:(hero_1) end setSequence2
00:16:17.43: FF: animator:(hero_1) end setSequence idle
00:16:17.43: FF: animator:(hero_1) startAnimating idle
00:16:17.43: FF: animator:(hero_1) startAnimating Calling ActivateSequence for idle
00:16:17.43: FF: animator:(hero_1) end startAnimating idle
00:16:17.45: FF: activation: >>>>>>>>>add id 537395399, index 199, stamp 8200
00:16:17.45: FF: activation: Creating object ffxtarget custom_characters\ffx_tiggot\character.nif
00:16:17.45: FF: activation: Activating object ffxtarget
00:16:17.45: FF: activation: >>>>>>>>>add id 537460936, index 200, stamp 8201
00:16:17.45: FF: activation: Creating object ffxgun custom_characters\ffx_tiggot\character.nif
00:16:17.45: FF: activation: Activating object ffxgun
00:16:17.77: FF: activation: >>>>>>>>>add id 537526473, index 201, stamp 8202
00:16:17.77: FF: activation: Creating object mapinfocaliper0 custom_characters\ffx_tiggot\character.nif
00:16:17.77: FF: activation: Activating object mapinfocaliper0
00:16:17.77: FF: activation: >>>>>>>>>add id 537592010, index 202, stamp 8203
00:16:17.77: FF: activation: Creating object mapinfocaliper1 custom_characters\ffx_tiggot\character.nif
00:16:17.78: FF: activation: Activating object mapinfocaliper1
00:16:17.78: FF: activation: >>>>>>>>>add id 537657547, index 203, stamp 8204
00:16:17.78: FF: activation: Creating object mapinfocaliper2 custom_characters\ffx_tiggot\character.nif
00:16:17.78: FF: activation: Activating object mapinfocaliper2
00:16:17.78: FF: activation: >>>>>>>>>add id 537723084, index 204, stamp 8205
00:16:17.78: FF: activation: Creating object mapinfocaliper3 custom_characters\ffx_tiggot\character.nif
00:16:17.78: FF: activation: Activating object mapinfocaliper3
00:16:17.79: FF: animator:(ffxtarget) setSequence idle
00:16:17.79: FF: animator:(ffxtarget) setSequence2
00:16:17.79: FF: animator:(ffxtarget) disableCurrentState
00:16:17.79: FF: animator:(ffxtarget) end disableCurrentState
00:16:17.79: FF: animator:(ffxtarget) end setSequence2
00:16:17.79: FF: animator:(ffxtarget) end setSequence idle
00:16:17.79: FF: animator:(ffxtarget) startAnimating idle
00:16:17.79: FF: animator:(ffxtarget) startAnimating Calling ActivateSequence for idle
00:16:17.79: FF: animator:(ffxtarget) end startAnimating idle
00:16:17.79: FF: animator:(mapinfocaliper0) setSequence idle
00:16:17.79: FF: animator:(mapinfocaliper0) setSequence2
00:16:17.79: FF: animator:(mapinfocaliper0) disableCurrentState
00:16:17.79: FF: animator:(mapinfocaliper0) end disableCurrentState
00:16:17.79: FF: animator:(mapinfocaliper0) end setSequence2
00:16:17.79: FF: animator:(mapinfocaliper0) end setSequence idle
00:16:17.79: FF: animator:(mapinfocaliper0) startAnimating idle
00:16:17.79: FF: animator:(mapinfocaliper0) startAnimating Calling ActivateSequence for idle
00:16:17.79: FF: animator:(mapinfocaliper0) end startAnimating idle
00:16:17.79: FF: animator:(mapinfocaliper2) setSequence idle
00:16:17.79: FF: animator:(mapinfocaliper2) setSequence2
00:16:17.79: FF: animator:(mapinfocaliper2) disableCurrentState
00:16:17.79: FF: animator:(mapinfocaliper2) end disableCurrentState
00:16:17.79: FF: animator:(mapinfocaliper2) end setSequence2
00:16:17.79: FF: animator:(mapinfocaliper2) end setSequence idle
00:16:17.79: FF: animator:(mapinfocaliper2) startAnimating idle
00:16:17.79: FF: animator:(mapinfocaliper2) startAnimating Calling ActivateSequence for idle
00:16:17.79: FF: animator:(mapinfocaliper2) end startAnimating idle
00:16:17.79: FF: animator:(mapinfocaliper1) setSequence idle
00:16:17.79: FF: animator:(mapinfocaliper1) setSequence2
00:16:17.79: FF: animator:(mapinfocaliper1) disableCurrentState
00:16:17.79: FF: animator:(mapinfocaliper1) end disableCurrentState
00:16:17.79: FF: animator:(mapinfocaliper1) end setSequence2
00:16:17.79: FF: animator:(mapinfocaliper1) end setSequence idle
00:16:17.79: FF: animator:(mapinfocaliper1) startAnimating idle
00:16:17.79: FF: animator:(mapinfocaliper1) startAnimating Calling ActivateSequence for idle
00:16:17.79: FF: animator:(mapinfocaliper1) end startAnimating idle
00:16:17.79: FF: animator:(ffxgun) setSequence idle
00:16:17.79: FF: animator:(ffxgun) setSequence2
00:16:17.79: FF: animator:(ffxgun) disableCurrentState
00:16:17.79: FF: animator:(ffxgun) end disableCurrentState
00:16:17.79: FF: animator:(ffxgun) end setSequence2
00:16:17.79: FF: animator:(ffxgun) end setSequence idle
00:16:17.79: FF: animator:(ffxgun) startAnimating idle
00:16:17.79: FF: animator:(ffxgun) startAnimating Calling ActivateSequence for idle
00:16:17.79: FF: animator:(ffxgun) end startAnimating idle
00:16:17.79: FF: animator:(mapinfocaliper3) setSequence idle
00:16:17.79: FF: animator:(mapinfocaliper3) setSequence2
00:16:17.79: FF: animator:(mapinfocaliper3) disableCurrentState
00:16:17.79: FF: animator:(mapinfocaliper3) end disableCurrentState
00:16:17.79: FF: animator:(mapinfocaliper3) end setSequence2
00:16:17.79: FF: animator:(mapinfocaliper3) end setSequence idle
00:16:17.80: FF: animator:(mapinfocaliper3) startAnimating idle
00:16:17.80: FF: animator:(mapinfocaliper3) startAnimating Calling ActivateSequence for idle
00:16:17.80: FF: animator:(mapinfocaliper3) end startAnimating idle
00:16:17.80: FF: animator:(mapinfocaliper2) setSequence run
00:16:17.80: FF: animator:(mapinfocaliper2) setSequence2
00:16:17.80: FF: animator:(mapinfocaliper2) disableCurrentState
00:16:17.80: FF: animator:(mapinfocaliper2) CAnimator::stopAnimating: Deactivate Sequence idle
00:16:17.80: FF: animator:(mapinfocaliper2) Calling LayerDeactivate for idle
00:16:17.80: FF: animator:(mapinfocaliper2) end disableCurrentState
00:16:17.80: FF: animator:(mapinfocaliper2) end setSequence2
00:16:17.80: FF: animator:(mapinfocaliper2) end setSequence run
00:16:17.80: FF: animator:(mapinfocaliper2) startSequenceSwap
00:16:17.80: FF: animator:(mapinfocaliper2) BlendActivate idle -> run
00:16:17.80: FF: animator:(mapinfocaliper2) end startSequenceSwap 0.100000
00:16:17.81: FF: animator:(mapinfocaliper0) setSequence jump_stand
00:16:17.81: FF: animator:(mapinfocaliper0) setSequence2
00:16:17.81: FF: animator:(mapinfocaliper0) disableCurrentState
00:16:17.81: FF: animator:(mapinfocaliper0) CAnimator::stopAnimating: Deactivate Sequence idle
00:16:17.81: FF: animator:(mapinfocaliper0) Calling LayerDeactivate for idle
00:16:17.81: FF: animator:(mapinfocaliper0) end disableCurrentState
00:16:17.81: FF: animator:(mapinfocaliper0) end setSequence2
00:16:17.81: FF: animator:(mapinfocaliper0) end setSequence jump_stand
00:16:17.81: FF: animator:(mapinfocaliper0) startSequenceSwap
00:16:17.81: FF: animator:(mapinfocaliper0) BlendActivate idle -> jump_stand
00:16:17.81: FF: animator:(mapinfocaliper0) end startSequenceSwap 0.100000
00:16:17.81: FF: animator:(mapinfocaliper1) setSequence jump_stand
00:16:17.81: FF: animator:(mapinfocaliper1) setSequence2
00:16:17.81: FF: animator:(mapinfocaliper1) disableCurrentState
00:16:17.81: FF: animator:(mapinfocaliper1) CAnimator::stopAnimating: Deactivate Sequence idle
00:16:17.81: FF: animator:(mapinfocaliper1) Calling LayerDeactivate for idle
00:16:17.81: FF: animator:(mapinfocaliper1) end disableCurrentState
00:16:17.81: FF: animator:(mapinfocaliper1) end setSequence2
00:16:17.81: FF: animator:(mapinfocaliper1) end setSequence jump_stand
00:16:17.81: FF: animator:(mapinfocaliper1) startSequenceSwap
00:16:17.81: FF: animator:(mapinfocaliper1) BlendActivate idle -> jump_stand
00:16:17.81: FF: animator:(mapinfocaliper1) end startSequenceSwap 0.100000
00:16:17.81: FF: animator:(mapinfocaliper3) setSequence idle
00:16:17.81: FF: animator:(mapinfocaliper3) Ignoring sequence request, already animating looping idle
00:16:17.83: FF: animator:(mapinfocaliper3) setSequence idle
00:16:17.83: FF: animator:(mapinfocaliper3) Ignoring sequence request, already animating looping idle
00:16:17.83: FF: animator:(mapinfocaliper2) startAnimating run
00:16:17.83: FF: animator:(mapinfocaliper2) end startAnimating run
00:16:17.85: FF: animator:(mapinfocaliper0) startAnimating jump_stand
00:16:17.85: FF: animator:(mapinfocaliper0) end startAnimating jump_stand
00:16:17.85: FF: animator:(mapinfocaliper1) startAnimating jump_stand
00:16:17.85: FF: animator:(mapinfocaliper1) end startAnimating jump_stand
00:16:17.95: FF: animator:(_sk------------01) setSequence melee_idle
00:16:17.95: FF: animator:(_sk------------01) setSequence2
00:16:17.95: FF: animator:(_sk------------01) disableCurrentState
00:16:17.95: FF: animator:(_sk------------01) CAnimator::stopAnimating: Deactivate Sequence idle
00:16:17.95: FF: animator:(_sk------------01) Calling LayerDeactivate for idle
00:16:17.95: FF: animator:(_sk------------01) end disableCurrentState
00:16:17.95: FF: animator:(_sk------------01) end setSequence2
00:16:17.95: FF: animator:(_sk------------01) end setSequence melee_idle
00:16:17.95: FF: animator:(_sk------------01) startSequenceSwap
00:16:17.95: FF: animator:(_sk------------01) BlendActivate idle -> melee_idle
00:16:17.95: FF: animator:(_sk------------01) end startSequenceSwap 0.500000
00:16:18.28: FF: animator:(mapinfocaliper2) setSequence idle
00:16:18.28: FF: animator:(mapinfocaliper2) setSequence2
00:16:18.28: FF: animator:(mapinfocaliper2) disableCurrentState
00:16:18.28: FF: animator:(mapinfocaliper2) CAnimator::stopAnimating: Deactivate Sequence run
00:16:18.28: FF: animator:(mapinfocaliper2) Calling LayerDeactivate for run
00:16:18.28: FF: animator:(mapinfocaliper2) end disableCurrentState
00:16:18.28: FF: animator:(mapinfocaliper2) end setSequence2
00:16:18.28: FF: animator:(mapinfocaliper2) end setSequence idle
00:16:18.28: FF: animator:(mapinfocaliper2) startSequenceSwap
00:16:18.28: FF: animator:(mapinfocaliper2) BlendActivate run -> idle
00:16:18.28: FF: animator:(mapinfocaliper2) end startSequenceSwap 0.500000
00:16:18.31: FF: animator:(mapinfocaliper2) setSequence idle
00:16:18.31: FF: animator:(mapinfocaliper2) Ignoring sequence request, already animating looping idle

Appreciate any help guys.

Epimethee

Hopefully someone more up to date with the game has the solution. Still, the last lines of both files make it seems to be related to the MapInfo() function. One way to pinpoint more precisely the bug would be to edit the script files (back up first!).

Open ffx3\missions\scripts\skXMapInfo.py in a plain text editor such as Notepad and find the line def GetMapInfo (tevent = ""):. Add a print line after the function calls inside it, i.e. the existing

def GetMapInfo (tevent = ""):
global gbGetMapInfoIsInitialised
try: mbTest = gbGetMapInfoIsInitialised
except:
gbGetMapInfoIsInitialised = 1
if len (Mission_GetObjects ()):
print "!","GetMapInfo"
#map info
global gbMapInfoIsLooping
global gaMapInfoObjectsToCheck
gbMapInfoIsLooping = 0
gaMapInfoObjectsToCheck = []
ff.MapInfo = {}
MapInfo_Init ()
MapInfo_GetBuildingClusters ()

#fight clusters
ff.MapInfoFighters = {}
MapInfo_UpdateFighters ()

#measure mapextent
if not Marker_Exists("ne_corner"):
MapInfo_MeasureTerrain ()


would become
def GetMapInfo (tevent = ""):
global gbGetMapInfoIsInitialised
try: mbTest = gbGetMapInfoIsInitialised
except:
gbGetMapInfoIsInitialised = 1
if len (Mission_GetObjects ()):
print "!","GetMapInfo"
#map info
global gbMapInfoIsLooping
global gaMapInfoObjectsToCheck
gbMapInfoIsLooping = 0
gaMapInfoObjectsToCheck = []
ff.MapInfo = {}
MapInfo_Init ()
                        #DEBUG MapInfo 1: MapInfo_Init() done
MapInfo_GetBuildingClusters ()
                        #DEBUG MapInfo 2: MapInfo_GetBuildingClusters () Done

#fight clusters
ff.MapInfoFighters = {}
MapInfo_UpdateFighters ()
                        #DEBUG MapInfo 3: MapInfo_UpdateFighters () done

#measure mapextent
if not Marker_Exists("ne_corner"):
MapInfo_MeasureTerrain ()
                                #DEBUG MapInfo 4: MapInfo_MeasureTerrain () done
    #DEBUG MapInfo completed


It's crude, but it should give us a clearer picture in script.log.
FFX add-on for FFvsTTR at ffx.freedomforceforever.com

mac402

OK, I did so. Here is the script.log part

Spoiler

>>> system/init.py executed
>>> system/localinit.py executed
>>> system\tredir.py executed
loading datfiles version 0.256000
loading cshelper ...
Starting ffx.py v. 3.3.1 build 0; branch = main release update
Loading m25ai.py v. 3.3.0 build 3; branch = Gold v.3.3 with Patch
importing missionobjvar.py v1.20
importing MLOG Reader 1.0.23
Starting General Utilities 1.0.1
missionobjvar(FixLongs): Fixing overflow issue with <SCSTATE_BUOYANT>
missionobjvar defining functions for Campaign play.
Loading m25cutscene.py v.3.3.07 January 30, 2009
CustomHeadCurrentTime 1430152121.215000
Starting Height Check module 1.4
Starting System Utilities 1.5
OBJECTS_HEIGHT: 604 entries
NIF_OBJECTS: 482 entries
BUILDINGS_IN_OBJECTS_DAT: 30 entries
BUILDING_DIMENSIONS: 30 entries
Starting skXMapInfo.py  v 0.79 beta
skXMapInfo: m25ai available
Loading m25aiopt.py v.3.2.0 final; branch = swingman 4
FFX Mission Plugin 'firehydrant' imported
FFX Mission Plugin 'irradiateradius' imported
FFX Mission Plugin 'zombie' imported
FFX Mission Plugin 'electricaldamage' imported
FFX Mission Plugin 'm25ai_lowjumper' imported
FFX Mission Plugin 'm25ai_realitymanipulation' imported
FFX Mission Plugin 'cutscene_dream' imported
FFX Mission Plugin 'cutscene_power' imported
Loading m25enc.py v.3.3.07 January 30, 2009
Loading m25freeroam.py v. 3.2.0 build 7; branch = m25 branch 1
FFX Mission Plugin 'm25encexit' imported
Loading     m25enc_OPENDOOR.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_opendoor' imported
FFX Mission Plugin 'm25enc_reqchar' imported
Loading     m25enc_simplechoice.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_simplechoice' imported
Loading m25pstory.py  v.3.3.07 January 30, 2009
FFX Mission Plugin 'm25encstory' imported
Starting Built-In Function Wrapper 1.5
('Object_CalcPrestige', 'js')
sk: missionobjvar already loaded; resetting mission type to skirmish for mission and object vars
missionobjvar.SetFunctionsByMissionType: isCampaignMission=0, long variable cache has already been written to.
__MISSIONVARS = {'heightcheck_sampling_default': (1, 8), '_event_pstory_cutsceneline': [['CutsceneDream_Check', 1], ['CutscenePower_CheckPower', 1]]}
__OBJECTVARS = {}
missionobjvar defining functions for Rumble Room play.
dcvsmarvel\Missions\Scripts\sk.py importing FFX
dcvsmarvel\Missions\Scripts\sk.py loaded
>>> C:\Users\Maciej Krauze\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\battle.py executed
>>> C:\Users\Maciej Krauze\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\battle.py executed
>>> OnReceiveSelectedEnemies(('------------', ))
try to spawn ------------
sk.SpawnEnemy: energy for _sk------------01 (------------) changed from 0 to 0
MLOG_Init(keepRunningModules=0): starting up
mlogreader.MLOG_Init: current mission = 'DS_ROCKIES'
initialising FFX: skirmish=1
numberStr=96
storing hero_1: id_1,-96
! GetMapInfo
DEBUG MapInfo 1: MapInfo_Init() done
DEBUG MapInfo 2: MapInfo_GetBuildingClusters () Done
DEBUG MapInfo completed
DEBUG MapInfo 3: MapInfo_UpdateFighters () done
DEBUG MapInfo 4: MapInfo_MeasureTerrain () done
DEBUG MapInfo completed
DEBUG MapInfo completed

And after adding more print commands in these places:


def GetMapInfo (tevent = ""):
global gbGetMapInfoIsInitialised
try: mbTest = gbGetMapInfoIsInitialised
except:
gbGetMapInfoIsInitialised = 1
if len (Mission_GetObjects ()):
print "!","GetMapInfo"
#map info
global gbMapInfoIsLooping
global gaMapInfoObjectsToCheck
gbMapInfoIsLooping = 0
gaMapInfoObjectsToCheck = []
ff.MapInfo = {}
MapInfo_Init ()
                        print 'DEBUG MapInfo 1: MapInfo_Init() done'
MapInfo_GetBuildingClusters ()
                        print 'DEBUG MapInfo 2: MapInfo_GetBuildingClusters () Done'

#fight clusters
ff.MapInfoFighters = {}
MapInfo_UpdateFighters ()
                        print 'DEBUG MapInfo 3: MapInfo_UpdateFighters () done'

#measure mapextent
if not Marker_Exists("ne_corner"):
MapInfo_MeasureTerrain ()
                                print 'DEBUG MapInfo 4: MapInfo_MeasureTerrain () done'
print 'DEBUG MapInfo completed'

def MapInfo_MeasureTerrain (tevent = ""):
for mi in range (0,4):
msC = "mapinfocaliper" + `mi`
if mi == 0:
mtPos = (ff.MapInfo ["NEObjectBound"][0],ff.MapInfo ["centre"][1],0)
mtTo = (ff.MapInfo ["NE"][0] + 1000000, mtPos [1], 0)
elif mi == 1:
mtPos = (ff.MapInfo ["centre"][0],ff.MapInfo ["SEObjectBound"][1],0)
mtTo = (mtPos [0], ff.MapInfo ["SE"][1] - 1000000, 0)
elif mi == 2:
mtPos = (ff.MapInfo ["NWObjectBound"][0],ff.MapInfo ["centre"][1],0)
mtTo = (ff.MapInfo ["NW"][0] - 1000000, mtPos [1], 0)
elif mi == 3:
mtPos = (ff.MapInfo ["centre"][0],ff.MapInfo ["NEObjectBound"][1],0)
mtTo = (mtPos [0], ff.MapInfo ["NE"][1] + 1000000, 0)
Object_SpawnAt ("ffx_tiggot", mtPos, msC)
disable (msC)
Object_SetAttr (msC, "physical", 0)
Object_SetAttr(msC,'speed',1000)
Object_SetSecondaryState (msC, SCSTATE_INVISIBLE, 1000000, PERMANENT_STATE)
Trigger_Move (msC, "walk", mtTo)
regTimer ("MapInfo_CheckCalipers", 1)
print 'DEBUG MapInfo 5: MapInfo_CheckCalipers () done'
# MapInfo_CheckCalipers ()

def MapInfo_CheckCalipers (tevent = ""):
global gdCalipers
global caliperDestination
try: skXTest = gdCalipers
except: gdCalipers = {}
miActive = 0
for mi in range (0,4):
msC = "mapinfocaliper" + `mi`
if Object_Exists (msC):
Object_SetSecondaryState (msC, SCSTATE_INVISIBLE, 1000000, PERMANENT_STATE)
mtPos = Get_ObjectPos (msC)
print 'DEBUG MapInfo 6: Get_ObjectPos (msC) done'
try:
if msC in gdCalipers.keys ():
mtOldPos = gdCalipers [msC]
miD = fSkXGetDistance (mtPos, mtOldPos)
gdCalipers [msC] = mtPos
if not miD:
#stopped, update map extents
MapInfo_UpdateMapExtents (mtPos)
print 'DEBUG MapInfo 7: MapInfo_UpdateMapExtents (mtPos) done'
Object_Destroy (msC)
print 'DEBUG MapInfo 8: Object_Destroy (msC) done'
else:
miActive = miActive + 1
except:
if msC not in ff.MapInfo.keys (): ff.MapInfo [msC] = {}
ff.MapInfo [msC]["pos"] = mtPos
miActive = miActive + 1
if miActive:
regTimer ("MapInfo_CheckCalipers", 1)
# MapInfo_CheckCalipers ()
ff.MapInfo_CheckCalipers = MapInfo_CheckCalipers


I got:

Spoiler

>>> system/init.py executed
>>> system/localinit.py executed
>>> system\tredir.py executed
loading datfiles version 0.256000
loading cshelper ...
Starting ffx.py v. 3.3.1 build 0; branch = main release update
Loading m25ai.py v. 3.3.0 build 3; branch = Gold v.3.3 with Patch
importing missionobjvar.py v1.20
importing MLOG Reader 1.0.23
Starting General Utilities 1.0.1
missionobjvar(FixLongs): Fixing overflow issue with <SCSTATE_BUOYANT>
missionobjvar defining functions for Campaign play.
Loading m25cutscene.py v.3.3.07 January 30, 2009
CustomHeadCurrentTime 1430153721.059000
Starting Height Check module 1.4
Starting System Utilities 1.5
OBJECTS_HEIGHT: 604 entries
NIF_OBJECTS: 482 entries
BUILDINGS_IN_OBJECTS_DAT: 30 entries
BUILDING_DIMENSIONS: 30 entries
Starting skXMapInfo.py  v 0.79 beta
skXMapInfo: m25ai available
Loading m25aiopt.py v.3.2.0 final; branch = swingman 4
FFX Mission Plugin 'firehydrant' imported
FFX Mission Plugin 'irradiateradius' imported
FFX Mission Plugin 'zombie' imported
FFX Mission Plugin 'electricaldamage' imported
FFX Mission Plugin 'm25ai_lowjumper' imported
FFX Mission Plugin 'm25ai_realitymanipulation' imported
FFX Mission Plugin 'cutscene_dream' imported
FFX Mission Plugin 'cutscene_power' imported
Loading m25enc.py v.3.3.07 January 30, 2009
Loading m25freeroam.py v. 3.2.0 build 7; branch = m25 branch 1
FFX Mission Plugin 'm25encexit' imported
Loading     m25enc_OPENDOOR.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_opendoor' imported
FFX Mission Plugin 'm25enc_reqchar' imported
Loading     m25enc_simplechoice.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_simplechoice' imported
Loading m25pstory.py  v.3.3.07 January 30, 2009
FFX Mission Plugin 'm25encstory' imported
Starting Built-In Function Wrapper 1.5
('Object_CalcPrestige', 'js')
sk: missionobjvar already loaded; resetting mission type to skirmish for mission and object vars
missionobjvar.SetFunctionsByMissionType: isCampaignMission=0, long variable cache has already been written to.
__MISSIONVARS = {'heightcheck_sampling_default': (1, 8), '_event_pstory_cutsceneline': [['CutsceneDream_Check', 1], ['CutscenePower_CheckPower', 1]]}
__OBJECTVARS = {}
missionobjvar defining functions for Rumble Room play.
dcvsmarvel\Missions\Scripts\sk.py importing FFX
dcvsmarvel\Missions\Scripts\sk.py loaded
>>> C:\Users\Maciej Krauze\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\battle.py executed
>>> C:\Users\Maciej Krauze\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\battle.py executed
>>> OnReceiveSelectedEnemies(('------------', ))
try to spawn ------------
sk.SpawnEnemy: energy for _sk------------01 (------------) changed from 0 to 0
MLOG_Init(keepRunningModules=0): starting up
mlogreader.MLOG_Init: current mission = 'DS_ROCKIES'
initialising FFX: skirmish=1
numberStr=96
storing hero_1: id_1,-96
! GetMapInfo
DEBUG MapInfo 1: MapInfo_Init() done
DEBUG MapInfo 2: MapInfo_GetBuildingClusters () Done
DEBUG MapInfo completed
DEBUG MapInfo 3: MapInfo_UpdateFighters () done
DEBUG MapInfo 5: MapInfo_CheckCalipers () done
DEBUG MapInfo 4: MapInfo_MeasureTerrain () done
DEBUG MapInfo completed
DEBUG MapInfo completed


Also when I misspelled something and the script broke the map was not crashing after load.

mac402

(I'm making another post due to text limits.)

Here is the script.log after I removed the FFX_InitSkirmish() check from battle.py:


def OnPostInit():
    #FFX_InitSkirmish()
    StartAI()
    m25event.SetTimer(3, 'CheckHeroesGone')


Spoiler

>>> system/init.py executed
>>> system/localinit.py executed
>>> system\tredir.py executed
loading datfiles version 0.256000
loading cshelper ...
Starting ffx.py v. 3.3.1 build 0; branch = main release update
Loading m25ai.py v. 3.3.0 build 3; branch = Gold v.3.3 with Patch
importing missionobjvar.py v1.20
importing MLOG Reader 1.0.23
Starting General Utilities 1.0.1
missionobjvar(FixLongs): Fixing overflow issue with <SCSTATE_BUOYANT>
missionobjvar defining functions for Campaign play.
Loading m25cutscene.py v.3.3.07 January 30, 2009
CustomHeadCurrentTime 1430155225.188000
Starting Height Check module 1.4
Starting System Utilities 1.5
OBJECTS_HEIGHT: 604 entries
NIF_OBJECTS: 482 entries
BUILDINGS_IN_OBJECTS_DAT: 30 entries
BUILDING_DIMENSIONS: 30 entries
Starting skXMapInfo.py  v 0.79 beta
skXMapInfo: m25ai available
Loading m25aiopt.py v.3.2.0 final; branch = swingman 4
FFX Mission Plugin 'firehydrant' imported
FFX Mission Plugin 'irradiateradius' imported
FFX Mission Plugin 'zombie' imported
FFX Mission Plugin 'electricaldamage' imported
FFX Mission Plugin 'm25ai_lowjumper' imported
FFX Mission Plugin 'm25ai_realitymanipulation' imported
FFX Mission Plugin 'cutscene_dream' imported
FFX Mission Plugin 'cutscene_power' imported
Loading m25enc.py v.3.3.07 January 30, 2009
Loading m25freeroam.py v. 3.2.0 build 7; branch = m25 branch 1
FFX Mission Plugin 'm25encexit' imported
Loading     m25enc_OPENDOOR.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_opendoor' imported
FFX Mission Plugin 'm25enc_reqchar' imported
Loading     m25enc_simplechoice.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_simplechoice' imported
Loading m25pstory.py  v.3.3.07 January 30, 2009
FFX Mission Plugin 'm25encstory' imported
Starting Built-In Function Wrapper 1.5
('Object_CalcPrestige', 'js')
sk: missionobjvar already loaded; resetting mission type to skirmish for mission and object vars
missionobjvar.SetFunctionsByMissionType: isCampaignMission=0, long variable cache has already been written to.
__MISSIONVARS = {'heightcheck_sampling_default': (1, 8), '_event_pstory_cutsceneline': [['CutsceneDream_Check', 1], ['CutscenePower_CheckPower', 1]]}
__OBJECTVARS = {}
missionobjvar defining functions for Rumble Room play.
dcvsmarvel\Missions\Scripts\sk.py importing FFX
dcvsmarvel\Missions\Scripts\sk.py loaded
>>> C:\Users\Maciej Krauze\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\battle.py executed
>>> C:\Users\Maciej Krauze\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\battle.py executed
>>> OnReceiveSelectedEnemies(('------------', ))
try to spawn ------------
sk.SpawnEnemy: energy for _sk------------01 (------------) changed from 0 to 0
! GetMapInfo
DEBUG MapInfo 1: MapInfo_Init() done
DEBUG MapInfo 2: MapInfo_GetBuildingClusters () Done
DEBUG MapInfo completed
DEBUG MapInfo 3: MapInfo_UpdateFighters () done
DEBUG MapInfo 5: MapInfo_CheckCalipers () done
DEBUG MapInfo 4: MapInfo_MeasureTerrain () done
DEBUG MapInfo completed
DEBUG MapInfo completed
initialising FFQ_initialiseExtras()
DEBUG MapInfo 6: Get_ObjectPos (msC) done
DEBUG MapInfo 6: Get_ObjectPos (msC) done
DEBUG MapInfo 6: Get_ObjectPos (msC) done
DEBUG MapInfo 6: Get_ObjectPos (msC) done
DEBUG MapInfo 6: Get_ObjectPos (msC) done
DEBUG MapInfo 7: MapInfo_UpdateMapExtents (mtPos) done
DEBUG MapInfo 8: Object_Destroy (msC) done
DEBUG MapInfo 6: Get_ObjectPos (msC) done
DEBUG MapInfo 6: Get_ObjectPos (msC) done
DEBUG MapInfo 7: MapInfo_UpdateMapExtents (mtPos) done
DEBUG MapInfo 8: Object_Destroy (msC) done
DEBUG MapInfo 6: Get_ObjectPos (msC) done
Plugin 'firehydrant' OnPostInit() called
Plugin 'irradiateradius' has no OnPostInit()
Plugin 'zombie' has no OnPostInit()
Plugin 'electricaldamage' OnPostInit() called
Plugin 'm25ai_lowjumper' has no OnPostInit()
Plugin 'm25ai_realitymanipulation' has no OnPostInit()
Plugin 'cutscene_dream' has no OnPostInit()
Plugin 'cutscene_power' has no OnPostInit()
Plugin 'm25encexit' has no OnPostInit()
Plugin 'm25enc_opendoor' has no OnPostInit()
Plugin 'm25enc_reqchar' has no OnPostInit()
Plugin 'm25enc_simplechoice' has no OnPostInit()
Plugin 'm25encstory' has no OnPostInit()
DEBUG MapInfo 6: Get_ObjectPos (msC) done
DEBUG MapInfo 7: MapInfo_UpdateMapExtents (mtPos) done
DEBUG MapInfo 8: Object_Destroy (msC) done
DEBUG MapInfo 6: Get_ObjectPos (msC) done
DEBUG MapInfo 7: MapInfo_UpdateMapExtents (mtPos) done
DEBUG MapInfo 8: Object_Destroy (msC) done

Maybe it's not the GetMapInfo after all   :unsure:

Update:

OK, I definitely know where the crash happens (not that I know why though). This part of code in ffx.py file when removed makes said maps work:


    #a couple of tiggots
    if Object_Exists('ffxtarget')==0:
        cshelper.spawn('ffxtarget','ffx_tiggot',(-6010,10,0))
    if Object_Exists('ffxgun')==0:
        cshelper.spawn('ffxgun','ffx_tiggot',(-6010,0,0))


Hmmm...

Epimethee

Interesting...

Does a specific tiggot cause the crash? i.e. commenting out each alternatively:
    #a couple of tiggots
    if Object_Exists('ffxtarget')==0:
        #cshelper.spawn('ffxtarget','ffx_tiggot',(-6010,10,0))
        print "DEBUG not spawning FFX Target"
    if Object_Exists('ffxgun')==0:
        cshelper.spawn('ffxgun','ffx_tiggot',(-6010,0,0))
        print "DEBUG spawned FFX Gun"


and vice versa.

Also, you might try to change their spawning position. I don't know why it was set specifically at x=-6010. You could replace (-6010,0,0) by (0,0,0) and see how it goes.
FFX add-on for FFvsTTR at ffx.freedomforceforever.com

mac402

Quote from: Epimethee on April 29, 2015, 02:31:08 AM
Also, you might try to change their spawning position. I don't know why it was set specifically at x=-6010. You could replace (-6010,0,0) by (0,0,0) and see how it goes.

Both spawn commands cause the crash but changing the spawning position to 0,0,0 helps. I see there is a reference to ffxgun and ffxtarget in the code that presumably identifies and stores the power id's for built-in characters:


####### stores pre-cached power IDs for powers ########

def generatePowerIDs():
    ffxpowerids.powerIDs=[]
    powers=datfiles.Campaign_ReadPowers()
    i=0
    for power in powers.keys():
        pdata=powers[power]
        if pdata['PowerType'] == PT_MELEE or pdata['PowerType'] == PT_RANGED:
            ffxpowerids.powerIDs.append([power,i,0])
            powerTest(power,i)
            i=i+1
    RegTimer('powerfin',10)

def powerfin(event):
    Mission_StatusText('writing powerIDs to file')
    print ffxpowerids.powerIDs
    ###! 2006-05-06 Ep: write to the current mod's ffxpowerid.py's rather than the hardcoded ffx3 one
    modfolder = sysutils.getModFolder()
    print "POWER ID Generator powerfin() will write to '%s/ffxpowerids.py' folder" % modfolder
    file=open("%s/missions/scripts/ffxpowerids.py" % modfolder,"w")
    file.write('powerIDs=[\n')
    for set in ffxpowerids.powerIDs:
        file.write(`set`+',\n')
    file.write(']\n')
    file.close()
    RegTimer('EndLevel',3)

def EndLevel(event):
    Mission_Win()

def powerTest(powerName,i):
    y=30+FFX_ObjectGetAttr('gun','y',6000)
    FFX_ObjectSetAttr('gun','y',y)
    gun='ffxgun'
    target='ffxtarget'
    Trigger_Power(gun,target,powerName,'OnPowerTest2',0,Get_ObjectPos(target),i)
    js.AI_NullController(gun)

def OnPowerTest2(event):
    for set in ffxpowerids.powerIDs:
        if set[1]==event.user:
            set[2]=event.float


I will see whether changing the value -6010 messes this, but it intrigues me why only a handful of maps were crashing. Thank you for responding Epimethee and for your original contribution to creating FFX code in the first place  :thumbup: .

Epimethee

Thanks for the kind words, Mac402!

If changing the position perchance happens to work, could it maaaaaybe be caused by an object or some geometry on this area of the maps?
FFX add-on for FFvsTTR at ffx.freedomforceforever.com

mac402

Hmmm... I've tried to spawn the ffxgun and ffxtrigger in FFEdit and it spawns way beyond the map so there seems to be no object or terrain that could interfere. Interrestingly adding these tiggots to the map does not prevent the script from trying to spawn them (I was hoping that adding them manually to the maps will help without having to alter the spawn coordinates in the ffx code). Honestly I'm really confused why it only affects a handful of maps. I still haven't check if powers id script will work now but I hope it will.