benilla-re systems structs docs

s_npcTextCache

global · dbcache

Address
0xc0e264 · 4 bytes, up to 0xc0e267
Type
void *
Meaning
Holds the NPC text cache store, npccache.wdb
Confidence
verified, proof one
Finding
ui/gossip#the-greeting

Finding: The greeting in ui: the gossip window

After the message the handler asks the NPC text cache (query opcode 0x17f) for the text id. A text id of 0 or a cache miss makes the greeting pending (0xbbb670 = 1) and shows nothing. With the record it takes a column from the NPC's gender and draws one of the eight entries at random, weighted by their probabilities among those with text in that column. The text is expanded for $ macros (questtext), run through the language rewrite (chatlanguage) and stored, and GOSSIP_SHOW (id 297) fires. With no entry having text it logs Missing gossip text! and closes the window (GOSSIP_CLOSED, id 299).

The derivation is in the doc.