Page 1 of 1

waiting_acceptance variable, new trains loading&unloadin

Posted: 20 Oct 2004 14:11
by JCU
Max. cargo count waiting on a station is limited by 0xFFF that means 4095. For any large station that transfers a large amount of cargo, this limitation is very annoying.

But as I see, there are 3 more free bits: only the last one is occupied by the acceptance flag. After changing all needed masks, I recently tested this possibility. With a new game this works fine, new limit is 32767 and is not so low. But the old savegame crushes after applying this change. Crush appears when i click on a station.

Why the game crushes? Are there any related variables, flags and so on? Or this is my own bug? But corrected version is stable after a new game was started, even when I have more than 4096 units of cargo on a station.

Also i just made the new ttdpatch-like trains loading/unloading patch that may be enabled from "configure patches" window. Is it possible to insert this one into the "official" sourcecode?

P.S. Sorry for my not-so-good english.

Re: waiting_acceptance variable, new trains loading&unlo

Posted: 20 Oct 2004 16:29
by bociusz
JCU wrote:Max. cargo count waiting on a station is limited by 0xFFF that means 4095. For any large station that transfers a large amount of cargo, this limitation is very annoying.

But as I see, there are 3 more free bits: only the last one is occupied by the acceptance flag. After changing all needed masks, I recently tested this possibility. With a new game this works fine, new limit is 32767 and is not so low. But the old savegame crushes after applying this change. Crush appears when i click on a station.

Why the game crushes? Are there any related variables, flags and so on? Or this is my own bug? But corrected version is stable after a new game was started, even when I have more than 4096 units of cargo on a station.

Also i just made the new ttdpatch-like trains loading/unloading patch that may be enabled from "configure patches" window. Is it possible to insert this one into the "official" sourcecode?

P.S. Sorry for my not-so-good english.
Post the diff file here, I'm interested in that features.

My changes. And also 2 bug reports.

Posted: 20 Oct 2004 19:21
by JCU
I have no program to automatically extract all my changes.

I just finished manual extraction, and it should work. Possibly with bugs... Let me know if you find these small annoying creatures in my code.

In general, all my changes (exceps 0xFFF limitation removing) marked by my nickname-related variables and function names.

Also, 2 bug reports:

1. when I am click on the flag mark in the left of a train depot window and window is scrolled, flag's state remains the same.

2. when I have a station with 2 trains loading simultaniously and then they are arriving, second one, receiving red lite (one-sided) on the outgoing track, will try to reverse after some seconds, and locks incoming rails for a few seconds. In original TTD delay before reversing in such a case is much, much greater.

Some new updates for my changes

Posted: 21 Oct 2004 07:40
by JCU
One more setting (station rating setup for large transport terminals with hude amounts of cargo).

Increased feeders limit (my option update)

Industries will not close (not tested but should work) when their percetnage of transported goods is greater then ~62% - with jcu_industry_production mode only