Frequently asked questions
Straight answers, including the ones that aren't flattering. If yours isn't here, ask on GitHub.
The basics
What does it do, in one sentence?
It removes work the game repeats in big colonies, so the game stutters less without changing what it decides.
Who is it for?
Players whose colony has grown big enough that the game hitches, typically hundreds of beavers late in a game. In a small colony you are unlikely to notice much.
How much faster will my game be?
It depends on your colony and your computer, and there is no controlled frame-rate benchmark yet. In a late-game save of about 350 beavers it gave noticeably fewer lag spikes.
Every measured figure, with where it came from, is under what the numbers say. The mod's timing line measures your own colony.
Does it change how my colony plays?
It is built not to. Hauling lists, tree and plant searches and route maps come out exactly as the game's own. Tests check each against the game's code, and the verify settings compare them while you play.
One difference is known. Route maps are ready before the game first asks for them, so a few parts of the game can take the cached route instead of searching again. And when two routes are equally short, a beaver off the roads may take the other one. Both are the same for every player, which is why they are always on.
Does it have settings?
Yes, but none of them change what the game simulates.
- In the game (the settings button beside Late Game Performance in the Mods list): Incremental garbage collection, the one real choice. Four boxes are for a test session: Diagnostics timers, Verify terrain path searches, Verify save snapshots and Verify every feature (one test session). Two boxes take a memory measurement once and untick themselves: Measure live memory now (freezes the game for a moment) and Write a memory snapshot file (slow, large).
- In
version-1.1\LateGamePerformance.cfg: testing switches, thread counts and log lines. Restart after editing.
Everything that affects the simulation is always on, the same for everyone on the same version. To run without it, disable the mod.
Will it affect my saves?
It stores nothing in saves. To uninstall, disable it and restart. It is still a young mod, so try it on a copy of a save first.
Where do I get it?
From the GitHub releases page, as a ZIP under Assets. It also needs Harmony and Mod Settings from the Steam Workshop. The install guide has every step.
Multiplayer and BeaverBuddies
Is it compatible with BeaverBuddies?
Yes. Keeping co-op games in step comes before every speed-up: each one gives the game's own answer, and nothing that affects the simulation is a setting. See built for BeaverBuddies co-op and what is tested, and what isn't.
Do all players need it?
Yes. Every player installs the same version of the mod and runs the same game version, because the mod changes the code the simulation runs. Nothing else has to match.
Do the players' settings have to match?
No. Incremental garbage collection, thread counts, the timing options and the verify settings don't affect the simulation, so each player can set them differently.
Has it been played in co-op?
Yes, on two computers, including a 35-minute session logged on both. Bigger groups haven't been reported. If you try it, please tell us how it went.
How it works
What is the hauling job list cache?
For every hauler looking for work, the game asks every building in the district for its hauling jobs and sorts the whole list, even when nothing has changed. The mod keeps each building's jobs until something that feeds them changes, such as its stock, goods or priority. It then builds and sorts the list the game's way.
What are route maps, and why rebuild them on worker threads?
Every building with an entrance keeps a route map: the road distance from its entrance to every road tile it can reach. When a road changes, the game throws away nearly every map in the district and rebuilds each one on the main thread when it's next needed. The mod rebuilds them in the background on up to 7 worker threads, with the game's own code, and the main thread only waits for a map it's about to use.
What does the tree and plant search change?
To find a tree or plant, the game measures the path to every candidate before asking whether it has anything to take. For lumberjacks that is every marked tree on the map, and most are still growing. Once the search has found a reachable plant with something to take, a growing plant's distance can't change the answer, so the mod skips that lookup.
What if something goes wrong?
If a feature hits an error, it switches itself off for the rest of the session and the game's own code runs. A dialog asks every co-op player to restart (what to do).
Can I check it against the game?
Yes. Tick Verify every feature (one test session) in the mod's settings, play for a while, then untick it. It runs the game's own code beside the mod's and counts any difference. It never changes what the game is told, so one co-op player may use it alone.
In the stats lines look for verify mismatches 0. Any other number is a bug worth reporting. Most features also have their own …Verify key in LateGamePerformance.cfg (list).
Memory clean-up (garbage collection)
What is incremental garbage collection?
The game cleans up memory with everything stopped, going over everything still in use: 1.6 GB and more in a late-game colony. Incremental collection does the same work a few milliseconds at a time, across many frames. The install guide shows how to turn it on, and what the numbers say has one session's figures.
Why does it edit boot.config, and is that safe?
The game reads this choice from Timberborn_Data\boot.config before any mod loads, so a mod can't switch it while the game runs. Ticking the box adds one line, gc-max-time-slice=3, and unticking removes it. Nothing else in the file changes, and a backup, boot.config.before-incremental-gc.bak, is saved beside it first.
The file is never written unless you tick the box. Steam's "verify integrity of game files" and game updates restore the original file; if the box is still ticked, the mod adds the line again at the next start.
Measuring it
What does the Timing: line show?
One line every 1,000 ticks in Player.log. It shows:
- Ticks per second against what the game's speed asks for, which says whether the game keeps up.
- Simulation time per tick against everything else per frame (rendering, animation, other per-frame work and Unity itself), as shares of the main thread.
- The longest frame and the longest simulation slice.
- Garbage collections: how long the frames containing one took, and whether collection is incremental.
- Saves, reported on their own.
- Managed memory in use and the allocation rate.
The RouteMaps: line's "longest single pause" is the figure to watch for hitching.
Can I see where a tick's time goes, part by part?
Yes. Set RecordTimings = true in version-1.1\LateGamePerformance.cfg and restart the game. Every 3,000 ticks the game's own per-part timings are written to Documents\Timberborn\LateGamePerformance. The game runs a little slower meanwhile, so set it back to false afterwards.
Compatibility
Does it work with other mods?
It is built to. It needs Harmony and Mod Settings, and beyond that:
- Where another mod changes the same game code, that mod's change runs first, on every computer alike.
- If another mod changes what the hauling cache or saving relies on, that part is done the slower, safe way unless the change has been reviewed. MixedStorage's has been.
- Timber Together adds its own part to a save. It is saved on worker threads only with a Timber Together version whose saving code was reviewed; otherwise it is saved on the main thread, as the game does.
Keep a copy of your save when combining mods.
Which Timberborn version does it need?
Timberborn 1.1.2.4 or newer. If a game update changes something a feature needs, that feature doesn't start, the game runs its own code, and the startup line says OFF for it.
The project
Is it open source?
Yes, MIT licensed, and free. The source is on GitHub. It is an unofficial mod and is not affiliated with Mechanistry.
How do I report a problem?
Open an issue with the mod and game versions, the [LateGamePerformance] lines from Player.log and what you were doing. More detail in Troubleshooting.