Guildcraft adds guilds, factions and reputation to a multiplayer game, in one plugin that needs no other plugin from the store (it turns on the engine's own State Tree, Gameplay State Tree and Gameplay Abilities plugins, which cost nothing until you use them).
Guilds with roles from a table and roles a guild makes itself, invites, join requests, levels, chat, alliances and wars
A vault counted by tag that keeps each item's own data (durability, mods), with a daily limit per role and a log
Factions the AI reads through AI Perception, with Behavior Tree and State Tree nodes, both running in the demo
Reputation with stages, quest gates, perks and relations, per player or shared by the guild
Chests, doors and bases a guild owns or captures, with access rules
Gameplay Ability System effects by stage and guild level
Server authoritative, saved with backups, 46 automated tests, measured on listen and dedicated servers
Reputation
Factions and characters live in a Data Table. Each has stages (Hostile to Honored, or your own), stages that wait for a quest before they open, perks per stage, and relations: helping the village can cost you with the bandits. Values can belong to one player or be shared by the whole guild, and walk back toward their base over time.
Factions and AI
NPCs and players belong to a faction, and an actor can count as more than one (a spy, a mercenary). Factions like or hate each other in a table, and wars and truces change it while the game runs. The included AI controller hands that to AI Perception: a player who falls to a hostile stage gets attacked, one who makes peace is left alone. Hit a guard and he remembers you for 30 seconds, and so do the guards around him. One Blueprint class holds the project's own attitude rule (monsters hostile at night, a truce in town). Behavior Tree nodes (an attitude decorator that aborts when the attitude changes, a find-target service, an apply-action task) and the same three for State Tree come with it, and the demo runs on them: the bandit guard has a Behavior Tree and the village guard a State Tree, ready to open and copy. A Gameplay Debugger category shows an NPC's faction, how it sees you next to what the tables alone say, your standing and who it remembers attacking it.
Guilds
Found, join, invite, request to join a private guild, leave, disband. Roles and permissions come from a table, and each guild's leader renames a role, caps what it takes from the vault in a day and adds up to 4 roles of the guild's own, right on the guild screen (Edit Guild Role in Blueprint also changes what it can do). Guild chat with saved history, a cooldown, a mute rule and a filter hook for bad words. Invite players who are offline: the invite waits for their next login. Guilds level up by experience with perks per level, make alliances and declare wars, carry an emblem and keep an activity log.
The vault counts items by tag (gold included) and keeps each item's own data, up to 256 characters: a sword at 72% durability with a fire mod goes in and comes out as that sword. Your inventory decides what the data is.
A Gameplay Ability System module turns reputation stages and guild levels into Gameplay Effects (one effect can climb a level per stage, and carry the reputation value by Set By Caller), and Gameplay Events into reputation actions, for games built on GAS.
Chests, doors and bases can belong to a guild, or to one player with a list of friends allowed in: claim them, release them, or take another guild's by holding it: a crowd takes it faster, allies join either side, more defenders push the capture back, and your Blueprint decides who counts. Who owns what is saved with the guild (a base your game spawns needs a save key you give it). One node says who may use them. Access rules combine guild, role, guild level and several reputations, with an "or" between rules.
Hooks for your own rules
Every request asks your rule last and passes what the player typed, who they target and how much. That is where a founding cost, a banned word or a minimum level to invite goes. On Member Joined, On Member Left and On Guild Request Succeeded tell your game what happened, with the item and count of each vault move. Admin nodes work with no player in between: a quest reward into the vault, a tax out, a guild disbanded for being quiet too long.
Network and save
The server decides everything. Text from clients is cut, requests are rate limited, and requests other players see wait 2 seconds.
Each guild travels on its own actor that sleeps until the guild changes, so a quiet guild costs almost nothing. Measured: a server with 1000 guilds hits no engine size limit, and a client that joins late receives them one by one in the background while it plays (23 to 32 s for all 1000 over 150 ms and 5% loss).
A guild's members, vault and logs go to its members only. Measured: a guild of 500 players online costs the server under 1 ms per change.
One save file per guild and per player, each with a spare copy and a checksum. A file that does not read is kept aside, never written over, and a lost guild list is rebuilt from the guild files.
Tested with 4 clients at 150 ms and 5% packet loss on a listen server and a dedicated server, including a restart from the save. 46 automated tests ship inside the plugin, in an editor module, including both demo trees running on a guard.
Measured: 300 guards on the demo's Behavior Tree around a hostile player cost the server 3.4 ms a frame together, and 1000 guards spread over 300 m cost 3.5 ms. Find Target looks at a 20 m grid, never at every actor of the world.
The server numbers were measured on the server with simulated players; the plugin has not run with hundreds of real players.
Blueprint
Every node, event and setting is listed in the online reference. Components you add to your own actors (four for the core: reputation, guild member, guild manager, faction; ownership and the GAS bridge when you want them), no class to inherit. The one exception is AI Perception: the engine only lets a controller answer friend or foe, so your AI controller either has GDCAIController as its parent or overrides one function in C++ with one line, shown in the documentation; Behavior Tree and State Tree nodes work with any controller. 15 Widget Blueprints with the logic in C++, shipped in 3 looks (Ember, Slate, Signal) to start from. The demo has a guild manager Blueprint with a rule of its own (no kicks during a raid) to show where your rules go.
Demo
A Shipping build of the demo room: walk up to the pads, help or attack the village, swear the oath, found a guild, invite a friend and go to war. The guards' rings turn red or green as your standing changes, and a guard you turn hostile comes after you and hits you, through Apply Damage, so the one he hits remembers him and calls its allies. The demo's classes are a DeveloperTool module: your Shipping game leaves them out with no change to the plugin.
Not included
Parties, matchmaking and guilds shared across several servers are not part of Guildcraft (one server keeps its guilds; Save Guild To Bytes hands each guild to your own backend). The vault counts items by tag and leaves the inventory to your game; the documentation shows how to connect the two.
Documentation: https://apps.tessaroapps.com/guildcraft/docs/
Support: contato@tessaroapps.com, answered within 24 hours on business days.