Skip to main content
forge-factions models groups a character can belong to or stand with. Membership (ranks and faction-scoped permissions) and reputation (standing tiers) are separate axes, so a character can be a member of one faction and merely liked or hated by others.

Concepts

  • Faction. A stable faction:<name> with ranks, faction-scoped permissions (faction.*), exclusivity groups, and reputation tiers.
  • Membership vs reputation. Membership is “I belong, at this rank.” Reputation is “this faction regards me at this tier.” Unlocks can be granted by rank or tier (refcounted).
  • Friendly fire. A damage validator that can block hits between allied members.

Exports

Registry & membership

ExportSignature
RegisterFaction / RegisterFactionsregister definitions
GetFaction / GetFactionsquery
Join / LeaveJoin(character_id, faction_id, opts)
Invite / AcceptInvite / DeclineInviteinvite flow (TTL)
Kick / SetRankSetRank(character_id, faction_id, rank)
GetMembership / GetMemberships / GetMembersquery membership
HasFactionPermissionHasFactionPermission(character_id, faction_id, perm)

Reputation, points, relations

ExportSignature
ModifyReputationModifyReputation(character_id, faction_id, delta)
GetReputation / GetTierstanding and its tier
AddPoints / GetLeaderboardfaction points and rankings
GetFactionStandingsall standings for a character
GetRelationfaction-to-faction relation
ValidateDamagethe friendly-fire damage validator (registered with forge-combat)
GetIdentityOptionsfeed faction choices into character creation
local ff = exports["forge-factions"]
ff:Join(cid, "faction:academy", {})
ff:ModifyReputation(cid, "faction:academy", 50)

Events

EventPayload
forge-factions:server:joined / leftmembership changes
forge-factions:server:rankChanged{ character_id, faction_id, rank }
forge-factions:server:reputationChanged{ character_id, faction_id, tier }

Configuration

forge-factions ships no content; factions are creator-defined via Config.Factions or the register exports. An admin bypass requires an explicit opts.admin flag, not an ambient permission.