Skip to content
Dude McDude edited this page Mar 3, 2017 · 14 revisions

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.

Usage in python callbacks

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:

https://github.com/GrognardsFromHell/TemplePlus/wiki/Python-builtin-tpdp-module#eventobjeffecttooltip

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.

Clone this wiki locally