Ambient snakes
Les guides de mods sont en anglais, tels qu'ils sont livrés avec le jeu.
Now and then a snake slips out of a crevice at the foot of one cliff, crosses the pit floor between the towers and the rubble along its own route, and goes into the rock on the far side; or it crosses the plain above the cliffs, from beyond the frame to beyond it, round the factory, barrack and radar. By day it is a Schokari sand racer, weaving fast; at dusk and at night a Saharan horned viper, sidewinding. Neither comes out in rain or a sandstorm. Rarely a hunter comes for one: by default a buzzard by day or an owl by night stoops on it, takes it in its talons and carries it off. Both leave tracks in the sand: the racer a winding groove, the viper the slanted parallel bars of a sidewinder.
They are scenery only. They have no collision, never touch the combat RNG and are never saved, so a mod that only changes snakes keeps the vanilla profile (achievements, XP and leaderboards stay on).
A mod changes snakes with two optional files beside mod.json:
my_snakes/
mod.json
snakes.json species, timing, limits and hunts
models.json Snakes/<Name> GLBs (new species or replacements)
Models/Cobra.glb
The shipped values are in vanilla_reference/snakes.json (a copy of the game's Data/snakes.json). The stock models are built by tools/art/build_blender_snakes.py; their editable source is Assets/Models/Source/Snakes.blend.
snakes.json
{
"version": 1,
"settings": { "capture_chance": 0.3, "hunters": ["buzzard", "owl", "raven"] },
"species": {
"horned_viper": { "size": [1.6, 1.8] },
"sand_racer": { "active": {} },
"desert_cobra": {
"model": "Snakes/Cobra", "active": {"twilight": 2},
"gait": "serpentine", "speed": [20, 28], "size": [1, 1.2],
"wave_amplitude": 0.07, "wavelength": 0.55
}
}
}
The file is merged over the vanilla one key by key: settings field by field, species by id. An empty active silences a species; a new id adds one and needs a model, and inherits the sand racer's other fields. Unknown or invalid fields are named in the mod errors and left out.
settings
| Field | Meaning |
|---|---|
enabled | false turns the snakes off. |
density | Multiplies how often a snake comes out, 0-5. |
first_arrival_seconds | [min, max] before the first one of a run. |
interval_seconds | [min, max] between arrivals, divided by density. |
max_snakes | At most this many at once, per preset (Low, Medium, High, Ultra), up to 8. |
shadows | Whether they cast shadows, per preset. |
hidden_by_rain, hidden_by_sand | Above this much rain or sand, none come out. |
plateau_share | The share of crossings on the plain above the cliffs rather than the pit floor, 0-1. |
light_bands | day/twilight/night as [min, max] of the hour's light, like the birds. |
capture_chance | The chance a snake is hunted, 0-1. |
hunt_delay_seconds | [min, max] after it is clear of its crevice before the hunter is sent. |
hunters | Bird species ids that hunt snakes; one flying at that hour is sent. |
species
| Field | Meaning |
|---|---|
model | A Snakes/<Name> model key. |
active | Bands it comes out in, as a list or {band: weight}. |
gait | serpentine (the body follows the head's trail) or sidewinding. |
speed | [min, max] in world units per second. |
size | [min, max] scale of the model. |
wave_amplitude | Sideways swing, as a fraction of the body length (0-0.4). |
wavelength | Length of one wave, as a fraction of the body length (0.1-2). |
wave_hz | [min, max] waves per second; only sidewinding uses it. |
sidewind_degrees | How slanted a sidewinder's body lies to its travel. |
lift | How far a sidewinder lifts the stretches between its contacts. |
sheen, scale_lines | How glossy the scales are, and how strongly their rows show. |
scale_texture | "smooth" or "keeled": a stock scale relief patch drawn over the model ("": the procedural lattice). |
scale_rows, scale_density | Scale rows round the body, and along it per unit of the first UV set's U. |
relief | How deep the scale relief is, 0-2. |
tracks | How visible its tracks in the sand are, 0-1 (0: none). |
Models
A snake model is one straight mesh, in its in-game size: the snout at x = 0, the body along -X (the tail tip at x = -length), the belly on the ground at y = 0 in Godot's frame (+Y up). The game bends it around a spine every frame on the GPU, so it needs no bones. Give it a second UV set (UV2) with U from 0 at the tail tip to 1 at the snout, the spine coordinate, and V as the part code (0 body, 1 head, 2 eye, 3 horn): the eyes get a wet gloss. Without a second UV set the game builds one from the model's length, all body.
Colour comes from the vertex colours (COLOR_0, linear); the scale rows come from the first UV set (U along the body in scale rows, V around it). The stock snakes also read a colour pattern texture beside their GLB (Snakes/<Name>_pattern.png, U the spine coordinate, V round the body from the belly); a mod model keeps its vertex colours, and may still borrow a stock scale relief with scale_texture.
