Skip to main content
Lich 5 provides extensive support for Gemstone IV (GS4), including game-specific modules for character data tracking, society management, combat systems, and more. All Gemstone-specific functionality is namespaced under Lich::Gemstone.

Overview

The Gemstone IV implementation includes:
  • Character Data Tracking: Experience, wounds, scars, injuries, and vital statistics
  • Society Systems: Order of Voln, Council of Light, Guardians of Sunfist
  • Spell Management: Spell ranks, effects tracking, active buffs/debuffs
  • Combat Systems: Creature tracking, bounty management, group coordination
  • Game Features: Disk management, currency tracking, status effects

Core Modules

Infomon

The Infomon system provides persistent character data storage using SQLite.
# Get character information
Infomon.get("society.status")           # Current society
Infomon.get("society.rank")             # Society rank
Infomon.get("experience.fame")          # Fame points
Infomon.get("experience.field_experience_current")  # Current field experience

# Boolean values
Infomon.get_bool("some.flag")           # Returns true/false

# Check data freshness
timestamp = Infomon.get_updated_at("experience.total_experience")
Infomon automatically tracks timestamps for all data updates, allowing you to check if information is stale.

Experience Tracking

Track all forms of experience in Gemstone IV.
Experience Module
# Access experience data
Lich::Gemstone::Experience.exp          # Current experience
Lich::Gemstone::Experience.txp          # Total experience
Lich::Gemstone::Experience.axp          # Ascension experience
Lich::Gemstone::Experience.fame         # Fame

# Field experience
Lich::Gemstone::Experience.fxp_current  # Current field experience
Lich::Gemstone::Experience.fxp_max      # Maximum field experience
Lich::Gemstone::Experience.percent_fxp  # Field experience percentage

# Long-term experience
Lich::Gemstone::Experience.lte          # Long-term experience

# Death tracking
Lich::Gemstone::Experience.deeds        # Available deeds
Lich::Gemstone::Experience.deaths_sting # Death's sting status

# Data freshness
Lich::Gemstone::Experience.updated_at   # Last update timestamp
Lich::Gemstone::Experience.stale?(threshold: 24.hours)
Lich::Gemstone::Experience.recently_updated?(threshold: 5.minutes)

Spell Ranks

Access trained spell ranks across all spell circles.
Spell Ranks
# Get spell ranks for a character
ranks = Lich::Gemstone::SpellRanks[Char.name]

if ranks
  puts ranks.minorspiritual    # Minor Spirit ranks
  puts ranks.majorspiritual    # Major Spirit ranks
  puts ranks.cleric            # Cleric ranks
  puts ranks.minorelemental    # Minor Elemental ranks
  puts ranks.majorelemental    # Major Elemental ranks
  puts ranks.minormental       # Minor Mental ranks
  puts ranks.ranger            # Ranger ranks
  puts ranks.sorcerer          # Sorcerer ranks
  puts ranks.wizard            # Wizard ranks
  puts ranks.bard              # Bard ranks
  puts ranks.empath            # Empath ranks
  puts ranks.paladin           # Paladin ranks
  puts ranks.monk              # Monk ranks
  puts ranks.arcanesymbols     # Arcane Symbols ranks
  puts ranks.magicitemuse      # Magic Item Use ranks
end

# List all stored rank data
Lich::Gemstone::SpellRanks.list

Effects Tracking

Monitor active spells, buffs, debuffs, and cooldowns.
Effects System
# Check for active effects
Lich::Gemstone::Effects::Spells.active?(401)      # Is spell 401 active?
Lich::Gemstone::Effects::Buffs.active?("Heroism") # Is buff active?
Lich::Gemstone::Effects::Debuffs.active?("Stun") # Is debuff active?
Lich::Gemstone::Effects::Cooldowns.active?("Symbol of Courage")

# Get time remaining (in minutes)
Lich::Gemstone::Effects::Spells.time_left(509)
Lich::Gemstone::Effects::Buffs.time_left("Spirit Shield")

# Get expiration timestamp
expiry = Lich::Gemstone::Effects::Spells.expiration(1701)

# Display all effects
Lich::Gemstone::Effects.display
The Effects system automatically tracks spell expirations and provides formatted output for viewing all active effects.

Society Systems

Comprehensive support for Gemstone IV societies.

Basic Society Information

Society Status
# Get current society membership
society = Lich::Gemstone::Society.membership
# Returns: "Order of Voln", "Council of Light", "Guardians of Sunfist", or nil

# Get society rank
rank = Lich::Gemstone::Society.rank  # Returns integer rank

# Get current task
task = Lich::Gemstone::Society.task

# Serialize society data
data = Lich::Gemstone::Society.serialize  # [status, rank]

Order of Voln

Voln Symbols
# Access Voln-specific features
Lich::Gemstone::Societies::OrderOfVoln.favor  # Current favor

# Access symbols (example methods)
Lich::Gemstone::Societies.voln.symbol_of_courage
Lich::Gemstone::Societies.voln.symbol_of_protection
Lich::Gemstone::Societies.voln.symbol_of_blessing

Council of Light

Council of Light
# Access CoL-specific features
Lich::Gemstone::Societies.col

Guardians of Sunfist

Sunfist
# Access Sunfist-specific features
Lich::Gemstone::Societies.sunfist

