Skip to content

0.4.11 preview

Pre-release
Pre-release

Choose a tag to compare

@kramsey458 kramsey458 released this 21 Sep 01:18
· 73 commits to main since this release

Preview of Late Game Performance for Timberborn 1.1.2.4. The change in this version has not been played in-game yet. The latest release is still 0.4.9. It contains 0.4.10 (one checkbox on the settings page), which has been played.

The tree search no longer measures every grown tree for a building that is full

A session on 0.4.9 showed the tree and plant search still cost 4.3 ms per tick on a fast computer, about 5 searches per tick over roughly 1300 trees each, with only 7% of the distance lookups left out. The game's own per-component report for the same session puts lumberjack job selection at 3.8 ms per tick, 22% of all tick time and the largest single item in the simulation.

The save explains both numbers. 6208 of its 6263 cuttable plants are grown, so the 0.4.8 rule (skip plants with nothing to take) had almost nothing to skip. And all 20 lumberjack flags hold 20 logs, which is full, so the 18 lumberjacks ask for work again on every decision, and each time the game measures the path distance to every unreserved grown tree on the map before concluding there is nothing to do.

The game's last step takes the closest plant of each good and accepts the first whose carry amount is above zero. That amount is the smallest of what the worker can lift, what the plant yields, and the room left in the building; the first two are at least 1 for any grown plant, so the amount is zero exactly when the building has no room for that good, whichever plant it is. The distance to plants of a good there is no room for therefore cannot change the answer, and from 0.4.11 those lookups are left out. The mod asks the game's own carry calculation, once per good per search. The answer is still exactly the game's. A full flag among 1300 grown trees needs one lookup instead of 1300. When there is room, every grown tree is looked up as before and the same tree is chosen.

The YielderSearch: stats line now also says how searches ended, for example outcomes: 12 found work, 5188 found nothing the building has room for or the worker can take, 0 found nothing in range, so a colony whose lumberjacks are stuck behind full flags can be seen at a glance.

This does not make the lumberjacks less stuck: that is log storage and hauling, and a gameplay matter. It makes them cost almost nothing while they are.

What was tested, and what was not

The harness passes against the installed game's assemblies (43 patch targets, unchanged). The rule is checked against a model of the game's whole search, result included, on 4000 more random forests with full and part-full buildings, several goods, unreachable, dead and destroyed plants and ties: 0 differences. The measured case and its opposite (room available) are separate checks. The model is mine, read from the game's code; YielderSearchVerify = true in LateGamePerformance.cfg compares against the game's real search while playing, and one session with verify mismatches 0 in the stats lines is what proves it on your save. Nothing in this version has run inside the game.

Install

  1. Close Timberborn. Delete any older LateGamePerformance folder, then extract LateGamePerformance-0.4.11.zip into Documents/Timberborn/Mods.
  2. Requires the Harmony (2.4.1+) and Mod Settings Workshop mods.

Multiplayer: every player installs this same version. That is all.

SHA-256 of the zip: 70cc11a12457ed348d220f9377a347afae876fc208110630a0eb848980386b6b