• Welcome to Freedom Reborn Archive.
 

FFX 3.2 attributes not loading

Started by BloodRed, January 18, 2008, 11:57:30 PM

Previous topic - Next topic

BloodRed

I've been playing with FFX 3.2 for about a month now, with no problems. Then, just today, I start a rumble room mission with a custom character, that I had already ran through FFXCC, but none of the ffx attributes loaded. Here's my script log.

>>> system/init.py executed
>>> system/localinit.py executed
>>> system\tredir.py executed
loading datfiles version 0.251000
loading cshelper ...
Starting ffx.py v. 3.2.1 build 1; branch = Gold / Release plus TMX Hero File Pack
Loading m25ai.py v. 3.2.0 build 10; branch = beta 2: m25 branch 2
importing missionobjvar.py v1.18
importing MLOG Reader 1.0.18 release
Starting General Utilities 1.0
missionobjvar(FixLongs): Fixing overflow issue with <SCSTATE_BUOYANT>
missionobjvar defining functions for Campaign play.
Traceback (innermost last):
  File "C:\Documents and Settings\Aaron\Local Settings\Application Data\Irrational Games\Freedom Force vs the 3rd Reich\temp\im_beast.py", line 6, in ?
    from ffx import *
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\ffx.py", line 29, in ?
    import m25ai
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\m25ai.py", line 60, in ?
    import m25generateai
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\m25generateai.py", line 35, in ?
    import ffxmulti
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\ffxmulti.py", line 11, in ?
    ffxMultis=[
TypeError: sequence index must be integer
sk: missionobjvar already loaded; resetting mission type to skirmish for mission and object vars
missionobjvar defining functions for Rumble Room play.
ffx3\sk.py importing FFX
ffx3\missions\scripts\sk.py loaded
>>> C:\Documents and Settings\Aaron\Local Settings\Application Data\Irrational Games\Freedom Force vs the 3rd Reich\temp\im_beast.py executed
data\sk.py ERROR:
    cannot run ffx.FFX_InitSkirmish()
sk.SpawnEnemy: energy for _skant_worker01 (ant_worker) changed from 2 to 2
addArrow _skant_worker01_arrow _skant_worker01 0 0
setupffx skirmish
Traceback (innermost last):
  File "C:\Documents and Settings\Aaron\Local Settings\Application Data\Irrational Games\Freedom Force vs the 3rd Reich\temp\im_beast.py", line 48, in OnPostInit
    SetupFFXSkirmish()
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\m25skirmish.py", line 100, in SetupFFXSkirmish
    m25ai.SetSkirmishModeOn()
AttributeError: SetSkirmishModeOn

M25

It looks like something happened to your ffxmulti.py file.   The file is in ffx3/Missions/Scripts   -  if you post a copy of if here, one of us should be able to spot the problem.


BloodRed

I haven't changed anything in ffxmutli.py since I last added a couple of combo atributes. But here it is.

#first entry here is the name of the group attribute youve created and added to attributes.dat via FFEdit
#the remaining ones are ffx attributes which get activated by anyone who buys this power
#attribute names should be all lower case, and no spaces.
#attributes that get grouped should be FFX ones or from the following list:
#
#fasthealing, unheroic, heroic, extraheroic, nimble, slowmoving, heavylifter, unstablemolecules,
#timid, bezerker, unbeliever, disciplined, level-headed, grim resolve, shake it off, flier.
# Jumper and density control are only very roughly approximated, as they use clumsy jumper instead
# of jumper - use them only if you really can't find a workaround.)

ffxMultis=[
['undead','mindless','bodyarmor10','invulnerable0','degenerative','nocturnal',]
['bloodred','kineticabsorber','absorbmat','bezerker','combatskill','absorbenergy',]
['environmentcontrol','envcontrollocal','envcontrolglobal'],
['powercosmic','metastrength','invulnerable2','solarpowered',],
['thoughtform','fasthealing','ephemeral','metabolic','telepathy','glassjaw',],
['ffqgymnast', 'nimble', 'acrobatic', 'superleaper', 'ffqlowjumper'],
['ffqtrapezist', 'nimble', 'acrobatic', 'superleaper', 'ffqlowjumper', 'ffqropeswinger'],
['ffqjumpingjack', 'ffqhighjumper', 'ffqlongjumper', 'superleaper'],
['ffqpagangod', 'ffqimmortal', 'ffqextradimensional'],
['ffqprowler', 'chameleon', 'nocturnal', 'ffqloner', 'ffqtracking'],
['ffqairsuperiority', 'ffqnimbleflier', 'fastflier', 'flier'],
['sorcerer', 'firecontrol', 'sensitive', 'guardianp', 'summoner2', 'groupteleport'],
['invulnerable34', 'invulnerable3', 'invulnerable4'],
['invulnerable22a34', 'invulnerable2', 'invulnerable2a', 'invulnerable3', 'invulnerable4'],
['naturegoddess','puppetn','nemesis','pheremones'],
['currentsapper','absorption'],
['superhuman','vulnerability','invulnerable2','acrobatic','telepathy','flier'],
['ffqrealitymanipulation','ffqrealitymanipchaos','ffqrealitymaniporder'],
['trueinvulnerability10','invulnerable2','grimresolve'],
['trueinvulnerability15','invulnerable2a','grimresolve'],
['trueinvulnerability20','invulnerable3','grimresolve'],
['trueinvulnerability30','invulnerable4','grimresolve'],
['lesserregenerationplus','lesserregeneration','fasthealing'],
['regenerativeplus','superhealer','fasthealing'],
['growth','slowmoving','heavyfooted','heavylifter'],
['strongflier','fastflier','heavylifter'],
['strongleaper','superleaper','heavylifter'],
['airwalker','invulnerable','fastflier','sensitive','shakeitoff','ffqtempinvulnerability'],
['adversary','invulnerable3','grimresolve','ffqdisguise','ffqrealitymanipchaos','telepathy','illusionist','mimic','shakeitoff'],
['box1','fastflier','heavylifter','invulnerable'],
['sasquatch','superleaper','heavylifter','invulnerable'],
['amazo','heavylifter','shakeitoff','plasmasculptor','fastflier','telepathy'],
['animalman','heavylifter','superleaper','telepathy','nimble'],
['cosmiccontrolrod','fastflier','heavylifter','invulnerable','metabolic','shakeitoff'],
['negativezoneruler','fastflier','heavylifter','invulnerable','metabolic','shakeitoff','privatearmy3','summoner2'],
['antimonitorgiant','sensitive','slowmoving','invulnerable2a','illusionist','supertk','shakeitoff','puppetu'],
['antimonitor','sensitive','invulnerable','illusionist','supertk','shakeitoff','puppetu'],
['arnimzola','invulnerable0','groupmind'],
['watcher','sensitive','astral','supertk','ffqdisguise','illusionist','shakeitoff'],
['hela','flier','sensitive','illusionist','fastflier','levelheaded','astral','shakeitoff'],
['loki','sensitive','astral','invulnerable','puppetn','puppetu','illusionist','ffqimmortal'],
['odin','sensitive','astral','invulnerable2','superhealer','disciplined','unbeliever','coordinator','shakeitoff','levelheaded'],
['surtur','shakeitoff','invulnerable2a','slowmoving','heavyfooted','heavylifter','disciplined','unbeliever','overheated'],
['ymir','shakeitoff','invulnerable','slowmoving','heavyfooted','heavylifter','disciplined','ffqimmortal','frostbite'],
['olympiangod', 'ffqimmortal','shakeitoff','heavylifter','fasthealing','fastflier'],
['hulk','invulnerable','superleaper','heavylifter','painresponse','heavyfooted','ffqlongjumper'],
['starfox', 'lesserregeneration', 'fasthealing', 'fastflier','shakeitoff'],
['zatanna','earthcontrol','firecontrol','icecontrol','weathercontrol','puppetn','supertk'],
['zzzax','fastflier','borrowedtime','urbandweller','shortcirc'],
['daydreamer','telepathy','ffqprecognitive'],
]

GogglesPizanno

It looks like you put the commas at the end of your new combos in the wrong spot.

Currently:
['undead','mindless','bodyarmor10','invulnerable0','degenerative','nocturnal',]
['bloodred','kineticabsorber','absorbmat','bezerker','combatskill','absorbenergy',]


Try moving them to outside the combo array:
['undead','mindless','bodyarmor10','invulnerable0','degenerative','nocturnal'],
['bloodred','kineticabsorber','absorbmat','bezerker','combatskill','absorbenergy'],




BloodRed

Okay, that seemed to fix the problem for a while. It ran okay, and then when I tired absorbing something, I got the error message "ERROR in initialising attribute absorbmat inside combo bloodred". I left the rumble room then started a new one to see if it'll happen again, and the time it happened as soon as it started. Wasn't sure how much was important, so here's almost the whole script.log.

['kineticabsorber', 'absorbmat', 'bezerker', 'combatskill', 'absorbenergy']
-----------------
hero_0
['bloodred', 'bedevilled', 'jumper', 'bodyarmor10', 'superleaper', 'kineticabsorber', 'absorbmat', 'bezerker', 'combatskill', 'absorbenergy']
-----------------
hero_0
[]
sk.SpawnEnemy: energy for _skant_worker01 (ant_worker) changed from 2 to 2
addArrow _skant_worker01_arrow _skant_worker01 0 0
setupffx skirmish
! GetMapInfo
MLOG_Init(keepRunningModules=0): starting up
mlogreader.MLOG_Init: current mission = 'MP_AIRFIELD'
team1 leader set
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))
addArrow _sk_arrow _skant_worker01 0 0
setting up ffxtarget
setting up ffxgun
setting up _skant_worker01
setting up mapinfocaliper0
setting up mapinfocaliper1
setting up mapinfocaliper2
setting up mapinfocaliper3
initAttribsForChar: working on hero_0 (blood red)
initAttribsForChar (blood red): looking at attribute bloodred
execInitAttrib: init kineticabsorber attribute inside ['bloodred', 'kineticabsorber', 'absorbmat', 'bezerker', 'combatskill', 'absorbenergy'] combo
    on hero_0 of template custom_template_46 (blood red)
