Character Variables

From PSwiki
Revision as of 20:43, 31 October 2026 by Talad (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Usage Actual meaning
Quest progress and cross-quest memory Records facts, choices, milestones, or counters that dialogue and other quests can check. Conditions can test whether a variable exists, matches a particular value, or falls within a numerical range. Dialogue and scripts can set or remove these records.

Remembers access granted through quests. Examples include the Hydlaa winch. Records discoveries made during an active quest. Credit for defeating a tribe — <tribe_name>_vanquished

scale: Permanent character size Applies an individual size multiplier on top of the character’s racial scale. For example, 1.5 means 50% larger and 0.5 means half size. Administrators can save or reset this size adjustment.
ghost: character gets the ghost shader A ghost shader is applied to the character.
Magic, poison, and disease resistance Stores resistance to Azure, Blue, Brown, Crystal, Dark, and Red Way, plus Poison and Disease. Damage scripts use these values to reduce the relevant damage. The inspected formulas use max(0, 1 − resistance / 200): a value of 100 halves damage; 200 prevents that damage.
Temporary resistance and other numerical bonuses Spells and effects can temporarily modify the numerical value of a character variable, including resistances. Calculations see the modified value, and the character’s modifier summary displays these bonuses. These temporary adjustments use the same runtime system but do not inherently become permanent table values.

There are also two pet-related entries worth distinguishing from active functionality:

Variable Current meaning/status
Pet energy — pet_energy Persists a pet’s current energy. Summoning consumes energy, eating restores it, and low energy triggers food-seeking or requests for food. It is also displayed in the pet interface. The maximum is calculated separately from the pet’s evolution/size.
pet_happiness The pet interface reads it, but then explicitly overrides happiness to 100. Stored happiness currently has no effect on that display.
pet_lastfed Existing database rows contain timestamps for the last feeding. I found no reader or writer in the current source, so it appears to be leftover data rather than an active mechanic.