Dev Log Week 2026-07: Going the extra distance

Last week I finally managed to wrap up and roll out the maintenance update to version 6.13.2.

One feature I wanted to bundle with this update was “distance-based customer type probabilities” for Individual Travel Requests. The idea is simple: Certain passenger types, especially those particularly focused on price, should become less common on longer distances. As always, the implementation wasn’t quite as straight forward.

Firstly, customer type probabilities were defined by a single value before, now it was several. So I had to add the respective parameter(s) in our master data files, parse and validate the values in our data pipeline tooling, import the value on server boot, store it to the database, use it when customer types are rolled. You get the idea…tiny change, a whole string of modifications :slight_smile:

Secondly, this change uncovered an “imprecision” that previously existed in my code: The way request generation worked was that for a given destination, the DS would roll a passenger type first and then, in a second step, it would roll a request size (“How many pax are on the ticket?”). It would do that until no pax/cargo units for that destination are left. The subtle mistake here is in the probabilities: When a pax type is picked based on its overall probability, but the request size is picked later, this changes the actual probability of that type. So long story short: I had to rewrite a whole lot of code to pick customer type and request size in a single step, based on the actual probabilities of the respective pairs. That the customer type probability was now distance-based became almost a side-note…

The remainder of the week, I made sure that our new Hungarian localisation was properly set up and announced on Steam. And after that, I spent a day implementing a new notification type in our backend system which @molp convinced me we needed over at Prosperous Universe (which he is right about, of course, and I should add a similar thing for AS eventually). This task revealed yet another “unknown unknown”, but I might touch on that next week :slight_smile:

2 Likes