Техническая документация доступна на английском языке. Имена кода и полей соответствуют текущему Mod API.
МОДИНГОВАЯ ДОКУМЕНТАЦИЯ
Difficulty authoring
The world setup sliders select the saved EASY, NORMAL, HARD, or NIGHTMARE
preset independently. Balance is loaded once at startup from mod-composed JSON.
Restart after editing data. Existing saves keep their selected presets; initial
terrain and starter supplies are not regenerated when loading a save.
Shared presets
assets/data/difficulty_settings.json contains a difficulty array with one
entry per preset ID. Objects within each entry are merged recursively by mod
patches. All fields are required in the complete document; patches may omit
unchanged fields. Unknown fields and non-finite or out-of-range numbers fail
validation. Multipliers accept 0-10; happiness thresholds accept 0-100.
| Section | Fields | Effect |
|---|---|---|
worldResources |
wildPlants, trees |
Initial wild vegetation; cultivated plants are unaffected |
worldResources |
surfaceDeposits, surfaceDepositSize |
Placement attempts and volume of stone, limestone, sandstone, granite, shallow granite and surface gravel deposits |
worldResources |
surfacePatches, surfacePatchSize |
Placement attempts and area of loose soil, jungle organic ground, fir podzol and cold-biome ground patches |
worldResources |
quarries, quarrySize |
Quarry count and dimensions; a zero in either field disables quarries |
worldResources |
slopes, slopeSize |
Material slope count and dimensions; a zero in either field disables these features |
settlement |
startingVillagers, startingRogueLevel |
Sandbox founding party; positive integers up to 100 |
settlement |
startingFood |
Multiplier for edible entries in settlement_start.json; non-food supplies stay unchanged |
settlement |
startingNeeds |
Initial hunger and rest reserves for founding civilians, 0-100000; later refills retain their ordinary limits |
settlement |
farmYield |
Farm harvest multiplier |
settlement |
migrantHappiness, traderHappiness, heroHappiness, godHappiness |
Happiness required by the corresponding arrival/event systems |
wildlife |
peacefulPopulation, dangerousPopulation |
Natural individual/herd population targets |
wildlife |
peacefulMigration, dangerousMigration |
Recurring migration chance multipliers, with the result capped at certainty |
wildlife |
peacefulGroupSize, dangerousGroupSize |
Natural herd/pack sizes; positive multipliers retain at least one animal |
wildlife |
peacefulYearOffset, dangerousYearOffset |
Integer calendar shift from −20 to 20: positive advances arrivals, negative delays them; earliest possible year is 1 |
creatureLevels |
minimumOffset, maximumOffset |
Inclusive integer level offsets, each −20 to 10; minimum must not exceed maximum |
creatureGrowth |
pointsMultiplier |
Multiplier from 0 to 10 for creature growth points |
startingForces |
militia, townGuards, rogues |
Extra sandbox soldiers, integer counts from 0 to 10; town guards use reinforced_militia. The elite escort is separate and always present. rogues remains supported for mod patches but defaults to zero. |
Wildlife tuning applies to surface animals, using their authored body type,
disposition, depth and camp metadata. Hostile animals use dangerous*; passive
and neutral animals use peaceful*. Friendly actors, underground groups and
camp populations are excluded. Common peaceful species already available in
year 1 retain that start year. Birth rules and population caps remain in the
respawn registry. Authored campaign founding parties retain their story setup.
Normal uses the original vegetation, terrain and wildlife balance. Default settlement starts are:
| Preset | Villagers | Elite rogue level | Starter food | Initial hunger/rest |
|---|---|---|---|---|
| Easy | 5 | 5 | 1.5× | 5000 |
| Normal | 4 | 3 | 1× | 4000 |
| Hard | 3 | 1 | 0.7× | 3000 |
| Nightmare | 2 | 1 | 0.4× | 2000 |
Every sandbox starts with one elite rogue. The independent combat preset adds two militia and one town guard on Easy, one of each on Normal, one militia on Hard, and no extra soldiers on Nightmare. Ordinary rogues are not included.
Hard reduces quarry and material-slope sizes and frequency; Nightmare disables them. Ordinary land elevation, deep ores, dungeon geology and shorelines keep their existing generation rules. The resource slider regenerates both preview terrain and vegetation using the selected seed.
Combat statistics and raid cadence remain authored in
assets/data/raids.json (difficultyProfiles). The new wildlife values are
independent of enemy health/damage multipliers.
Authored migration packs
assets/data/creature_respawns.json retains its profiles array. An optional
migration.pack object replaces species-specific arrival logic:
{
"leaderDefinitionId": "alpha_wolf",
"followerDefinitionId": "wolf",
"minimumSize": 2,
"maximumSize": 8,
"firstSeason": "WINTER",
"firstDay": 1,
"forceFirstArrival": true
}
Both creature IDs must belong to the profile. Sizes are positive inclusive
bounds and include the leader. The first eligible date combines the profile's
migration.minimumYear, the difficulty calendar offset, firstSeason, and
firstDay. forceFirstArrival attempts one pack on that date; ordinary later
arrivals still use interval, chance, population and biome rules. The same
composition and size scaling apply to both paths.
For wolves, Normal first arrives in winter of year 2, Easy in winter of year 3, and Hard/Nightmare in winter of year 1. Other hostile migrations advance by one year on Hard and two on Nightmare. Boars, buffalo and rabbits retain substantial population targets and recurring arrival chances on every preset.
Mod patches
Content packs can patch difficulty by its four preset IDs and
creatureRespawns by profile ID. difficulty supports patch only because the
sliders have four fixed choices. creatureRespawns supports patch and add
with the ordinary namespaced-ID and dependency rules. Neither registry needs
display-name translations. Existing creature IDs can be used in new profiles;
each creature may participate in only one profile.
[
{
"registry": "difficulty", "op": "patch", "id": "HARD",
"values": {
"settlement": { "startingVillagers": 4 },
"worldResources": { "quarries": 0.25 },
"wildlife": { "dangerousYearOffset": 1, "dangerousGroupSize": 0.8 }
}
},
{
"registry": "creatureRespawns", "op": "patch", "id": "wolf_pack",
"values": { "migration": { "pack": { "maximumSize": 6 } } }
}
]
The installed sample is in examples/mod-samples/difficulty_tuning. Set
requiresNewWorld when a pack's intended balance depends on newly generated
terrain or starter conditions. Patching migration affects future natural
arrivals; it does not replace existing animals.
