Society class provides accessors for a character’s society membership, rank, and task data for the three major societies in Gemstone IV.
Overview
Gemstone IV has three major societies:- Order of Voln - Dedicated to releasing undead from their torment
- Council of Light - Focused on combating dark forces
- Guardians of Sunfist - Warriors dedicated to protecting civilization
Society class provides a unified interface for accessing society information across all three organizations.
Class Methods
Society.membership
Retrieve the character’s current society membership.The society name (“Order of Voln”, “Council of Light”, “Guardians of Sunfist”), “None”, or
nil if not a member.Society.status
Alias forSociety.membership. Returns the character’s society membership status.
Same as
Society.membership.Society.rank
Retrieve the character’s current rank within their society.The rank number within the society, or
0 if not a member.Society.task
Retrieve the current task assigned by the society.The current society task description, or a message indicating no task or no membership.
- A specific task description (e.g., “Slay 10 lesser undead in the church”)
- “You are not currently in a society.”
- “It is your eternal duty to release undead creatures from their suffering in the name of the Great Spirit Voln.” (for Voln masters)
Society.serialize
Bundle the current society status and rank into a simple array structure.Array in the format
[membership, rank].Utility Methods
Society.lookup
Lookup an ability definition using a normalized short or long name.The user-facing name (short or long) of the ability to look up.
Array of hashes containing at least
:short_name and :long_name keys.The matching entry from the lookups array, or
nil if not found.This is a helper method used internally by society subclasses. Most scripts won’t need to call it directly.
Society.resolve
Resolve a value that may be a static literal or a lambda/proc.The value to resolve. If it responds to
call, it will be invoked.Optional context object passed to lambdas with arity 1.
The resolved value, or the original value if not callable.
This allows society metadata fields such as
:duration or :summary to be defined as either static values or dynamically evaluated lambdas.Deprecated Methods
Society.member
Deprecated UseSociety.membership instead.
Society.step
Deprecated UseSociety.rank instead.
Society.favor
Deprecated UseSociety::OrderOfVoln.favor instead.
Society Subclasses
TheSocieties namespace provides convenient access to society-specific functionality:
Societies::OrderOfVoln
Access Order of Voln-specific methods and data.Societies.voln
Societies::CouncilOfLight
Access Council of Light-specific methods and data.Societies.col
Societies::GuardiansOfSunfist
Access Guardians of Sunfist-specific methods and data.Societies.sunfist
Each society subclass provides specific methods for abilities, symbols, and mechanics unique to that society. See the individual society documentation for details.
Usage Examples
Check society membership
Display society status
Check for society before using abilities
Wait for society task completion
Society-specific logic
Data Source
Society data is retrieved from Infomon and XMLData, which parse game output to maintain current character state information.
Notes
- Society membership is tracked per character
- Rank starts at 0 for non-members and increases with society progression
- Task messages are updated by the game and reflect current society objectives
- The
Societyclass provides a base interface; specific society abilities are accessed through subclasses - Name normalization (via
Lich::Util.normalize_name) converts names like “Kai’s Strike” to valid Ruby method names likekais_strike
