Stopping for Fuel - Development Log #543

In this week's devlog Michi is back from vacation and shows the progress on automatic routes: executing a route and the new refueling step.

Avatar Michi

Michi (molp)

It has been a while since the last devlog: I have been on vacation! Now I am back in the office and continue where I left off. This week the work on the route feature continued. I implemented the logic that actually executes a route. After a ship is assigned to a route it creates a copy of the route and starts executing it. It flies to the respective waypoints, executes all steps, continues to the next waypoint, and so on. Right now only the happy path works, ie the route execution is not blocked by any issue. By the way: We use a copy of the route, because we don't want to lock the route while ships are assigned to it and allow changes. Once a ship finishes the assigned route and the route is set to repeat it will create a new copy and thus execute all the changes that have been made in the meantime. This is a compromise, of course, but it removes a lot of edge cases and confusion.

I implemented the refuel step as an example to test the execution of steps. Similar to custom contracts, I decided to use an overlay to allow players to edit the steps. Here is an example:

Editor for the refueling step

The refuel step is defined for either STL or FTL fuel (if both are needed, two steps are necessary) and the source of the fuel can either be a local store or the ship's cargo hold. It is possible to specify a minimum and maximum amount of fuel that is being transferred. In order to not have to worry about different fuel tank sizes of the assigned ships, it is also possible to select "capacity" for either value. That means that the refuel step will try to fill the tank to its capacity.

There are cases when a step cannot be executed: In this case for example when the selected store doesn't have enough fuel to transfer the minimum amount specified. We haven't decided exactly what to do in such a case, but the options would be:

  • stop the route execution and send a notification about the issue
  • continue anyway
  • wait until fuel becomes available

Depending on how one is using the automatic routes and depending on the actual step type, all three might make sense in some circumstances. I am still thinking about how to best implement that.

Here is a video of a small test route with a refuel step. You can see that the flight is planned and started automatically, the ship consumes fuel, takes fuel from the station's warehouse, and then plans and executes the flight back to Umbra:

As always, we'd love to hear what you think: join us on Discord or the forums!

Happy trading!