Riven HSPT resources

From A look inside The Link @ wiki
Revision as of 04:03, 6 February 2008 by Di gama (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Riven
Mohawk Overview
BLST CARD FLST HSPT
MLST NAME PLST RMAP
SFXE SLST tBMP tMOV
tWAV VARS VERS ZIPS
Scripts Variables
External commands

These contain hotspots, sort of invisible buttons within cards that respond to mouse clicks (and other events) by performing actions described by attached scripts. Each HSPT resource is a list of records and starts with an unsigned short equal to the number of records, like *LST resources. Due to the attached scripts, HSPT records can have different size and there is no way to know it without fully decoding the record. Each record has the following structure:

unsigned short blst_id Links the hotspot to a BLST resource record
short name_rec If ≥ 0, record index in NAME resource 2 to provide a name for the hotspot
short left Hotspot rectangle within the game window, in pixels
short top
short right
short bottom
unsigned short u0
unsigned short mouse_cursor Cursor icon to set when the mouse rolls over this hotspot
unsigned short index Record index starting from 1
short u1
unsigned short u2
variable size script

Hotspot rectangles can fall outside the game window (in any direction) and often two or more hotspots overlap. I've even found cases whith with left > right (card 371, t_Data). When more hotspots overlap, the "active" hotspot receiving mouse events is the one with the largest index value.

Cursor icon values are on the right.

u0 seems always zero and changing it seems to leave Riven indifferent. u1 is very very often -1 but not always. u2 is 0 for ordinary hotspots, 1 for Zip Mode ones: the engine disables all Zip Mode hotspots when Zip Mode is off.

For info on the attached script see the scripts section.