News:

Happy 20th, FFvT3R!

Main Menu

FFX driver attribute help

Started by ZozmaSage, February 28, 2010, 08:18:39 PM

Previous topic - Next topic

ZozmaSage

I want to accomplish a complicated (by my standards) effect using FFX 3 in FFv3R. It took me forever just to *find* FFXcustom2.pyc, but attempting to edit it has proven fruitless; everytime I load the character the attribute fails to initialize.

I'm trying to create the following hero: a relatively weak, largely defenseless pilot (driver) who can board a giant mech (vehicle). The mech is largely energy dependent (limited flight+ Battery Powered), forcing the driver to use its powers effeciently. When the mech runs out of energy, the pilot has little choice but to leave.

Can anyone give me directions on how to set this hero up in FFXcustom2.pyc?

Epimethee

#1
Sorry if the docs aren't clear enough about paths etc. You need to edit ffxcustom2.py, not ffxcustom2.pyc. .pyc files are machine-optimized files generated by the Python engine from the user-editable .py ones.

Please post you script.log if you can't get it to work. (Note that I don't have Windows installed at the moment, so I won't be able to help very much, but someone else probably will.)
FFX add-on for FFvsTTR at ffx.freedomforce4ever.com

ZozmaSage

Quote from: Epimethee on March 01, 2010, 12:08:30 AM
Sorry if the docs aren't clear enough about paths etc. You need to edit ffxcustom2.py, not ffxcustom2.pyc. .pyc files are machine-optimized files generated by the Python engine from the user-editable .py ones.

Please post you script.log if you can't get it to work. (Note that I don't have Windows installed at the moment, so I won't be able to help very much, but someone else probably will.)

Sorry for the typo; it was the py file that I edited, not the pyc. Not sure where that mistake came in. My current set-up for the Driver/Vehicle customization is as follows:

Spoiler
### Driver
# Updated FFX 3.3: note the additional "Method" entry at the end
FFX_DRIVER_CUSTOM=[
["default","cat jalopy","","","beside"],
["types","RedRover","UVehicle 2","UVehicle 3","inside"],
]

### Vehicle
# Cargo mass determines the max number of passengers to allow in addition to the driver
FFX_VEHICLE_CUSTOM=[
["default", "500"],
["types", "500 (lbs)"],

Where "Red Rover" is the mech.
]

I'm sure this is probably hilariously inaccurate and the mistakes I made are likely glaringly obvious to the initiated, so I apologize for my own technical ignorance. To demonstrate my lack of know-how, I am going to assume the script log is whatever I pasted above >.<

Epimethee

No need to apologize! Quite the contrary, it's good to see you wanting to play with this.

Script.log is a different file, located directly under the "Freedom Force vs The 3rd Reich" folder. It lists Python-scripting level messages and errors. Like the similar ff.log (which lists game-engine level messages and errors), it is generated by the game.

But, it was a good thing you posted the content of ffxcustom2.py, because that's the first thing I should have asked for. The "types" line shouldn't be edited (it's for the FFX Control Centre ? or should have been if we hadn't reached the max number of attributes it can accommodate); instead, you should copy the "default" line and change it:
### Driver
FFX_DRIVER_CUSTOM=[
["default","cat jalopy","","","beside"],
["name of your hero","redrover","","","beside"],
["types","UVehicle 1","UVehicle 2","UVehicle 3","AMethod"],
]


Note the use of lowercase ? Python is case-sensitive.

### Vehicle
FFX_VEHICLE_CUSTOM=[
["default","500"],
["redrover","0"],
["types","UVehicle ACargo (lbs.)"],
]
FFX add-on for FFvsTTR at ffx.freedomforce4ever.com

ZozmaSage

Still not quite working, but I've got a feeling we're going in the right direction. Here's the FFxcustom and Script.log files

Spoiler
### Driver
FFX_DRIVER_CUSTOM=[
["default","cat jalopy","","","beside"],
["hotrod","redrover","","","beside"],
["types","UVehicle 1","UVehicle 2","UVehicle 3","AMethod"],
]

### Vehicle
FFX_VEHICLE_CUSTOM=[
["default","500"],
["redrover","0"],
["types","UVehicle ACargo (lbs.)"],
]

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.2.0 final; May 27, 2007
CustomHeadCurrentTime 1267408516.966000
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 'zombie' imported
Loading freeroam_keepbuildingdamage.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'freeroam_keepbuildingdamage' imported
FFX Mission Plugin 'm25ai_lowjumper' imported
FFX Mission Plugin 'm25ai_realitymanipulation' imported
FFX Mission Plugin 'cutscene_power' imported
Loading     m25enc_OPENDOOR.py v.1.0.0 build 0; branch = main
Loading m25enc.py v.3.2.0 July 27, 2008
FFX Mission Plugin 'm25enc_opendoor' imported
Loading     m25enc_simplechoice.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_simplechoice' 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 = {'_event_freeroam_initmission': [['FreeroamKBD_StartMission', 0]], '_event_pstory_cutsceneline': [['CutscenePower_CheckPower', 1]], 'heightcheck_sampling_default': (1, 8), '_event_freeroam_exitmission': [['FreeroamKBD_EndMission', 0]]}
__OBJECTVARS = {}
missionobjvar defining functions for Rumble Room play.
ffx3\Missions\Scripts\sk.py importing FFX
ffx3\Missions\Scripts\sk.py loaded
>>> C:\Users\Nick\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\battle.py executed
>>> C:\Users\Nick\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\danger.py executed
>>> C:\Users\Nick\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\battle.py executed
>>> OnReceiveSelectedEnemies(('custom_vil_0', ))
try to spawn custom_vil_0
sk.SpawnEnemy: energy for _skcustom_vil_001 (alchemiss) changed from 9 to 5
MLOG_Init(keepRunningModules=0): starting up
mlogreader.MLOG_Init: current mission = 'MP_CITY'
initialising FFX: skirmish=1
numberStr=39
storing hero_0: id_1,-39

