
Negative Cargos
Moderator: TTDPatch Moderators
Negative Cargos
All of a sudden several stations are showing Goods quantities of anywhere from -1 to -30,000. And they never go positive. 

...and His train filled the temple.
Isaiah 6:1
Isaiah 6:1
This could also happen if newcargos is on and there's much cargo on the station. The newcargos switch allows up to 65,535 units to be waiting, but TTD won't display them correctly above 32,767 (negative values will be shown instead).
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
Thanks Csaboka,
That's exactly what is happening. Plus once a station cargo goes negative, it never seems to be able to go positive again; I have a couple of station cargos that get down to -1 but go positive unless I reset the station. Is this a fixable bug or just something to live with?
That's exactly what is happening. Plus once a station cargo goes negative, it never seems to be able to go positive again; I have a couple of station cargos that get down to -1 but go positive unless I reset the station. Is this a fixable bug or just something to live with?
...and His train filled the temple.
Isaiah 6:1
Isaiah 6:1
"Up to -1", stoney. -1 is the upper limit on amount of cargo waiting. From low to high cargo waiting, you have 0..32767, -32768..-1.
Csaboka, any particular reason you didn't change all those "print-signed-word"s to "print-unsigned-word"s?
Csaboka, any particular reason you didn't change all those "print-signed-word"s to "print-unsigned-word"s?
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
It's rather easy to fix this, and I really have no reason not doing that until now. When I finished the hard part of newcargos, I though this one can wait and no one will hit the limit anyway. (After all, the old limit was 4095, and no one complained about it being too low.) The only slight problem is that newcargo GRF coders will have to change the print-signed-word character to print-unsigned-word manually in their GRFs, I can't fix that one automatically. Oh, and I really hope no one will ever want to display negative cargo amounts, because it will be impossible after the change...
Well, I may just decide to lower the limit to 32K and forget about it...
Well, I may just decide to lower the limit to 32K and forget about it...
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
If it's not to much work could you make that a parameter, since I don't mind it going negative.
This way I'm allerted that there is too much cargo waiting and I have the time (until -32K) to get the cargo transported.
But like I said if it's to much trouble, forget it 32 K wil do too.
This way I'm allerted that there is too much cargo waiting and I have the time (until -32K) to get the cargo transported.
But like I said if it's to much trouble, forget it 32 K wil do too.

Wie zich gelukkig voelt met het geluk van anderen, bezit een rijkdom zonder grenzen. (F.Daels)

Still the best OS around
Still the best OS around
I'd rather not add a switch that can confuse newcomers (and possibly trigger false bug reports). And it's confusing indeed: When it reaches 32,767 units, it wraps around to -32,768, but after that, it increases again, so the maximum value is represented as -1 (that would wrap around to 0 if TTDPatch allowed it to be increased).
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
Oh well I guess I'll learn to live with a 32 K limit. 

Wie zich gelukkig voelt met het geluk van anderen, bezit een rijkdom zonder grenzen. (F.Daels)

Still the best OS around
Still the best OS around
Who is online
Users browsing this forum: No registered users and 14 guests