Overview
TheXMLData class parses the game’s XML stream and provides real-time access to character status, room information, inventory, and other game state data. All properties are automatically updated as the game sends new information.
XMLData is a singleton - access properties directly via
XMLData.property_nameCharacter Status
Health & Spirit
Current health points
Maximum health points
Current spirit points
Maximum spirit points
Spirit value before last change (useful for death detection)
Mana & Stamina
Current mana points
Maximum mana points
Current stamina points
Maximum stamina points
Concentration (DragonRealms)
Current concentration points (DR only)
Maximum concentration points (DR only)
Character Info
Character name
Game identifier: ‘GSIV’, ‘GSPlat’, ‘DR’, ‘DRT’, ‘DRF’
Unique player ID
Character level
Experience text (e.g., “10% remaining”)
Experience percentage (0-100)
Stance & Mind
Current stance name (e.g., “offensive”, “guarded”)
Numeric stance value (0-100)
Mind state text (e.g., “clear”, “muddled”)
Numeric mind value (0-100)
Encumbrance
Short encumbrance text (e.g., “light”, “heavy”)
Full encumbrance description
Numeric encumbrance value (0-100)
Room Information
Current room title including brackets: “[Room Name]”
Room description text
Array of exit strings (e.g., [‘north’, ‘south’, ‘gate’])
Formatted exit string from game
Increments each time you move to a new room
Unique room identifier (when available)
Time & Roundtime
Current server time (Unix timestamp)
Offset between local and server time
Server time when roundtime ends
Server time when cast roundtime ends
Last mana pulse time (Unix timestamp)
Status Indicators
Hash of status indicators (bleeding, stunned, etc.)
Values are ‘y’ or ‘n’
Name of prepared spell, or “None”
Injuries
Hash of body locations with wound/scar dataStructure:
{ location => { 'wound' => rank, 'scar' => rank } }Locations: ‘head’, ‘neck’, ‘chest’, ‘abdomen’, ‘back’, ‘rightArm’, ‘leftArm’,
‘rightHand’, ‘leftHand’, ‘rightLeg’, ‘leftLeg’, ‘rightFoot’, ‘leftFoot’,
‘rightEye’, ‘leftEye’, ‘nsys’Display mode: 0 = wounds, 1 = scars, 2 = both
Tasks
Current bounty task description
Current society task description
Active Spells & Dialogs
Hash of dialog data from PSM 3.0, including active spells, buffs, debuffs, cooldownsStructure:
{ dialog_name => { spell_name => expiry_time } }Legacy method - returns combined hash of all active spells with expiry times
DragonRealms Specific
Hash of active spells with durations (DR only)
Stellar Collector percentage (DR Moon Mage)
Whether character has slivers active (DR Moon Mage)
Familiar (GemStone)
Familiar’s current room title
Familiar’s room description
Familiar’s available exits
Other Properties
ID of the designated stow container
Current game prompt text
Array of current target IDs
Primary target ID
Whether room window is disabled in current location
