New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No more space for orders #6968

SamuXarick opened this Issue Nov 13, 2018 · 5 comments


None yet
5 participants

SamuXarick commented Nov 13, 2018

While testing multiple AIs on a 4096x4096 map, some kind of limit has been reached. I was seeing vehicles with no orders and AIs struggling to insert orders to their vehicles. ShipAI hinted me with the error message ERR_ORDER_TOO_MANY

I decided to play and right on my first bus service, I could only insert the first order. When attempting to insert the 2nd order it failed with this:


Savegame attached.
no more space for


This comment has been minimized.

James103 commented Nov 13, 2018

Steps to reproduce:
(An autoclicker is helpful for this)

  1. Start new game
  2. Give yourself a few million so you can then...
  3. buy a road vehicle.
  4. Put down a bus station ("A").
  5. Give your road vehicle 254 of the same order to go to station A. If you see "Too many orders", this step is done.
  6. Clone your road vehicle 251 more times. 250 of those times it will work, but the 251th time the vehicle will copy, but the orders won't.
  7. On the road vehicle with no orders, give it 246 of the same order to go to station A. If you see "No more space for orders", this step is done.
  8. To calculate the max number of orders, punch in the equation [your road vehicles - 1] * [254 orders per vehicle] + [# of orders on last vehicle]. I got [251] * [254] + [246] = 64,000 orders total across all my road vehicles.
  9. If you attempt to insert more orders on any of your vehicles, you will see the message "No more space for orders" or ERR_ORDER_TOO_MANY.

Result: The limit for how many orders you can have across all vehicles of all companies is 64,000 orders total.

Savegame attached:
no more space for orders


This comment has been minimized.


planetmaker commented Nov 13, 2018

That indeed is a hardcoded limit in the game code itself.
src/order_base.h:typedef Pool<Order, OrderID, 256, 64000> OrderPool;
src/order_base.h:typedef Pool<OrderList, OrderListID, 128, 64000> OrderListPool;


This comment has been minimized.


SamuXarick commented Nov 13, 2018

My testing with 14 AIs started in 1935 and I've spotted the first vehicles with no orders in 1952. It could have been earlier. Still, it only took 17 years to reach the limit. Could the order limit be increased? Is it feasible?


This comment has been minimized.


nielsmh commented Nov 13, 2018

Let's do some more numbers.

At 64,000 orders max and a full game of 15 companies, that gives 4266 order entries to each company. The hard limit is 5000 vehicles of each type, so less than a quarter order per vehicle. However, sensible players use order sharing, and usually don't use all types of transport, so in practice you're probably up to 2-3 orders per vehicle, more if you only use trains or only road vehicles. That's reasonable, especially when playing on sensible map sizes and not 4096 sized maps.


This comment has been minimized.


andythenorth commented Nov 13, 2018

Thanks for the report (and the detailed investigations).

The limit is believed to be non-trivial to increase.

We don't see much failure demand (reports of this being a problem) over the last 10 years.

So I'm closing this one, as it won't be changed. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment