-
Notifications
You must be signed in to change notification settings - Fork 22
Python builtin tpdp module
Under Construction
The tpdp module is a new Temple+ builtin module used for exposing many ToEE data types. You can see the contents by typing in the game console
import tpdp
dir(tpdp)
Or, just check out the CPP file:
python_dispatcher.cpp
-
add(value, bonus_type, mesline_num)
adds a bonus entry. Will show a line from bonus.mes in the roll breakdown. -
add(value, bonus_type, text)
adds a bonus entry. Will show the specified text in the rolls breakdown. -
add_from_feat(value, bonus_type, mesline_num, feat_enum)
adds a bonus entry. Specifies the feat as the case. -
add_from_feat(value, bonus_type, mesline_num, feat_text_id)
adds a bonus entry. Specifies the feat as the case. (uses the string as feat ID - meant for use with the new Temple+ feats) -
set_overall_cap(flags, new_cap_value, new_cap_type, mesline_num)
sets an overall cap for a bonus type (use 0 to cap all types) get_sum()
-
add_zeroed(mesline_num)
- adds a null bonus (used for indicating nullified bonuses, e.g. Dex bonus nulled from Flatfooted) -
add_cap(bonus_type, cap_value, mesline_num)
adds a cap for a particular bonus type
- target (PyObjHandle)
- attacker (PyObjHandle)
-
get_flags()
gets the D20CAF flags -
set_flags(flags)
sets the D20CAF flags -
get_weapon_used()
returns PyObjHandle of the weapon used in this attack -
is_offhand_attack()
Is this an offhand attack?
- bonus_list
- flags
- attack_power (See D20DAP_ flags)
- critical_multiplier (integer; 1 by default, gets increased by various things)
-
add_dice(dice, damType, damageMesLine)
dice
is a PyDice object, create it viadice_new('XdY')
Members
- performer (PyObjHandle)
- target (PyObjHandle)
- spell_id
- data1 (generic piece of data used for various things depending on context, action type etc.)
- flags (see D20CAF_ flags)
- path
- action_type (see D20A_ constants)
- loc
- anim_id
Methods:
-
query_can_be_affected_action_perform(obj)
can obj be affected by the action (returns 1 by default, can return 0 due to things like Sanctuary, Ethereality, etc)
This is the "args" in the various callbacks.
Methods
-
get_arg(n)
gets the value of modifier arg n -
set_arg(n, value)
sets the value of modifier arg n -
condition_remove()
removes the modifier
Note: The class name is a bit of a misnomer - this is mostly used for exposing the Modifier args.
Used for d20_query calls.
- return_val - integer return value for the d20_query.
- data1 - generic piece of data. Can be a C++ pointer to another object.
- data2 - second generic piece of data
- get_spell_packet() - Used for CasterLevelMod events to get a SpellPacket from the data1 field
- data1 - generic piece of data. Can be a C++ pointer to another object (such as D20Action).
- data2 - second generic piece of data
- return_val - integer return value. Not really used as a return value, but you can manipulate it nonetheless for communicating with other callbacks.
Used in ET_OnToHitBonusBase, ET_OnToHitBonus2, ET_OnGetAC and ET_OnGetAcModifierFromAttacker
Members
- bonus_list
- attack_packet
Used for adding damage dice and bonuses. Belongs to events ET_OnDealingDamage and ET_OnDealingDamage2.
Members
Used for getting the critter's attack dice
Used for D20 Action Checks/Performance events and obtaining number of attacks (base/bonus/natural)
Used for retrieving spell caster specs. New for Temple+!
Tooltip event for mouse-overed objects.
Used creating status effect indicators in the party portrait row and their associated tooltips.
Methods
-
append(effect_type_id, spell_enum, text)
effect_type_id - up to 91 is for buffs, 92 thru 167 is for ailments, and the rest are for status effects (icons inside the portrait)
spell_enum - use -2 for non-spells
text - freeform text
Used for Object Events (triggered by entering/leaveing AoE)
Members
- target (PyObjHandle) - the critter affected by the AoE (or departing it)
- aoe_obj (PyObjHandle) - The origin of the AoE effect (often a spell object - proto 6400)
- evt_id - event id
Dispel Check Event
Used for triggering the immunity handling query
Used for getting move speed, and also for model size scaling with Temple+.
Used for Ability Loss status
Used for Reflex Save throws that reduce damage.