execInitAttrib: init absorbmat attribute inside ['bloodred', 'kineticabsorber', 'absorbmat', 'bezerker', 'combatskill', 'absorbenergy'] combo
    on hero_0 of template custom_template_46 (blood red)
GetCharacterData: called on non-character _impobj_148, template=cub_bldg_hanger
execInitAttrib: ERROR in initialising attribute absorbmat inside combo bloodred
Traceback (innermost last):
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\ffx.py", line 931, in initAttribsEvent
    initAttribsForChar(event.object,event.user)
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\ffx.py", line 887, in initAttribsForChar
    execInitAttrib(char, component, update, combo=attribute, multi=multi)
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\ffx.py", line 915, in execInitAttrib
    execInitAttrib2(char, attribute, init)
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\ffx.py", line 923, in execInitAttrib2
    exec init
  File "<string>", line 1, in ?
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\ffx.py", line 23044, in initabsorbmat
    initabsorbMaterial_nosubtype(char,obj)
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\ffx.py", line 23107, in initabsorbMaterial_nosubtype
    if m25ai.HasPowerType(obj,'cold','ranged'):
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx3\missions\scripts\m25ai.py", line 4295, in HasPowerType
    for powdata in cdata['powers'].keys():
KeyError: powers
initAttribsForChar: working on _skant_worker01 (ant_worker)
initAttribsForChar (ant_worker): looking at attribute heavy lifter
initAttribsForChar (ant_worker): looking at attribute invertebrate
initAttribsForChar (ant_worker): looking at attribute wall climbing
initAttribsForChar (ant_worker): looking at attribute armoured
initAttribsForChar (ant_worker): looking at attribute jumper

