benilla-re systems structs docs

PublishGossipGreeting

function · ui · primitive

Address
0x4e2010 · 697 bytes, up to 0x4e22c8
Meaning
Draws a greeting from the NPC text record by weight and gender column, fires GOSSIP_SHOW
Confidence
verified, proof one
Finding
ui/gossip#the-greeting
Test
ui::glue_4c0_4e2010_weighted_pick

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.

Callers 2

Callees 12

Calls and jumps by a bare address, from tables/calls.tsv.