-
Notifications
You must be signed in to change notification settings - Fork 22
New Indicators
Indicators are the little graphic widgets denoting buffs, ailments and conditions in the party portrait row.
New indicator icons may be defined in Temple+ via formatted text file entries.
The files should be placed in the folder rules\indicators\
, and will be automatically parsed by the engine.
Example file contents:
ID_string: PSI_FOCUS
effect_type: 2
texture_file: art\interface\player_conditions\conditions\psionic-focus.tga
help_topic: TAG_ROOT
tooltip_base_text: Psionically Focused
ID_string
field is used as an identifier.
You can use tpdp.hash() (e.g. tpdp.hash("PSI_FOCUS")
) to obtain the numeric ID in py files.
effect_type
denotes what kind of indicator it is. 0 is for buffs, 1 is for ailments, and 2 is for conditions. The different types are rendered above, below and inside the portraits, respectively.
texture_file
is the tga file. You can provide any path but it's recommended to maintain the vanilla file structure (as above).
NB: the .tga file must be saved without RLE compression!
help_topic
is the topic ID, as in the help.tab entries.
tooltip_base_text
is the default tooltip text to be displayed when hovering the indicator. You can leave this blank.
The relevant event type is the ET_OnGetEffectTooltip.
Within the callback, you'll want to use the object event method that appends text, as shown here:
Example:
def PrayerEffectTooltip(attachee, args, evt_obj):
evt_obj.append(52, -2, "Karmic Prayer (" + str(args.get_arg(2)) + " rounds)")
return 0
Except that the first number (effect ID) should be replaced by tpdp.hash() as noted above.