Skip to main content

The Relations System

Every faction has a relation to every other faction and, separately, to the player. This isn't a single global "reputation," but a full matrix of "who feels how about whom," in the spirit of the original Stalker.

Two layers of relations

  1. Base relations between factions (set by the developers as defaults in the game's configuration, for example config/relations.json in pda-assets) — how bandits feel about Duty, military about Monolith, and so on. This is a starting point, not something a story writer changes directly.
  2. A specific faction's personal relation to the player — the thing a story actually works with: it's changed by the +/-/reset actions and affects whether that faction's NPCs will be hostile to the player in combat.

Both matrices are stored in a structurally similar way (one value per each of the eight other factions), but it's the faction-to-player personal relation that a story writer changes.

Classification: enemy / neutral / friend

The game engine translates a numeric relation into one of three categories, which drive NPC combat behavior:

Faction's relation to the playerCategory
below -2Enemy (ENEMY) — attacks on sight
from -2 to 3 (exclusive)Neutral (NEUTRAL) — won't attack first
3 and aboveFriend (FRIEND) — friendly, unlocks extra dialogue/trading options

Relations between NPCs themselves (not the player) use a separate, wider hostility threshold — meaning NPC factions are more tolerant of each other and don't slide into open hostility over small fluctuations in personal scores, unlike their relation specifically to the player.

The exact numeric scale

There are signs that "faction↔player" and "faction↔faction/mob" relations use numbers on different scales (for example, configuration files contain values in the -100 to +100 range for base relations, while the enemy/friend classification for the player relies on single-digit thresholds). Before building exact relation change amounts into a story's balance, check with the pda developers — see Open Questions.

What relations affect

  • Combat hostility — squads from factions that consider the player an enemy will attack on encountering them on the map.
  • Territory capture — see Squads and Territories.
  • Dialogue and content availability — a story can check a relation via a condition with the relation_<id> variable (wherever the scenario calls for it) and show different lines/options depending on whether the faction is friendly or hostile to the player.

Behavior flags for an individual NPC/squad

Beyond the overall relation matrix, a specific squad (see Squads and Territories) can have its behavior overridden individually: made immortal, always hostile to the player regardless of faction relations, or, conversely, ignoring the player. This lets you carve out story-important exceptions to a faction's general policy (for example, "this specific mercenary is the player's personal enemy, even though mercenaries in general are neutral").

Next