Wounds and Injuries

Track character wounds and injuries by body part.
# Individual body parts
Lich::Gemstone::Wounds.head      # Head wound level
Lich::Gemstone::Wounds.chest     # Chest wound level
Lich::Gemstone::Wounds.abdomen   # Abdomen wound level
Lich::Gemstone::Wounds.back      # Back wound level
Lich::Gemstone::Wounds.neck      # Neck wound level

# Eyes
Lich::Gemstone::Wounds.leftEye   # or .leye
Lich::Gemstone::Wounds.rightEye  # or .reye

# Arms and hands
Lich::Gemstone::Wounds.leftArm   # or .larm, .left_arm
Lich::Gemstone::Wounds.rightArm  # or .rarm, .right_arm
Lich::Gemstone::Wounds.leftHand  # or .lhand, .left_hand
Lich::Gemstone::Wounds.rightHand # or .rhand, .right_hand

# Legs and feet
Lich::Gemstone::Wounds.leftLeg   # or .lleg, .left_leg
Lich::Gemstone::Wounds.rightLeg  # or .rleg, .right_leg
Lich::Gemstone::Wounds.leftFoot  # or .lfoot, .left_foot
Lich::Gemstone::Wounds.rightFoot # or .rfoot, .right_foot

# Nervous system
Lich::Gemstone::Wounds.nsys      # or .nerves

Bounty System

Manage bounty tasks and track progress.
Bounty Tracking
# Get current bounty
bounty = Lich::Gemstone::Bounty.current

# Access bounty details
bounty.type          # Task type
bounty.status        # Current status
bounty.town          # Assigned town
bounty.requirements  # Task requirements

# Check bounty state
bounty.any?          # Has any bounty?
bounty.none?         # No bounty?
bounty.done?         # Bounty complete?

# Get bounty from LNet
Lich::Gemstone::Bounty.lnet("CharacterName")

Creature Tracking

Advanced creature tracking with template data.
# Register a creature (auto-registration enabled by default)
creature = Lich::Gemstone::Creature.register("orc raider", 12345, "orc")

# Look up by ID
creature = Lich::Gemstone::Creature[12345]

# Track damage
creature.add_damage(50)
creature.current_hp      # Remaining HP
creature.hp_percent      # HP percentage
creature.low_hp?(25)     # Below 25% HP?

# Track status
creature.add_status("stunned")
creature.has_status?("stunned")
creature.statuses        # All current statuses

# Track injuries
creature.add_injury(:head, 2)
creature.injured?(:head, 1)
creature.injured_locations
The Creature system has a maximum registry size (default 1000 instances) and automatically cleans up old entries when full.

Group Management

Manage group membership and coordination.
Group System
# Check group status
Lich::Gemstone::Group.leader?         # Am I the leader?
Lich::Gemstone::Group.open?           # Is group open?
Lich::Gemstone::Group.closed?         # Is group closed?

# Get members
members = Lich::Gemstone::Group.members  # Array of GameObj
ids = Lich::Gemstone::Group.ids          # Array of IDs
nouns = Lich::Gemstone::Group.nouns      # Array of names

# Manage group
Lich::Gemstone::Group.add("PlayerName")
Lich::Gemstone::Group.check              # Refresh group data
Lich::Gemstone::Group.broken?            # Is group state inconsistent?

# Get group disks
disks = Lich::Gemstone::Group.disks      # Array of Disk objects

Disk Management

Work with character disks and disk-like containers.
Disk Operations
# Find your disk
my_disk = Lich::Gemstone::Disk.mine

# Find by name
disk = Lich::Gemstone::Disk.find_by_name("Adventurer")

# Get all disks in room
all_disks = Lich::Gemstone::Disk.all

# Work with disk
if disk
  disk.id     # Disk ID
  disk.name   # Owner name
  
  # Convert to container for manipulation
  container = disk.to_container
end

Currency Tracking

Currency
# Access currency data from Infomon
silvers = Infomon.get("currency.silver")

Character Status Helpers

Additional modules for character state:
  • Lich::Gemstone::Scars: Track character scars
  • Lich::Gemstone::Injured: Injury state management
  • Lich::Gemstone::Gift: Gift of Lumnis tracking
  • Lich::Gemstone::Overwatch: Security tracking
  • Lich::Gemstone::PSMs: Post-spell meditation tracking
  • Lich::Gemstone::Armaments: Equipment tracking
  • Lich::Gemstone::Claim: Looting claim system
  • Lich::Gemstone::SK: Spell knowledge tracking
  • Lich::Gemstone::Critranks: Critical rank tracking
  • Lich::Gemstone::Stowlist: Stow list management
  • Lich::Gemstone::Readylist: Ready list management

Best Practices

1

Initialize Infomon

Allow Infomon to fully initialize after login before accessing character data.
2

Check Data Freshness

Use Infomon.get_updated_at() to verify data isn’t stale before making decisions.
3

Use Appropriate Modules

Access data through the specific module (Experience, Society, etc.) rather than raw Infomon when possible.
4

Handle Nil Values

Always check for nil when accessing character data that may not be loaded yet.

See Also

XMLData API

Core character data APIs

Spell API

Spell management and tracking

GameObj API

Working with game objects

Spell Ranks

Gemstone IV spell ranks tracking

Build docs developers (and LLMs) love