feat(world): guilds in the world: create box, character component, guild commands

The world side of guilds (docs/Guilds.md):

- TMP_GUILD_CREATE, which the client's guild create box sends to its world, goes to the chat server as GUILD_CREATE.
- The character component reads the character's guild from the database when it loads (instead of the old unused "gn"
  and "gid" charxml attributes) and takes GUILD_GET_STATUS from the chat server; a change is serialized once (the
  client redraws the name billboard every time it reads a guild name). A name waiting for moderation isn't shown.
- Slash commands (the client has none for guilds): /g and /guild (guild chat; the client's guild tab sends /g, which
  goes through the chat filter and mute like zone chat, then to the chat server as channel 10), /guildcreate (opens the
  create box with DisplayGuildCreateBox), /gkick, /grank <name> <officer|veteran|recruit>, /gleader and
  /gdisband confirm.
- The Guild Master script (LOT 3001, L_GUILD_CREATE.lua: using it opens the create box). Live never placed it; GMs
  can spawn it.

Check in game (two accounts, a client with a FeatureGating row "guilds", 1, 0, 0 in its cdclient.fdb): /guildcreate,
make a guild (the name shows under yours, the guild button appears on the status bar); invite the second character
from the guild window, accept, both lists show both; guild chat tab; /grank, /gkick, /gleader; leave from the window;
log the second character out and in (guildmate logged off/in lines).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 06:07:19 -05:00
parent d1eec7dacb
commit f6f937955e
12 changed files with 319 additions and 15 deletions

View File

@@ -158,6 +158,7 @@
#include "FvNinjaGuard.h"
#include "FvPassThroughWall.h"
#include "FvBounceOverWall.h"
#include "FvGuildCreate.h"
#include "FvFong.h"
#include "FvMaelstromGeyser.h"
#include "FvRaceDragon.h"
@@ -515,6 +516,7 @@ namespace {
{"scripts\\ai\\FV\\L_FV_FACILITY_PIPES.lua", []() {return new FvFacilityPipes();}},
{"scripts\\02_server\\Map\\FV\\L_IMG_BRICK_CONSOLE_QB.lua", []() {return new ImgBrickConsoleQB();}},
{"scripts\\ai\\FV\\L_ACT_PARADOX_PIPE_FIX.lua", []() {return new ActParadoxPipeFix();}},
{"scripts\\ai\\FV\\L_GUILD_CREATE.lua", []() {return new FvGuildCreate();}},
{"scripts\\ai\\FV\\L_FV_NINJA_GUARDS.lua", []() {return new FvNinjaGuard();}},
{"scripts\\ai\\FV\\L_ACT_PASS_THROUGH_WALL.lua", []() {return new FvPassThroughWall();}},
{"scripts\\ai\\FV\\L_ACT_BOUNCE_OVER_WALL.lua", []() {return new FvBounceOverWall();}},

View File

@@ -7,6 +7,7 @@ set(DSCRIPTS_SOURCES_AI_FV
"FvPandaSpawnerServer.cpp"
"FvPandaServer.cpp"
"FvBrickPuzzleServer.cpp"
"FvGuildCreate.cpp"
"FvConsoleLeftQuickbuild.cpp"
"FvConsoleRightQuickbuild.cpp"
"FvFacilityBrick.cpp"

View File

@@ -0,0 +1,11 @@
#include "FvGuildCreate.h"
#include "Entity.h"
#include "PlayerMessages.h"
void FvGuildCreate::OnUse(Entity* self, Entity* user) {
GameMessages::DisplayGuildCreateBox box;
box.target = user->GetObjectID();
box.bShow = true;
box.Send(user->GetSystemAddress());
}

View File

@@ -0,0 +1,9 @@
#pragma once
#include "CppScripts.h"
// The Guild Master (LOT 3001, scripts\ai\FV\L_GUILD_CREATE.lua): using it opens the guild create box (docs/Guilds.md).
// Live never placed it in a zone.
class FvGuildCreate : public CppScripts::Script {
public:
void OnUse(Entity* self, Entity* user) override;
};