Wiki/Home.md is the suite's front door; every layer's wiki now mirrors here under Wiki/<layer>/ (core, contraband, justice, gangs, ward), so the whole suite reads in one place with the index linking to the local pages. The layer repos stay canonical -- Tools/sync-wiki.sh refreshes the aggregated copy on demand. The README's main page points to it.
6.3 KiB
Rivalry and fights
Two gangs, one grudge. A gang fight is a crime — booked, attributed, and fed back into the colony's climate of order.
Gangs do not just supply themselves; they collide. Where the network is about who shares, rivalry is about who is opposed — and, crucially, about turning gang violence into something the rest of the suite can see and police.
Who is a rival
AreRivals(a, b):
ga = GangOf(a); gb = GangOf(b)
return ga != 0 && gb != 0 && ga != gb
The definition is exactly as blunt as it reads: two pawns in two different gangs are rivals. Both must actually be in a gang (a non-zero id), and the ids must differ. From the source:
Two pawns of DIFFERENT gangs are rivals — inside the wire or out on the street.
Note what is not required. There is no separate "hostility" flag, no rival-declaration event, no threshold to cross. The moment two crews exist, their members are rivals of one another. Rivalry is a structural fact about the membership map, not a mood or a relationship value.
Two consequences fall straight out of that:
- Non-members are nobody's rival. A pawn with gang id
0— everyone in a healthy colony — is never a rival to anyone, becauseAreRivalsrequires both ids non-zero. No gangs, no rivalry. - Same gang, never rivals. Members of one crew fail the
ga != gbtest. Within a gang there is no rivalry to book; there is the network (see Networks and Smuggling).
Where do two different gangs come from in the first place? From the affiliations pawns already have — rival factions and rival ideoligions form into separate crews. That is the subject of Affiliations and Segregation; the short version is that gangs mesh with the colony's existing social fault lines, so rival factions run as rival gangs.
A fight is a crime
The payoff of tracking rivalry is RecordFight. When a rival-gang attack happens, it is not treated as
generic brawling — it is booked as a crime through the same Justice pipeline as any other offence.
RecordFight(attacker, victim):
if attacker == null || victim == null: return
if !AreRivals(attacker, victim): return -- only rival-gang violence counts
Justice.RecordCrime(attacker)
So the guard is precise: the two pawns must be rivals (different gangs) for anything to be recorded.
A scuffle between gangmates, or between two non-members, is not a gang fight and is not booked here.
When it is rival-gang violence, the whole event routes through one call — Justice.RecordCrime,
against the attacker — and that single call does three things at once (it lives in Institution:
Justice, but this is what Gangs is leaning on):
Effect of Justice.RecordCrime(attacker) |
Owner |
|---|---|
crimesCommitted on the attacker's record goes up |
Core's CriminalRecord |
lastCrimeTick is stamped to now |
Core's CriminalRecord |
| the colony's deterrence nudges down (a crime happened; order slipped) | Justice's MapComponent_Deterrence |
The mod's integration test confirms the loop end to end: it builds two rival gangs, records a fight,
and asserts both that the attacker and victim are rivals and that the attacker's crimesCommitted
went up as a result.
Inside the wire and out on the street are the same offence
This is the design point the source is emphatic about:
A gang fight is a CRIME — it goes on the attacker's record and moves the colony's climate through the same Justice loop as any other, so it can be investigated, attributed and policed. Rival-gang violence inside a prison and out on the street are the same offence.
There is no separate code path for a prison-yard shanking versus a colonists' brawl in the dining
room. RecordFight reads only AreRivals and calls Justice.RecordCrime. A free colonist who is a
gang member attacking a rival is booked identically to a prisoner doing the same in a cell block. The
gang system does not care which side of the wall the violence is on — only that it was between rivals.
This is what makes gang violence legible to the rest of the suite. A fight is not a one-off flavour event that scrolls past in the log; it is a record entry with an attributed perpetrator and a timestamp, which means it can be investigated, blamed on a specific pawn, and answered.
How it feeds deterrence — and back into joining
Here is the loop that closes the whole suite:
- A rival-gang fight fires
RecordFight→Justice.RecordCrime(attacker). - That nudges the colony's deterrence down. Order has visibly slipped.
- Lower deterrence raises the nurture multiplier for every disposed pawn on the map
(deterrence scales nurture via
×Lerp(1.3, 0.7, deterrence)— less deterrence, bigger multiplier). - Higher nurture pushes more pawns over the
Nature × Nurture ≥ 0.9join bar (see Joining). - More members → more rivals → more fights available to be booked.
Left unanswered, gang violence is self-reinforcing: each booked fight makes the next one likelier. The
brake is the other half of Justice — punishment raises deterrence back up (RecordPunishment
nudges it up), which lowers nurture, which drops borderline pawns back under the bar. The integration
test checks exactly this seesaw: a punishment raises the deterrence level, and a subsequent crime
lowers it again.
How to play it
- Respond to booked fights. A gang fight is real feedback that deterrence has slipped. Punishing the attributed attacker is not just retribution — it is the mechanical lever that pulls deterrence back up and cools the whole map's propensity.
- Don't manufacture two gangs where there was one. Rivalry needs two different crews. Housing pawns of hostile factions or clashing ideoligions together is what creates the second gang and the fights between them — see the next page.
- Read the record, not the moment. Because every fight is attributed to a perpetrator, a thick record of gang violence points you at who to segregate, discipline, or parole — the same tools the rest of the suite already gives you.
Part of the Institution suite — Core · Contraband · Justice · Gangs (this). Each mod stands alone; together they are one system. AI disclosure: developed with substantial assistance from Claude (Anthropic).