Skip to content

Factions & Groups

Arx has no reputation system, no standing meter and no faction-versus-faction matrix. It has a set of strings attached to each entity and three ways to shout at them. Almost everything social in the game is built from that.

The engine model

Each entity carries groups — a set of strings, so multi-membership is normal. Scripts manipulate it directly:

  • SETGROUP <name> — join
  • SETGROUP -r <name> — leave
  • ISGROUP <name> / !ISGROUP <name> — test membership
  • HaveCommonGroup(a, b) — engine helper testing set intersection

Membership is fully dynamic at runtime. An NPC can change allegiance, or leave a group temporarily, mid-game.

Three broadcast scopes

SENDEVENT is the messaging primitive, and its flags decide reach:

Form Reach
SENDEVENT -g <group> Every member on the level. No distance check, no line of sight, no delay
SENDEVENT -gr <group> <radius> Group members within the radius of the sender
SENDEVENT -gz <group> <zone> Group members standing inside a named zone

That first row is the single most consequential line in Arx's social design — see below.

Who belongs to what

Verified from the base NPC scripts:

Group Members
goblin goblins, with goblin_castle, goblin_earth, goblin_water as sub-allegiances
ratmen ratmen
trolls trolls
UNDEAD zombies, mummies, liches — held in addition to their own friend value
DEMON / demon demons
kingdom / human_kingdom the human polity
akbaa Akbaa's servants
sacred_sword quest-specific
MICECARE not a faction at all — see below

Spiders, golems and rats are friend "NONE". They have no faction, never call for help, and never trigger group aggro. This is a deliberate valve: dungeon fauna have no politics, so the player can kill them freely, while every sapient kill carries social consequence. The bestiary's split into "animal" and "clever" script archetypes maps almost exactly onto factioned versus factionless.

Undead carrying two tags is the neat part: UNDEAD is orthogonal to allegiance, so Repel Undead and the liche's caster-level check key on a property that has nothing to do with who the creature sides with.

What groups actually do

1. Hostility propagation — the ratchet. The first time a clever NPC turns hostile it fires:

SENDEVENT -g §friend PLAYER_ENEMY ""

No -r. The entire faction on the level becomes hostile instantly, wherever they are, whether or not anyone saw anything. A player_enemy_send flag stops it re-broadcasting — and nothing anywhere un-sends it. There is no apology, no bribe, no disguise, no decay timer. Attack one goblin in a corner and every goblin on the level knows, forever.

2. Calling for help — the local layer. CALL_FOR_HELP uses the radius form: 600 units while fighting, 1200 while fleeing, rate-limited to once per four seconds. Responders run to the caller and join in. A fleeing NPC that reaches an ally fires DELATION with a location marker, pulling further reinforcements toward where it ran from.

3. Friendly fire immunity. Area damage skips any NPC sharing a group with the source — but only when neither party is the player. NPC fireballs spare their allies; the player's fireball hits everyone in the blast, and enemy AoE damages the player normally. A deliberate asymmetry: it stops factions comically wiping themselves out while keeping the player's area spells a real decision.

4. Spell targeting. Control Target (tier 10, 40 mana) is hardcoded in C++ to require an NPC in the group demon within 900 units, or it fizzles. The game's ultimate mind-control spell is not general mind control — it commands demons and nothing else. A faction tag is a spell precondition.

5. Loot identity. Goblin death tables branch on friend: castle goblins drop wine and coin, earth goblins drop ribs, water goblins drop fish. The faction tag doubles as a culture tag.

6. A general message bus. MICECARE is not a faction — it is a subscription channel. Goblins that care about mice join it to receive mouse sightings, and unsubscribe while hunting (SETGROUP -r MICECARE) so they aren't distracted, rejoining when done. The same primitive serves factions, event routing, spell targeting and AI subscriptions.

Design reading

Factions here are tags, not relationships. There is no standing scalar, no partial hostility, no faction A hates faction B table. Each NPC has a binary §enemy flag; groups are only the mechanism by which that flag spreads. For a nine-person team this is exactly the right amount of system — it buys the feeling of a populated political world for the cost of a string set.

The global broadcast is the load-bearing decision, and it cuts both ways. It fits the fiction: Arx is one crowded fortress where word travels, and a species that has decided you are an enemy staying decided is more believable than aggro that fades after thirty seconds. But it quietly contradicts the game's own stealth design — you can be perfectly hidden, torch doused, standing in darkness the light system says nobody can see you in, and still be a known enemy to every goblin on the level because of something you did ten minutes ago in another room. Detection is systemic and local; hostility is scripted and global. The two never reconcile.

And it is irreversible. Combined with persistent world state, a single bad swing at a kingdom guard can lock a player out of the quest-givers who share his tag, with no recovery path and no warning that the swing was a faction-wide act. This is the same fragility as the breakable object puzzles, expressed socially.

What a modern version would change: keep the tags and the propagation, add witness-gating (only NPCs who perceived the act, or who later hear about it, flip), and give the ratchet a release — a bribe, a quest, a disguise, or simple time decay. Everything else in this system is still good design.

Touchpoints

  • NPC AI & Behaviour: CALL_FOR_HELP and PLAYER_ENEMY are the only group-level behaviour in a system that otherwise has no coordination
  • Bestiary & Enemy Design: factioned "clever" NPCs versus factionless fauna; UNDEAD as an orthogonal tag
  • Magic & Runes: Control Target requires the demon group; Repel Undead requires UNDEAD
  • Stealth & Light: local systemic detection versus global scripted hostility
  • World & Level Structure: irreversible hostility plus persistent state equals breakable quest chains

What breaks if you remove it

Kill the groups and Arx loses its only social simulation: monsters stop being peoples, reinforcements stop arriving, and the fortress becomes a set of unrelated encounters. It is a remarkable amount of world for a set of strings.