Guilds
A player guild is a group of players under a name, held by a guildstone: the stone is placed by a guildstone deed, its founder leads it, and the members work it through the gump the stone opens. The classic guilds of the later eras are the model: no Order or Chaos, and the leadership belongs to the member the fealty of the roster points to.
Founding a guild
Section titled “Founding a guild”- A player that is in no guild double clicks a guildstone deed (
guildstonedeed, the converted deed with theguildstone_deedscript), from its backpack or from within two tiles of it on the ground, and is asked “What is your guild called?” (30275). A player that is already in one reads “You are already in a guild.” (30276). - The name is at most 32 characters; one with no letter to make an abbreviation of is refused with “That name says nothing a guild can be called by.” (30277). A name another guild has, or one whose initials — the first letter of each word, upper case, at most six — another guild has as its abbreviation, is refused with “Another guild has that name, or those initials.” (30278).
- The player picks the ground: a guildstone (
guildstone, 0x0EDC, immovable) is placed there, the deed is spent, and “The guildstone is placed: your guild is born.” (30279) is read. The spot must be within three tiles of the player, on its storey, standable and free; one that is not reads the client’s too-far message or “A guildstone cannot be placed there.” (30293). ESC, or a click on an item or a mobile, leaves the deed as it was. Walking away from the deed, or dying, cancels the target with the too-far message. The guild is made only after the stone is placed, so a name that is refused (the checks of step 2 are made then) leaves no stone and no guild, and the deed is kept. - The stone holds the guild by its
guildprop and by the time it was founded (guild_founded), so a stone opens the guild it was placed for and never one that later took the same id. The founder is the first member, backs itself, and so leads.
The guild gump
Section titled “The guild gump”A member that double clicks the stone of its guild, from within two tiles, opens the
guild_menu gump (templates/gumps/guild_menu.xml, filled by
scripts/gumps/guild_menu.lua); a stranger reads “You are no member of this guild.”
(30281), and a stone whose guild was dissolved — its last member left — reads “This
guildstone belongs to no guild.” (30280).
The gump shows the name with the abbreviation, the charter, the website and the roster,
paged: the leader first and marked “leader”, each member by name (a member who is out of the
world is named too, with “(offline)”). The title and the fealty of a member are not shown;
scripts read them with guild.roster and guild.member. Every click makes the whole gump
again, and the membership, the leadership, the distance to the stone (two tiles) and that the
player is alive are checked each time: the gump closes when the member left or the guild
dissolved, or the player walked away from the stone or died. A prompt that is cancelled with
ESC changes nothing.
- A click on a member gives it the clicker’s fealty.
- The leader writes the charter (30282) and the website (30283), picks the hue of the guild’s speech on the stone itself, gives a member a title (30284) and ejects one (“Done.” 30285); the leader itself can be ejected by nobody.
- Resign leaves the guild (“You have left your guild.” 30274), if the player still is a member of the guild of the gump; Exit only closes the gump.
- When another guild’s stone stands within five tiles, the leader sees the other guild’s name with a Declare war / Make peace and an Alliance / Break alliance button each.
Saying “i resign from my guild” leaves the guild as the button does.
Leadership by fealty
Section titled “Leadership by fealty”Every member backs one member of the guild. A member taken in by guild.recruit backs the
leader; the founder backs itself. Recruiting is available to scripts only: no shipped script
calls it, so there is no way yet to join a guild in game. The leader is the member the most members back; on a tie, the member that
joined first leads. A member may not back itself or a stranger. When a member leaves, the
ones that backed it back the leader again; the last member out dissolves the guild, its
relations gone with it, the ones other guilds declared on it too. A character that a player
deletes (it is only marked, and staff can restore it) leaves its guild at once and is not
put back by the restore.
Wars and alliances
Section titled “Wars and alliances”A war or an alliance is of two guilds and lives only when both have declared it: the leader of one declares on the other’s stone (“The war on {0} is declared; it begins when they declare it back.” 30287), and it begins when the other declares back (“You are at war with {0}.” 30288). Either side’s peace ends the whole war at once (“The war on {0} is over.” 30289); a one-sided offer is its declarer’s to take back, which the same peace does. An alliance is the same, one offer (30290), both make it live (30291), either breaks it (30292).
Attacking a member of a guild at war is no crime: the combat service reads the guilds’ word
before it calls one. The notoriety a player sees is the guilds’ word first: a
guildmate or an ally is green (Ally), a member of a guild at war is orange (Enemy), and
the rest is what it would be without guilds.
The guild’s speech
Section titled “The guild’s speech”What a member says is broadcast with its abbreviation before it, [ABC] a fine day, in the
hue of the guild — 1152 by default, the leader picks another on the stone. What the NPC
listeners and the scripts hear is the plain text: only the players see the prefix and the
hue.
The guild module
Section titled “The guild module”Scripts work the guilds with the guild module: guild.of(player) and
guild.get(id) give the guild as { id, name, abbreviation, charter, website, hue, founded_at },
guild.member(player) the membership as { title, fealty, joined_at }, guild.leader(id)
the member the fealty points to, guild.roster(id) the members leader first, and
guild.wars(id) / guild.allies(id) the guilds at war and allied,
guild.declared_war(id, other) / guild.declared_alliance(id, other) the guild’s own word,
offered or live. guild.create(player, name) founds one (the serial of the guild, or "bad_name",
"duplicate" or "already_member"), guild.recruit(id, player) takes a member in, guild.resign(player) and guild.eject(id, player) take one out,
guild.set_title, guild.set_charter, guild.set_website, guild.set_hue and
guild.set_fealty work the member and the guild, and guild.declare_war, guild.make_peace,
guild.declare_alliance and guild.break_alliance the relations. guild.is_member(player, id) asks who belongs. The whole list is in the Lua API reference and
in scripts/definitions.lua.
Guild and alliance chat
Section titled “Guild and alliance chat”A member talks to the whole guild, or to the guild and its allies, with the chat keys of the client: it sends the line as
speech of the type guild (0x0D) or alliance (0x0E), and the server hands it to every online member, in the same type so
that the client draws it in its own style. Only the members hear it: no NPC, item, guard or script does, and the line is
not published as player_say.
- The guild chat reaches the online members of the speaker’s guild, the speaker included. The alliance chat reaches those of the speaker’s guild and of the guilds allied to it, not the allies of those, and not a guild at war, even if its leaders also declared an alliance.
- A line is trimmed and cleaned of control characters; an empty one, or one over 128 characters, is dropped.
- A player in no guild reads “You are not in a guild.” (30325), a guild with no allies “Your guild has no allies.” (30326) on the alliance chat, and a prisoner of the jail cannot use either (30327). A dead player can.
- The chat button of the client (
0xB5) is answered with a line that names the chats that work (30328): the legacy chat window, with its channels, moderators and voice, is not built.
What is not built
Section titled “What is not built”The Order and Chaos war of the classic guilds is not built, nor is the guildstone as a teleporter to the guild’s halls, and an alliance is of two guilds only: three allied guilds are three alliances, one for each pair.
Made with ❤️ by Tom
