Skip to main content
The 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
The 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.
society = Society.membership
return
String | nil
The society name (“Order of Voln”, “Council of Light”, “Guardians of Sunfist”), “None”, or nil if not a member.
Example:
case Society.membership
when "Order of Voln"
  echo "You are a member of Voln"
when "Council of Light"
  echo "You are a member of the Council of Light"
when "Guardians of Sunfist"
  echo "You are a member of the Guardians of Sunfist"
else
  echo "You are not in a society"
end

Society.status

Alias for Society.membership. Returns the character’s society membership status.
society = Society.status
return
String | nil
Same as Society.membership.

Society.rank

Retrieve the character’s current rank within their society.
rank = Society.rank
return
Integer
The rank number within the society, or 0 if not a member.
Example:
rank = Society.rank

if rank > 0
  echo "You are rank #{rank} in #{Society.membership}"
else
  echo "You are not in a society"
end

Society.task

Retrieve the current task assigned by the society.
task_message = Society.task
return
String
The current society task description, or a message indicating no task or no membership.
Possible return values:
  • 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)
Example:
task = Society.task

if task =~ /not currently in a society/
  echo "Join a society first"
elsif task =~ /eternal duty/
  echo "You are a Voln Master"
else
  echo "Current task: #{task}"
end

Society.serialize

Bundle the current society status and rank into a simple array structure.
data = Society.serialize
return
Array<String, Integer>
Array in the format [membership, rank].
Example:
membership, rank = Society.serialize
echo "Society: #{membership}, Rank: #{rank}"

Utility Methods

Society.lookup

Lookup an ability definition using a normalized short or long name.
ability = Society.lookup(name, lookups)
name
String
required
The user-facing name (short or long) of the ability to look up.
lookups
Array<Hash>
required
Array of hashes containing at least :short_name and :long_name keys.
return
Hash | nil
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.
value = Society.resolve(value, context)
value
Object | Proc
required
The value to resolve. If it responds to call, it will be invoked.
context
Object
Optional context object passed to lambdas with arity 1.
return
Object
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

The following methods are deprecated and will be removed in a future version. Use the recommended alternatives.

Society.member

Deprecated Use Society.membership instead.
# OLD (deprecated)
member = Society.member

# NEW
member = Society.membership

Society.step

Deprecated Use Society.rank instead.
# OLD (deprecated)
step = Society.step

# NEW
rank = Society.rank

Society.favor

Deprecated Use Society::OrderOfVoln.favor instead.
# OLD (deprecated)
favor = Society.favor

# NEW
favor = Society::OrderOfVoln.favor

Society Subclasses

The Societies namespace provides convenient access to society-specific functionality:

Societies::OrderOfVoln

Access Order of Voln-specific methods and data.
Societies::OrderOfVoln.favor  # Get current Voln favor
Alias: Societies.voln

Societies::CouncilOfLight

Access Council of Light-specific methods and data.
Societies::CouncilOfLight.method_name
Alias: Societies.col

Societies::GuardiansOfSunfist

Access Guardians of Sunfist-specific methods and data.
Societies::GuardiansOfSunfist.method_name
Alias: 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

if Society.membership == "Order of Voln"
  echo "You are a Voln member at rank #{Society.rank}"
  echo "Current task: #{Society.task}"
else
  echo "You are not a member of Voln"
end

Display society status

membership, rank = Society.serialize

if membership && rank > 0
  echo "Society: #{membership}"
  echo "Rank: #{rank}"
  echo "Task: #{Society.task}"
else
  echo "No society membership"
end

Check for society before using abilities

if Society.membership == "Guardians of Sunfist"
  if Society.rank >= 10
    echo "You have access to Kai's Strike"
  else
    echo "You need rank 10 for Kai's Strike (current: #{Society.rank})"
  end
else
  echo "You must be a member of the Guardians of Sunfist"
end

Wait for society task completion

initial_task = Society.task

loop do
  current_task = Society.task
  
  if current_task != initial_task
    echo "Task updated! New task: #{current_task}"
    break
  end
  
  pause 10
end

Society-specific logic

case Society.membership
when "Order of Voln"
  favor = Societies::OrderOfVoln.favor
  echo "Voln favor: #{favor}"
  
when "Council of Light"
  echo "Council of Light rank: #{Society.rank}"
  
when "Guardians of Sunfist"
  echo "Guardians of Sunfist rank: #{Society.rank}"
  
else
  echo "Not in a society"
end

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 Society class 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 like kais_strike

Build docs developers (and LLMs) love