M25

Taskmaster may have a better answer, but from a reading of the code, it looks like absorbmat is broken and will require a patch to make it work.


TaskMasterX

Last time I checked, Absorb Materials was working fine. Does Absorb Materials work when not in a Combo Attribute? Have you installed the FFX 3.2.1 update? Which Skirmish Mode are you playing in?

BloodRed

Quote from: TaskMasterX on January 23, 2008, 06:10:25 PM
Last time I checked, Absorb Materials was working fine. Does Absorb Materials work when not in a Combo Attribute? Have you installed the FFX 3.2.1 update? Which Skirmish Mode are you playing in?

Well, I was thinking made it was the combo attribute, but I had another character with absorb energy that had the same thing happen, but it's not in a combo attribute. It also seems to be kinda random. I've played abit with both characters, and it only happened about half the time. But when it did happen, it would either be at the start of the mission, before I even had a chance to use it, and sometimes awhile into playing when I try to absorb something. The first, second and last time it happened, I believe I was playing the Ironman - Beast mode.

I believe I did install the FFX 3.2.1, and also just remembered that I installed VPMAX, but I'm sure if it was before or after I started to have this problem. Though I don't see how that would affect it.

TaskMasterX

I tried your combo attribute in Ironman-Beast mode and I would get an ERROR initializing bedevilled in the combo attribute. When I took out the bedevilled in ffxmulti.py, the combo attribute worked fine every time. Looking at the FFX Manual, I see that Bedeviled is not an attribute that is usable in Combo Attributes, so that may be part of the problem.