Epimethee

I think your script.log got truncated; could you post the rest (especially parts with "traceback error" statements)?

(Just in case, please note that script.log is reset every time you start a mission.)
FFX add-on for FFvsTTR at ffx.freedomforce4ever.com

ZozmaSage

I started a skirmish match with Hotrod(driver) and finished it, just to be sure

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 Rumble Room play.
Loading m25cutscene.py v.3.2.0 final; May 27, 2007
CustomHeadCurrentTime 1267411159.650000
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 'zombie' imported
Loading freeroam_keepbuildingdamage.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'freeroam_keepbuildingdamage' imported
FFX Mission Plugin 'm25ai_lowjumper' imported
FFX Mission Plugin 'm25ai_realitymanipulation' imported
FFX Mission Plugin 'cutscene_power' imported
Loading     m25enc_OPENDOOR.py v.1.0.0 build 0; branch = main
Loading m25enc.py v.3.2.0 July 27, 2008
FFX Mission Plugin 'm25enc_opendoor' imported
Loading     m25enc_simplechoice.py v.1.0.0 build 0; branch = main
FFX Mission Plugin 'm25enc_simplechoice' imported
Starting Built-In Function Wrapper 1.5
('Object_CalcPrestige', 'js')
ffx3\Missions\Scripts\sk.py importing FFX
ffx3\Missions\Scripts\sk.py loaded
>>> C:\Users\Nick\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\cM25 Skirmish Epic Mode.py executed
>>> C:\Users\Nick\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\danger.py executed
>>> C:\Users\Nick\AppData\Local\Irrational Games\Freedom Force vs the 3rd Reich\temp\cM25 Skirmish Epic Mode.py executed
>>> OnReceiveSelectedEnemies(('custom_vil_0', ))
SkirmishSpawnEnemy: custom_vil_0 (alien_warrior_extra, 232)
alien_warrior_extra:2
! GetMapInfo
MLOG_Init(keepRunningModules=0): starting up
mlogreader.MLOG_Init: current mission = 'MP_AIRFIELD'
initialising FFX: skirmish=1
mapinfocaliper1 is not a valid explosion object
mapinfocaliper0 is not a valid explosion object
mapinfocaliper2 is not a valid explosion object
mapinfocaliper3 is not a valid explosion object
numberStr=39
storing hero_0: id_1,-39
team1 leader set
team2 leader set
autotransfer for hero_0
initialising FFQ_initialiseExtras()
FFX_UpdateSun: getting default sun
FFX_UpdateSun: setting = (-40.0, 30.0, 1.20000004768, 1.0, (0.800000011921, 0.5, 0.20000000298))
reconstructing transformer
TRANSFERAI custom_vil_0_1 to form_1 (watch=0.000000)
team2 leader set
initAttribsForChar: working on hero_0 (Hotrod)
initAttribsForChar (Hotrod): looking at attribute driver
execInitAttrib: init driver attribute
    on hero_0 of template custom_template_39 (Hotrod)
execInitAttrib: ERROR in initialising attribute driver
Traceback (innermost last):
  File "c:\program files\steam\steamapps\common\freedom force vs. the 3rd reich\.\ffx3\missions\scripts\ffx.py", line 930, in initAttribsEvent
    initAttribsForChar(event.object,event.user)
  File "c:\program files\steam\steamapps\common\freedom force vs. the 3rd reich\.\ffx3\missions\scripts\ffx.py", line 893, in initAttribsForChar
    execInitAttrib(char, attribute, update)
  File "c:\program files\steam\steamapps\common\freedom force vs. the 3rd reich\.\ffx3\missions\scripts\ffx.py", line 914, in execInitAttrib
    execInitAttrib2(char, attribute, init)
  File "c:\program files\steam\steamapps\common\freedom force vs. the 3rd reich\.\ffx3\missions\scripts\ffx.py", line 922, in execInitAttrib2
    exec init
  File "<string>", line 1, in ?
  File "c:\program files\steam\steamapps\common\freedom force vs. the 3rd reich\.\ffx3\missions\scripts\ffx.py", line 23538, in initdriver
    alignWith(name, char)
  File "c:\program files\steam\steamapps\common\freedom force vs. the 3rd reich\.\ffx3\missions\scripts\ffx.py", line 23214, in alignWith
    Object_SetOrientation(char,angle,(0,0,1))
SystemError: NULL result without error in call_object
initAttribsForChar: working on form_1 (alien_warrior_extra)
initAttribsForChar (alien_warrior_extra): looking at attribute thin skinned
initAttribsForChar (alien_warrior_extra): looking at attribute invertebrate
initAttribsForChar (alien_warrior_extra): looking at attribute strange visitor
initAttribsForChar (alien_warrior_extra): looking at attribute flier
Plugin 'firehydrant' OnPostInit() called
Plugin 'zombie' has no OnPostInit()
Plugin 'freeroam_keepbuildingdamage' OnPostInit() called
Plugin 'm25ai_lowjumper' has no OnPostInit()
Plugin 'm25ai_realitymanipulation' has no OnPostInit()
Plugin 'cutscene_power' has no OnPostInit()
Plugin 'm25enc_opendoor' has no OnPostInit()
Plugin 'm25enc_simplechoice' has no OnPostInit()
cshelper: Cutscene [gameover_cs] submitted for playing
cshelper: Now playing cutscene [gameover_cs]
Step 1 of 3
Step 2 of 3
Step 3 of 3
cshelper: Cutscene [gameover_cs] has ended