OpenLoco v26.05 is out! This month’s release focuses primarily on some quality-of-life UI changes, while also addressing some annoying bugs and paving the way for a better codebase.

Making cargo more intuitive

To indicate what cargo is produced by industries and what cargo passes through stations, Locomotion uses small icons in various places. This makes sense when you consider the game originally had to run on displays with resolutions of 640×480 or 800×600. While experienced players have likely memorised the meaning of all these icons, they do make it quite hard for new players to pick things up. Well, nowadays we can afford to use up a bit more space, right?

This month, we’ve reworked the station construction tab to list cargo produced and accepted by a new station in full, with a label next to the icons (#3734).

Before:

Station construction, before

After:

Station construction, after

We’ve also added tooltips to the cargo icons in the station window, so you can still quickly look up what an icon means without having to check the construction window again (#3735).

Station construction, after

Increase dimensions of Build Vehicle window

Last month, we introduced new sorting options for the Build Vehicle window. Thinking the sort options weren’t that easy to discover, and the window felt a little cramped anyway, @AaronVanGeffen set out to improve the window further. The sort options have been moved into a dropdown of their own, and the window has been made a little larger by default (#3710).

Before:

Build Vehicle window, before

After:

Build Vehicle window, after

Fix item removal in various list windows

We also changed the way list windows work last month. While our tests looked very promising, there was one thing we did not properly test: item removal. Suppose you deleted a vehicle while the vehicle list was open? Yeah, the game would crash. Oops. The same thing happened with the other list windows: stations, towns, industries, and companies. We’ve reworked the way items are removed (#3727), so this shouldn’t bug us again.

Our rework presented another edge case when regenerating the landscape in the scenario editor. If you happened to have the town or industry list windows open, their lists would not fully refresh. Suppose you regenerated with more or fewer towns or indeed industries, the list would refresh, but not repopulate. This meant entries would potentially be missing — or lead to invalid entries. We’ve added a hard refresh to both windows for this particular situation (#3733).

Fix save state not being deterministic without auto save

Something that puzzled us in the past, but ultimately forgot about, was that save games would not give the exact same result on disk unless autosaves had been enabled. Our replay checks always used autosaves, though, so surely there couldn’t be a big problem?

Aiming for a perfectly deterministic simulation, @ZehMatt investigated the matter once more. He found the whole reason it was not deterministic to be that there was lingering game state for stations. When autosaves were enabled, it would zero some fields out every time an autosave was performed. In particular, this also impacted how cargo stats were calculated, since it used the old data, which also influenced the pseudo-random number generator (prng).

We have changed the station manager to now explicitly zero-initialise the remaining fields when allocating a new station (#3737). With that, the game now always outputs binary identical files, and the determinism bug is gone.

Separate OpenLoco into a library and app

When we revamped our CMake config a few years ago, we set out to modularise our codebase to make it easier to create smaller, testable targets. This was successful to a degree, but mostly for particular data structures and utility functions. The majority of the actual game code was still not explicitly covered by tests, save for replay tests covering parts of the simulation. Splitting it up further would be a monumental task, surely…

Cue @ZehMatt. Eager to expand test coverage to include tile element management at least, he split up the source tree to distinguish an OpenLoco library from the actual game. This, then, would allow targeting particular functions without actually running the full game.

As of #3742, this became a reality! Many files were moved around to realise this! We now build the source tree as a library, with the main game executable using (linking) this library.

Allow setting preferred company name

OpenLoco has allowed players to set up preferred company ‘owner’ names and faces for a while, but for in-game companies, we’ve been stuck with ‘Name Transport’ still… until now! In #3720, new contributor @Llammissar added an exta option to let players set custom company names as well! Neat.

Custom company names

Updated: