Page 1 of 1

Maximum Number of orders per vehicle

Posted: 07 Oct 2020 07:36
by Ventry
Hey there.
Is there any way to increase this beyond 254??
I have a 1024 x 1024 map going and I have partially built what I call a "world tour" where many (100+ trains, shared orders) visit every passenger station there is.
I haven't finished all the towns yet and have hit this limit.
Thanks.

Re: Maximum Number of orders per vehicle

Posted: 07 Oct 2020 07:43
by jfs
Probably not entirely straightforward.
Look into ways to use self-regulating networks (or just through stations and not non-stop orders) to make the vehicles visit more stations in order than they have orders.

Re: Maximum Number of orders per vehicle

Posted: 07 Oct 2020 22:25
by Ventry
So, you are suggesting using implicit stops?
Interesting solution but, problematic.
It seems "silly" for an Open Source game to have such a (in my opinion) low limit in this day and age of computers.
Perhaps one of the devs could look to extending this??

Many Thanks.

Update:
Doesn't work quite like I hoped.
Too add new station I have to delete "implicit" stops to make room. Meaning I will end up having stations missing from my orders list.
Which can be a pain for many reasons.

Re: Maximum Number of orders per vehicle

Posted: 08 Oct 2020 07:44
by jfs
It's "possible" to extend, but it can become difficult. The limit is basically that the order index for the vehicle is an 8 bit field. Extending the field width on the data storage isn't difficult, it's just being careful to update the fields everywhere they're referenced, and make sure to update the save/load code so savegames can be upgraded to use the new field width. Of course, this will likely cause some level of savegame size growth.

The difficult part is the network protocol/command system. The command system is designed around two generic 32 bit fields that get packed with data, and if the commands that require a vehicle order index don't have room to expand the field width, you're more or less out of luck. Lots of strange things about OpenTTD can be answered as "because it seemed like a good idea 10/15/25 years ago".

Re: Maximum Number of orders per vehicle

Posted: 15 Oct 2020 11:58
by Eddi
Ventry wrote: 07 Oct 2020 22:25 It seems "silly" [...] in this day and age of computers.
well... the game isn't from this day and age, and some design decisions from 25 years ago still limit the development of today.

Re: Maximum Number of orders per vehicle

Posted: 15 Oct 2020 12:40
by mak
JGR has made a commit to his patch, I beleive,to increase orders to 64K

https://github.com/JGRennison/OpenTTD-patches/releases/

Re: Maximum Number of orders per vehicle

Posted: 17 Oct 2020 05:17
by Ventry
mak wrote: 15 Oct 2020 12:40 JGR has made a commit to his patch, I beleive,to increase orders to 64K

https://github.com/JGRennison/OpenTTD-patches/releases/
I've looked through the "change log" and do not see this mentioned??

Re: Maximum Number of orders per vehicle

Posted: 17 Oct 2020 06:25
by mak
This was to 37
copied from Github (last line)

Commits on Oct 12, 2020

@JGRennison
Add company setting for whether to add vehicle to group on copy-clone
ca726d7
@JGRennison
Add sort by vehicle count to vehicle purchase window
781fd14
translators
Update: Translations from eints
86ec743
@JGRennison

Increase per-vehicle order limit to 64k

but he has just released 38 so not checked.

Re: Maximum Number of orders per vehicle

Posted: 17 Oct 2020 07:13
by Ventry
Ok. See it.
Thanks for that.
Are these versions "safe" to use?
Or is it better to wait for stable release?

Re: Maximum Number of orders per vehicle

Posted: 17 Oct 2020 08:53
by mak
Never had problem with JGR Patch. It does a lot more than 'standard OTTD'.
I prefer it but each to their own

Re: Maximum Number of orders per vehicle

Posted: 18 Oct 2020 03:27
by Ventry
mak wrote: 17 Oct 2020 08:53 Never had problem with JGR Patch. It does a lot more than 'standard OTTD'.
I prefer it but each to their own
Appreciate the help mate.
Cheers.