Attributes of PyObjectHandle structure in Python

Discussion in 'General Modification' started by dulcaoin, Apr 24, 2005.

Remove all ads!
  1. dulcaoin

    dulcaoin Established Member Veteran

    Joined:
    Mar 10, 2005
    Messages:
    213
    Likes Received:
    0
    Here is the (full) list of available attributes that can be retrieved from a PyObjectHandle object in python, including the return types:

    __safe_for_unpickling__ : long (int)
    area : long (int)
    feats : tuple (of int)
    get_hp_cur : long (int) [deprecated - use stat_hp_current instead]
    get_hp_max : long (int) [deprecated - use stat_hp_max instead]
    get_size : long (int)
    height : double (float)
    hit_dice : PyDice
    hit_dice_num : long (int)
    location : longlong (quadword)
    loots : long (int)
    map : long (int)
    name : long (int)
    off_x : double (float)
    off_y : double (float)
    origin : long (int)
    radius : double (float)
    rotation : double (float)
    scripts : PyScriptArray
    substitute_inventory : PyObjectHandle
    type : long (int)

    -- dulcaoin

    P.S. note the lack of direct access to the critter's inventory, darnit. :(
     
    Last edited: May 5, 2005
  2. SCO

    SCO Member

    Joined:
    Jan 2, 2011
    Messages:
    58
    Likes Received:
    0
    I was wondering why there are some stats that aren't able to be set or read from python but give no error, just failure (like stat_level_wizard & friends).

    At first i thought that the functions validate them and tried to go lower, by searching temple dll for npc object methods
    .

    Found set_int and get_int. They didn't work either.

    No way to change these?

    I actually found "stat_level_get(int)" that works for reading those, but not changing them.
     
  3. SCO

    SCO Member

    Joined:
    Jan 2, 2011
    Messages:
    58
    Likes Received:
    0
    I found the method
    game.party[X].spell_known_add

    What are it's argument?
     
  4. SCO

    SCO Member

    Joined:
    Jan 2, 2011
    Messages:
    58
    Likes Received:
    0
    Ok, i figured it out it's three arguments.

    Due to the way python is unhelpful about type it's rather hard to figure out the rest, but one of them must be a spell id.

    ToEE really doesn't like a debugger attached.
     
    Last edited: Jan 1, 2012
Our Host!