BloodRed

I didn't have bedeviled in the combo. I had berserker.

BloodRed

Oh, I see why you thought that now.

Quote from: BloodRed on January 19, 2008, 05:07:16 PM
['kineticabsorber', 'absorbmat', 'bezerker', 'combatskill', 'absorbenergy']
-----------------
hero_0
['bloodred', 'bedevilled', 'jumper', 'bodyarmor10', 'superleaper', 'kineticabsorber', 'absorbmat', 'bezerker', 'combatskill', 'absorbenergy']

The combo is:

['bloodred','kineticabsorber','absorbmat','bezerker','combatskill','absorbenergy'],

TaskMasterX

I tried that Combo and it works for me. What I usually do when I have problems like this that are hard to nail down, I install FFX to a seperate folder to use as a backup.

I then make a backup of my current Scripts folder to keep any customizations or modifications I made.

Then overwrite my current Scripts folder with the one from the Backup Install of FFX.

Test the Absorb Materials Attrib and make sure it works w/out making any modifications to FFX, and then, if everything is fine, create the Combo Attribute and try it.

If that works, then you can start adding back the modifications you had before, but add them back in one at a time and test the game so you'll know what causes the problem.

BloodRed

Okay, I did like you said, and got the error still.

>>> system/init.py executed
>>> system/localinit.py executed
>>> system\tredir.py executed
loading datfiles version 0.251000
loading cshelper ...
Starting ffx.py v. 3.2.0 build 11; branch = Gold / Release
Loading m25ai.py v. 3.2.0 build 10; branch = beta 2: m25 branch 2
importing missionobjvar.py v1.18
importing MLOG Reader 1.0.18 release
Starting General Utilities 1.0
missionobjvar(FixLongs): Fixing overflow issue with <SCSTATE_BUOYANT>
missionobjvar defining functions for Campaign play.
CustomHeadCurrentTime 1201669875.683000
Starting Height Check module 1.4
Starting System Utilities 1.4
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
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
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\sk.py importing FFX
ffx3\missions\scripts\sk.py loaded
>>> C:\Documents and Settings\Aaron\Local Settings\Application Data\Irrational Games\Freedom Force vs the 3rd Reich\temp\im_beast.py executed
>>> C:\Documents and Settings\Aaron\Local Settings\Application Data\Irrational Games\Freedom Force vs the 3rd Reich\temp\danger.py executed
>>> C:\Documents and Settings\Aaron\Local Settings\Application Data\Irrational Games\Freedom Force vs the 3rd Reich\temp\im_beast.py executed
MLOG_Init(keepRunningModules=0): starting up
mlogreader.MLOG_Init: current mission = 'MP_AIRFIELD'
initialising FFX: skirmish=1
numberStr=46
storing hero_0: id_1,-46
data\sk.py ffx.FFX_InitSkirmish() done
---combos found
[]
-----------------
hero_0
['absorbenergy', 'absorbmat']
-----------------
hero_0
[]
sk.SpawnEnemy: energy for _skant_worker01 (ant_worker) changed from 2 to 2
addArrow _skant_worker01_arrow _skant_worker01 0 0
setupffx skirmish
! GetMapInfo
MLOG_Init(keepRunningModules=0): starting up
mlogreader.MLOG_Init: current mission = 'MP_AIRFIELD'
team1 leader set
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))
addArrow _sk_arrow _skant_worker01 0 0
setting up ffxgun
setting up ffxtarget
setting up _skant_worker01
setting up mapinfocaliper0
setting up mapinfocaliper1
setting up mapinfocaliper2
setting up mapinfocaliper3
initAttribsForChar: working on hero_0 (unname)
initAttribsForChar (unname): looking at attribute absorbenergy
execInitAttrib: init absorbenergy attribute
    on hero_0 of template custom_template_46 (unname)
