Wiki: player-facing rewrite of every layer + add a scenario FAQ, linked from Home

This commit is contained in:
flan
2026-07-16 02:18:25 +00:00
parent ff703271ba
commit 8250dcb369
32 changed files with 1654 additions and 2510 deletions
+60 -80
View File
@@ -9,82 +9,69 @@ it. It is slow, it is quiet, and it works for pawns who would never join a mood-
## The crude pick
The dig needs a tool. `CB_DiggingTool` is a crude pick, filed off the cell's own furniture exactly
the way a shiv is (`AcquireWorker_Improvise` — same disposition gate, same damage-to-furniture
tell; see [Improvised Weapons](Improvised-Weapons.md)). Where the shiv is a weapon, this is a *way
out*: it carries no combat stats and is never equipped.
The dig needs a tool. The crude pick is filed off the cell's own furniture exactly the way a shiv is —
same disposition gate, same damage-to-furniture tell; see
[Improvised Weapons](Improvised-Weapons.md). Where the shiv is a weapon, this is a *way out*: it
carries no combat stats and is never equipped.
| Stat | Value |
|---|---|
| Description | *"Useless as a weapon and useless above ground — but pointed downward, patiently, it is a way out that no lock and no guard can see."* |
| Max HP | 60 |
| Mass | 1.2 kg |
| `concealability` | **0.5** |
| `hideIn` | `InCell` only (too bulky to ride on a body) |
| `acquireWorker` | `AcquireWorker_Improvise` |
| `escapeWorker` | `EscapeTunnelWorker` |
| Deterioration | 2.0 |
| Concealability | **0.5** |
| Hides | in cell only (too bulky to ride on a body) |
| Deteriorates | yes |
Because it hides `InCell` only, a warden turning over the *room* can find the pick itself — and, far
more easily, the hole it is digging.
Because it can only hide in the cell, a warden turning over the *room* can find the pick itself — and,
far more easily, the hole it is digging.
## A second secret riding on the first
A tunnel is *"the third thing a contraband item can be, after 'made' and 'used in a break': a thing
you dig your way OUT with, quietly, over days."* It is deliberately **not a Job**. There is no
supervised task a warden could walk in on and interrupt — only a secret that grows and a wall that
eventually gives. Progress is driven from `MapComponent_Contraband`'s poll (`TickTunnels`), the same
250-tick heartbeat that makes contraband, so *the same search that finds a shiv can find the tunnel*.
you dig your way OUT with, quietly, over days."* It is deliberately **not a job** you can catch a pawn
performing. There is no supervised task a warden could walk in on and interrupt — only a secret that
grows and a wall that eventually gives. The dig advances on the same 250-tick heartbeat that makes
contraband, so *the same search that finds a shiv can find the tunnel*.
The pick must first be **made** (or smuggled). Only once it is finished (`Ready`) does the dig begin,
as a second, longer secret carried on the same `ConcealedItem` (`escapeProgress`, `escapeWall`).
The pick must first be **made** (or smuggled). Only once it is finished does the dig begin, as a
second, longer secret carried on the same hidden pick.
## Who digs
`EscapeTunnelWorker.WouldDig` gates on three things:
Digging gates on three things:
1. **Humanlike and held** — prisoner, slave, or ward patient (`IsHeld`, via Core's secured context).
2. **The disposition to dig for weeks:**
```
Propensity.Would(holder, 0.08, SaltTunnel)
```
Base chance **0.08** — deliberately below the shiv's 0.10. *"Fewer pawns will dig for weeks than
will palm a shiv."* Seeded per pawn, so it is a fixed fact about them.
1. **A person, and held** — prisoner, slave, or ward patient.
2. **The disposition to dig for weeks:** a base chance of **0.08** — deliberately below the shiv's
0.10. *"Fewer pawns will dig for weeks than will palm a shiv."* It is a fixed fact about the pawn.
3. **A viable plan exists** — there has to be somewhere to surface (see below).
This is the entire reason tunnels live in Contraband and not in a prisoner-only escape mod:
> It works for prisoners **and ward patients** alike. Prisoner Realism's escapes are for "mood
> prisoners" mid-break bashing a door, and a committed ward patient is never that pawn. A patient
> with a filed-down pick and the disposition to use it can still, slowly, dig out — and nothing else
> in the ecosystem lets them.
> prisoners" mid-break bashing a door, and a committed ward patient is never that pawn. A patient with
> a filed-down pick and the disposition to use it can still, slowly, dig out — and nothing else in the
> ecosystem lets them.
## Planning the dig: aim for the wilderness
The target is **not** the cell wall. *"You do not go through the wall, you go under it."* `TryPlan`
finds the **nearest wilderness** — the first standable cell, scanning radially outward from the
holder up to **60 tiles** (`MaxSearchRadius`), whose room *touches the map edge* and is not the room
they are held in.
The target is **not** the cell wall. *"You do not go through the wall, you go under it."* The pawn
aims for the **nearest wilderness** — the first standable spot, scanning outward up to **60 tiles**,
that opens onto the map edge and is not the room they are held in.
Two consequences fall straight out of that:
- **Depth is your defence, and a single wall is not.** A tunnel from a deep bunker is a long dig; a
tunnel from a shack against the map edge is a short one. Wrapping one more wall around a cell does
almost nothing — the dig already ignores intervening walls entirely.
- **A fully enclosed, map-locked base with no reachable edge has nowhere to surface.** `TryPlan`
fails, `ProgressPerCheck` returns 0, and the tunnel **stalls** — progress is kept, not lost. Seal
the map and the shaft simply waits.
- **A fully enclosed, map-locked base with no reachable edge has nowhere to surface.** The plan fails,
no progress is made, and the tunnel **stalls** — progress is kept, not lost. Seal the map and the
shaft simply waits.
### How long
Dig time scales with how deep the cell sits:
```
requiredDays = clamp(distanceToWilderness / 6, 3, 15) // CellsPerDay = 6
progressPerPoll = 250 / (requiredDays × 60000) × Rand.Range(0.75, 1.25)
```
Dig time scales with how deep the cell sits — about **6 cells of depth per day**, clamped between 3
and 15 days, and jittered ±25% each poll:
| | Days |
|---|---|
@@ -97,53 +84,47 @@ ceiling of 15 keeps the deepest from being effectively forever.
## The tell: spoil
A dig has to go somewhere, and the dirt is where you notice it. Each dig tick, with a 50% seeded
chance (`OnDigTick`), the worker drops one tile of `Filth_Dirt` at the holder's position:
A dig has to go somewhere, and the dirt is where you notice it. Each dig tick, about half the time,
the pawn drops one tile of dirt filth where they are digging:
> A dirt floor swallows it; a paved cell shows it — exactly where a player might notice.
It is cheap and occasional on purpose: enough that a paved cell slowly accumulates a suspicious mess,
not so much that it spams filth or litters a clean cell every tick. If you floor your cells, spoil is
a genuine visual cue that someone is digging.
not so much that it spams filth or litters a clean cell every tick. If you floor your cells, spoil is a
genuine visual cue that someone is digging.
## Finding a tunnel in a search
A tunnel is *"a second, far less hideable secret."* The pick has `concealability` 0.5, but the
A tunnel is *"a second, far less hideable secret."* The pick hides at concealability 0.5, but the
**shaft** gives itself away in proportion to how far along it is. When a warden search reaches the
`InCell` site, `ExtraDiscoverChance` is added on top of the tool's normal find chance:
```
extraChance = clamp01(escapeProgress) × 0.4 // up to +0.40 at a nearly-finished tunnel
```
cell, an extra find chance is added on top of the tool's normal find chance — scaling up to **+0.40**
at a nearly-finished tunnel.
So a routine cell toss that finds a shiv can also catch a dig in progress — *"the same guard patrol
that finds a shiv finds the hole"* — and the deeper the shaft, the harder it is to miss. A foiled
dig is logged the same as one that ran: on discovery, `CriminalRecord.escapeAttempts` is
incremented, which raises this pawn's future search priority sharply (a known tunneller is the
prisoner a warden checks first — see [Warden Search](Warden-Search.md)). The full find math is on the
that finds a shiv finds the hole"* — and the deeper the shaft, the harder it is to miss. A foiled dig
counts against the prisoner the same as one that ran: on discovery, their escape-attempt tally ticks
up, which raises this pawn's future search priority sharply (a known tunneller is the prisoner a warden
checks first — see [Warden Search](Warden-Search.md)). The full find math is on the
[Warden Search](Warden-Search.md) page.
## Breakout
When `escapeProgress` reaches 1, `OnBreakout` fires:
When the dig finishes:
1. **Re-plan the exit** so it is correct even if the base changed during the weeks of digging.
2. **Breach the outer wall or fence** the tunnel comes up beside (`LastContainmentOnLine` — the
*outermost* impassable edifice or fence between the cell and the surfacing point, walking inward
from the exit). It is destroyed with `KillFinalize` — a visible hole the colony must repair, and
proof of how they got out. An open perimeter needs no breach.
3. **Record the attempt** (`escapeAttempts++`) — it happened whether or not they get clear of the
map.
2. **Breach the outer wall or fence** the tunnel comes up beside — the *outermost* impassable wall or
fence between the cell and the surfacing point. It is destroyed, leaving a visible hole the colony
must repair, and proof of how they got out. An open perimeter needs no breach.
3. **Record the attempt** — it happened whether or not they get clear of the map.
4. **Surface beyond the perimeter.** They dug all the way out, so they emerge *outside*, not in the
yard: the pawn is teleported to the exit cell, with a little spoil dirt to mark where they came
up.
5. **Hand off to vanilla** (`PrisonBreakUtility.StartPrisonBreak`). Now that they are loose and
outside, the base game's prison-break flow — and anything layered on it, e.g. **Prisoner
Realism** — takes it from there. A pawn already outside who no longer qualifies as an in-prison
escapee simply flees on their own; the breach and the emergence are the real outcome regardless.
yard, with a little spoil dirt to mark where they came up.
5. **Hand off to vanilla.** Now that they are loose and outside, the base game's prison-break flow —
and anything layered on it, e.g. **Prisoner Realism** — takes it from there. A pawn already outside
who no longer qualifies as an in-prison escapee simply flees on their own; the breach and the
emergence are the real outcome regardless.
The player gets one message: *"{pawn} has tunnelled out under the perimeter and escaped."* The tunnel
and the pick are spent together — the `ConcealedItem` is removed.
and the pick are spent together.
## How to defend against it
@@ -155,24 +136,23 @@ and the pick are spent together — the `ConcealedItem` is removed.
| **Depth** | a deeper cell is a longer dig and a wider window to catch it |
| **Seal the map** | no reachable edge means the tunnel stalls indefinitely |
Note what does **not** help much: adding perimeter walls. The dig goes under them and only breaches
the *last* one on the way out.
Note what does **not** help much: adding perimeter walls. The dig goes under them and only breaches the
*last* one on the way out.
## Quick reference
| Constant | Value | Meaning |
|---|---|---|
| Dig base chance | 0.08 | before nature × nurture; seeded per pawn |
| Dig base chance | 0.08 | before nature × nurture; fixed per pawn |
| Wilderness search radius | 60 tiles | how far out it looks for a surfacing point |
| Cells per day | 6 | dig speed vs. cell depth |
| Min / max dig time | 3 / 15 days | clamps on `distance / 6` |
| Spoil chance per dig tick | 50% | one tile of `Filth_Dirt` |
| Extra find chance | up to +0.40 | scales with `escapeProgress` |
| Pick `concealability` | 0.5 | `InCell` only |
| On discovery / breakout | `escapeAttempts++` | logged either way |
| Min / max dig time | 3 / 15 days | clamps on depth ÷ 6 |
| Spoil chance per dig tick | 50% | one tile of dirt filth |
| Extra find chance | up to +0.40 | scales with how far along the dig is |
| Pick concealability | 0.5 | in cell only |
| On discovery / breakout | escape attempt logged | counted either way |
---
*Part of the **Institution** suite — Core · Contraband · Justice · Gangs, alongside Foul Play and
Ward. Each stands alone; together they interlock.*
**