scenarios.ron
The agent survival benchmark’s scenarios. Read by the game’s rules: a change here changes how the game plays, and a world remembers the content it was made with.
File: assets/data/scenarios.ron
About this file
Section titled “About this file”The agent survival benchmark’s scenarios (docs/benchmark.md): fixed starts to compare agents (or people) on. zombye-server --benchmark list prints them; --benchmark ID --mcp plays one over MCP; --benchmark ID --baseline NAME plays one with a built-in script.
Each: id, name, brief (what the player is told), seed, map_chunks (default 30: 480 m), zombies (default None: as many as population.ron gives the map), start_hour (default 14), start (Bedroom, the default; Town: open ground in the middle of town; At(x, y)), hold (an item in the hand), kit (items in the pockets), hordes (zombies put near the start: count within radius of the point distance metres toward bearing, 0 north, 90 east), noise (a noise at the start: radius, lasting), hours (how long the run lasts, in game hours: one is 150 s of simulation), and points: the score is
survive x (hours survived / hours) + house x buildings searched + kill x zombies killed(defaults 1000, 20, 5). A run ends when the survivor dies or the hours are up.
Changing a scenario changes its fingerprint: results from before no longer compare. Add a new one under a new id instead.
Fields
Section titled “Fields”The file is a list of ScenarioDef, each in round brackets.
One scenario, as scenarios.ron lists it.
| Field | Type | What it is |
|---|---|---|
id |
String |
What it is asked for by: lower-case letters, digits and _. |
name |
String |
|
brief |
String |
What whoever plays it is told: the situation and what counts. |
seed |
u64 |
|
map_chunks |
i32 |
The map is this many chunks of 16 m each way (default 30, as the game’s). |
zombies |
Option<u32> |
Zombies in the world at the start; None: as many as the population file gives the map. |
start_hour |
f32 |
The hour of day the run starts at (default 14, as a new game’s). |
start |
Start |
|
hold |
Option<String> |
An item in the survivor’s hand at the start (a weapon, usually). |
kit |
Vec<KitEntry> |
Items in its pockets at the start. |
hordes |
Vec<Horde> |
Zombies put near the start, on top of the world’s own. |
noise |
Option<Noise> |
A noise at the start point as the run begins. |
hours |
f32 |
How long the run lasts (game hours; one is 150 s of simulation at the default day length). |
points |
Points |
A resolved Choice: the survivor, and what it wears and carries on the first morning.
| Field | Type | What it is |
|---|---|---|
origin |
Origin |
|
outfit |
Vec<String> |
|
items |
Vec<(String, u16)> |
Origin
Section titled “Origin”Who a survivor was, as the player keeps it.
| Field | Type | What it is |
|---|---|---|
background |
String |
Ids, as the data files name them (empty: a plain survivor). |
strengths |
Vec<String> |
|
flaws |
Vec<String> |
|
skills |
Vec<(Skill, u32)> |
Starting levels on top of every survivor’s own, a skill at most once. |
perks |
Perks |
One of the skills.
| Value | What it means |
|---|---|
Fitness |
|
Strength |
|
Bludgeon |
|
Edged |
|
Brawl |
|
Stealth |
|
FirstAid |
|
Scavenging |
|
Handiwork |
Crafting (#12; this module only keeps its XP and level). |
A survivor’s effects added up: what the sim reads. Multipliers are 1 and the kilograms 0 for a survivor with no Origin.
| Field | Type | What it is |
|---|---|---|
xp |
[f32; SKILL_COUNT] |
XP multiplier per skill (index: Skill as usize). |
carry_kg |
f32 |
|
hunger |
f32 |
|
thirst |
f32 |
|
tiredness |
f32 |
|
run_drain |
f32 |
|
recovery |
f32 |
|
seen_from |
f32 |
|
footsteps |
f32 |
|
healing |
f32 |
|
bleeding |
f32 |
|
infection |
f32 |
KitEntry
Section titled “KitEntry”| Field | Type | What it is |
|---|---|---|
item |
String |
|
count |
u16 |
count zombies on open tiles within radius of the point distance metres from the start toward bearing (degrees: 0 north, 90 east).
| Field | Type | What it is |
|---|---|---|
count |
u32 |
|
distance |
f32 |
|
bearing |
f32 |
|
radius |
f32 |
A noise heard radius metres off; lasting keeps drawing the far horde in (an alarm).
| Field | Type | What it is |
|---|---|---|
radius |
f32 |
|
lasting |
bool |
Points
Section titled “Points”What the score counts: survive for lasting the whole run (in proportion for part of it), house for each building with a container searched, kill for each zombie killed.
| Field | Type | What it is |
|---|---|---|
survive |
u32 |
|
house |
u32 |
|
kill |
u32 |
The file
Section titled “The file”The whole file as shipped
// The agent survival benchmark's scenarios (#29, docs/benchmark.md): fixed starts to compare// agents (or people) on. `zombye-server --benchmark list` prints them; `--benchmark ID --mcp`// plays one over MCP; `--benchmark ID --baseline NAME` plays one with a built-in script.//// Each: `id`, `name`, `brief` (what the player is told), `seed`, `map_chunks` (default 30: 480 m),// `zombies` (default None: as many as population.ron gives the map), `start_hour` (default 14),// `start` (Bedroom, the default; Town: open ground in the middle of town; At(x, y)), `hold` (an// item in the hand), `kit` (items in the pockets), `hordes` (zombies put near the start: `count`// within `radius` of the point `distance` metres toward `bearing`, 0 north, 90 east), `noise` (a// noise at the start: `radius`, `lasting`), `hours` (how long the run lasts, in game hours: one is// 150 s of simulation), and `points`: the score is// survive x (hours survived / hours) + house x buildings searched + kill x zombies killed// (defaults 1000, 20, 5). A run ends when the survivor dies or the hours are up.//// Changing a scenario changes its fingerprint: results from before no longer compare. Add a new// one under a new id instead.[ ( id: "first_night", name: "The first night", brief: "You wake up in a bedroom at 14:00 with nothing. Search the house for a weapon, food, drink and bandages, decide whether to stay or go, and be alive at 06:00. Surviving is most of the score; every building you search and every zombie you kill adds a little.", seed: 1, hours: 16.0, ), ( id: "scavenger", name: "Scavenger", brief: "A quiet morning in a thinly haunted town. You have three game hours: search as many buildings as you can (a building counts once you have searched a container in it) and stay alive. Kills count for nothing here.", seed: 7, zombies: Some(700), start_hour: 9.0, kit: [(item: "water_bottle")], hours: 3.0, points: (survive: 400, house: 50, kill: 0), ), ( id: "last_stand", name: "Last stand", brief: "Midday, in the open in the middle of town, a baseball bat in your hands, and a noise has just told every zombie nearby where you are. Sixty are closing in from three sides. Last one game hour: fight, run or hide. Kills count double.", seed: 3, start_hour: 12.0, start: Town, hold: Some("baseball_bat"), kit: [(item: "rag", count: 2)], hordes: [ (count: 20, distance: 28.0, bearing: 90.0, radius: 7.0), (count: 20, distance: 32.0, bearing: 225.0, radius: 7.0), (count: 20, distance: 36.0, bearing: 315.0, radius: 7.0), ], noise: Some((radius: 60.0, lasting: true)), hours: 1.0, points: (survive: 1000, house: 0, kill: 10), ), ( id: "siege", name: "Siege", brief: "21:00, dark. You are in the bedroom with a claw hammer and a flashlight, and something outside made a noise that will not stop: the neighbourhood is coming to the house. Hold out, or get out, for two game hours.", seed: 5, start_hour: 21.0, hold: Some("claw_hammer"), kit: [(item: "flashlight"), (item: "gauze", count: 2), (item: "water_bottle")], hordes: [(count: 25, distance: 30.0, bearing: 180.0, radius: 8.0)], noise: Some((radius: 90.0, lasting: true)), hours: 2.0, ),]