GetCharacterData: called on non-character _impobj_148, template=cub_bldg_hanger
execInitAttrib: ERROR in initialising attribute absorbenergy
Traceback (innermost last):
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx32\missions\scripts\ffx.py", line 931, in initAttribsEvent
    initAttribsForChar(event.object,event.user)
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx32\missions\scripts\ffx.py", line 894, in initAttribsForChar
    execInitAttrib(char, attribute, update)
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx32\missions\scripts\ffx.py", line 915, in execInitAttrib
    execInitAttrib2(char, attribute, init)
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx32\missions\scripts\ffx.py", line 923, in execInitAttrib2
    exec init
  File "<string>", line 1, in ?
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx32\missions\scripts\ffx.py", line 24390, in initabsorbenergy
    initabsorbEnergy_nosubtype(char,obj)
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx32\missions\scripts\ffx.py", line 24416, in initabsorbEnergy_nosubtype
    if m25ai.HasPowerType(obj,'electrical','ranged') | m25ai.HasPowerType(obj,'electrical','area'):
  File "C:\Program Files\Irrational Games\Freedom Force vs The 3rd Reich\.\ffx32\missions\scripts\m25ai.py", line 4289, in HasPowerType
    for powdata in cdata['powers'].keys():
KeyError: powers
initAttribsForChar: working on _skant_worker01 (ant_worker)
initAttribsForChar (ant_worker): looking at attribute heavy lifter
initAttribsForChar (ant_worker): looking at attribute invertebrate
initAttribsForChar (ant_worker): looking at attribute wall climbing
initAttribsForChar (ant_worker): looking at attribute armoured
initAttribsForChar (ant_worker): looking at attribute jumper
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()

stumpy

I am about 92.63% sure that the problem is that certain non-character objects have their 'complex' attributes set and that is tricking some code that uses that as a check for whether something is a character.

Ultimately, I am not sure we should rely on objects with complex attributes always being characters. The game allegedly does use the attribute for some objects, though I suspect that it would almost never be noticed if we got rid of it for the few objects that use it.

In that thinking, the quick fix is to go into FFEdit, open the Templates tab, find the objects and clear their complex attributes by changing the Attribute Override for it from 'complex' to '<none>'. In my game, the objects to do this for were 'building_rubble', 'cub_bldg_hanger', 'ger_bldg_cathedral', 'mental_constraint', and 'nazihq_lab_machine_5_dest'. It would need to be done for any mod you are running.

The more cautious approach is to change the code that uses complex as a sign of character-tude. I am not sure where all that is done, but I think in this case it may be in ..\missions\scripts\m25ai.py in the GetCharData() wrapper function. Changing the existing code from

