Files
EscapistsReintroduced/docs/living-island/T3-checkpoints.md
T
jakub cab998fb64 Combine Workshop addon and fix prison startup
Merge owned systems into one addon while preserving resource identities. Gate player admission on the replicated prison scene, restore the original framed door, and hold enemy AI until escape. Correct scenario branding and author metadata, include publishing assets, and retain regression and native verification evidence.
2026-09-20 16:42:52 +02:00

3.6 KiB
Raw Blame History

T3 — Roadblocks and manned checkpoints

Read docs/living-island/README.md first, including the rules section. Depends on T1, T2.

Goal

Make the road network feel controlled. A checkpoint is permanent evidence (barriers, a parked truck, sandbags, a light at night) plus a conditional garrison (2–4 soldiers, materialised only when someone is near). The evidence costs no CPU and is always there; the soldiers cost agents and are not.

This is the single biggest "living island" win per CPU cycle: the player sees occupied terrain everywhere and pays for soldiers only where they are.

What to build

  1. Site kind. Extend ERR_LocationKind with CHECKPOINT, and ERR_SiteDefinition with the fields a checkpoint needs: prop layout choice, garrison size, whether it blocks the road, and the approach direction. Update ERR_SiteDefinition validation and its existing tests accordingly.

  2. Static layout. addons/core/Scripts/Game/ERR/ERR_CheckpointLayout.c places vanilla props relative to the site origin and a road heading: barriers angled across one lane, sandbag positions, a parked vehicle, a barrel. Keep it to one authored arrangement with a mirrored variant — do not build a procedural composition system.

    • Use only vanilla prefabs. Every {GUID}path you add must be present in docs/vanilla-resources.json, or tools/check.py will reject it. Find real GUIDs by searching the installed vanilla data, not by guessing.
    • Props are spawned once during preparation and never ticked.
  3. Checkpoint records. Each checkpoint registers a CHECKPOINT record with ERR_ForceDuty.HOLD, importance NORMAL, and a small garrison. The record's position is the checkpoint; it does not move.

  4. Authored content. Add 6–10 checkpoints to addons/core/Configs/ERR/EveronSites.conf on the main road junctions between the prison, the radio station and the helicopter site — the routes players actually travel. Pick junctions, bridges and town entrances.

  5. Behaviour when manned. The garrison gets a DefendWaypoint at the checkpoint. One soldier stands at the barrier, the rest hold nearby positions. Idle activity comes from T4 — leave hooks, do not implement smart actions here.

Acceptance criteria

  1. Driving the prison → radio → helipad route, the player passes at least three checkpoints, each visibly built and manned when approached.
  2. With no players near any checkpoint, checkpoint garrisons contribute zero active agents.
  3. Props survive their garrison being wiped — a cleared checkpoint still looks like a checkpoint, and the record is marked eliminated so it does not repopulate.
  4. Checkpoint props never block the road so completely that a vanilla car cannot pass; leave a drivable gap or a moveable barrier.
  5. python3 tools/check.py passes, including the resource-GUID rules.

Tests to write

tests/test_checkpoint_layout.py:

  • The pure placement function returns positions that are within the expected radius of the site origin and correctly rotated for a given road heading.
  • The mirrored variant is the mirror image, and the drivable gap is preserved in both variants (assert a minimum clear width along the road axis).
  • ERR_SiteDefinition validation rejects a checkpoint with zero garrison or a garrison above the allowed maximum.

Do not

  • Do not import any composition, prefab or layout from the original mod.
  • Do not spawn checkpoint props per-approach; they are placed once at preparation.
  • Do not exceed 12 checkpoints on the first pass. Authoring more is cheap in props but adds up in records and in preparation time.