def GetCharData(char):
cdata = {}
if js.Object_GetAttr(char,'complex') == 0:
return {}
cdata = chardata.GetCharacterData(char)
return cdata


def GetCharData(char):
cdata = {}
if ( not ( Object_GetClass(char) & js.OC_CHARACTER ) ) or ( js.Object_GetAttr(char,'complex') == 0 ):
return {}
cdata = chardata.GetCharacterData(char)
return cdata


Maybe M25 knows if that would be an appropriate change.

HumanTon

BloodRed, are you using any player-made maps with custom objects in them? Looking at Goggles' Mappack I noticed that some of those objects have Complex attributes set, which might also cause the problem Stumpy is talking about.

(Voice packs also use fake characters, which probably have complex attributes; maybe that could do it as well.)

BloodRed

After posting last night I uninstlalled and then reinstalled ffx. I'm going to start putting evrything back now, so maybe it's fixed. If I need to, then I'll try your suggestions again. I did this because I didn't want to keep focusing on this. It's hard enough for me to keep on track with my college work being so boring.

Quote from: HumanTon on January 30, 2008, 06:26:43 AM
BloodRed, are you using any player-made maps with custom objects in them? Looking at Goggles' Mappack I noticed that some of those objects have Complex attributes set, which might also cause the problem Stumpy is talking about.

(Voice packs also use fake characters, which probably have complex attributes; maybe that could do it as well.)

No, wasn't useing any custom maps, but I was useing a voice pack.

M25

I think stumpy's code change should fix the issue, though I would write it like this:


def GetCharData(char):
cdata = {}
if not (js.Object_GetAttr(char,'complex') and ST_char(char)):
return {}
cdata = chardata.GetCharacterData(char)
return cdata



stumpy

Cool. I didn't know about ST_char(). That should keep properties from being absorbed by illusions. You could even go with
def GetCharData(char):
if js.Object_GetAttr(char,'complex') and ST_char(char):
return chardata.GetCharacterData(char)
return {}


BTW, does anyone know what complex actually means for movement? I have read the very short description in the doc sheet, but I just get the impression that it has to do with how the game decides whether an object is high enough to go around or just walk over. But, I have never done any testing on it.

M25

Er, yeah, that works.   :doh:


I haven't tested anything involving the game's use of complex.  I was under the impression that it was unused.  I wonder if we are affecting anything in the movement code by setting complex values!


HumanTon

For the record, here's what the docs say about complex:

complex:   If 1, the movement grid will do a more expensive but more accurate ray cast to determine the object's height. This should be set of complex objects with multiple overlapping polygons. For example, it was used for building rubble. Defaults to 0.

So it seems the only real problem on the engine side with adding "complex" to the characters is that it might be slowing the game down a bit by making it use a ray cast where it wouldn't normally. In other words, it's not changing what the game decides to do so much as changing the method it uses to make that decision.



BloodRed

Well, since the thread has already been lead somewhat astray, I guess I'll use it to post another question I have about the two absorb attributes. Is there a way, other than making a new hero with the same name plus the material type, that I can customize what happens to the character when they use an absorb power? And is there a way to do this for only particular characters rather than it affecting all the characters with the same attribute?

I ask because I want Blood Red to be able to change into a material when he absorbs one, but only gain some extra attacks from energy. Like, for instance, I have him absorb metal from a car and he changes to the Blood Red (METAL) hero file I made, but then I have him absorb electricity from the same car and he gains a short ranged area attack that deals electrical damage but keeps his metal form.

TaskMasterX

No, the changes that are made to the absorbing character each time they absorb a new material, are all governed by the attribute's code and aren't customizable per character.

I did allow for this behaviour in the Absorb Powers attribute; being able to absorb from one target and keep those powers even after absorbing from another target using the 'multiple' targets option for that attribute. But this was difficult and time-consuming to do, so adding this feature to the Material and Energy Absorber Attribs would be a pretty large project.