Cargo Destinations.

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Cargo Destinations.

Post by JGR »

wallyweb wrote:
JGR wrote:As for the full loading bug, try a cht: resetfifo signcheat and see if the problem reappears...
(I had a similar issue at one station, but dong that seemed to get rid of it). I may well have a scan of the code later though...

The feature is still not completely finalised as there are a number of instances where it does not work and/or is suboptimal/unfinished...
I tried the cht: resetfifo and it worked for the current train, but the issue reappeared pending the arrival of the next train. I suppose one could do the cheat for each train arrival, but that might be a bit hard on my fingers and my mouse.
Sorry for taking so long to get back to you...
I've been somewhat busy with stuff and all that.

In order to aid debugging, when it does eventually occur, can you post your full config (other settings may be at play) and a savegame which illustrates the issue...

It may take me a while to get on it as I have fair amount of academic stuff this week and possibly next, and my next two weekends are largely taken up by meetings...
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Cargo Destinations.

Post by wallyweb »

JGR wrote:In order to aid debugging, when it does eventually occur, can you post your full config (other settings may be at play) and a savegame which illustrates the issue...

It may take me a while to get on it as I have fair amount of academic stuff this week and possibly next, and my next two weekends are largely taken up by meetings...
Not a problem. I'll try to set up a very simple scenario with as few grf's as possible so as to focus on the issue.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Cargo Destinations.

Post by wallyweb »

wallyweb wrote:... a very simple scenario with as few grf's as possible ...
has been included in the attached zip.
Some very interesting developments ... follow the save games with 1 through 6 added to their dates. There are corresponding screenshots.
simpletoncity.zip
(616.13 KiB) Downloaded 122 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Cargo Destinations.

Post by JGR »

Preliminary investigation shows that that the coal is being generated as routed cargo...
This is not supposed to happen, given the values on your config file.

On the upside, this means that the fix will probably be easy, and hence can be committed soon.

Edit:
After some investigation the value for cdstcargoclassgentype is one digit longer than it should be, and hence the default value of 33333333333 was being used.
Some kind of useful error message ought to be added...
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Cargo Destinations.

Post by wallyweb »

JGR wrote:After some investigation the value for cdstcargoclassgentype is one digit longer than it should be, and hence the default value of 33333333333 was being used.
Oops! :oops:
Some kind of useful error message ought to be added...
Please be gentle ... :cry:

UPDATE The configuration file has now been properly configured and that definitely fixed it. As my dear departed father used to say ... "Wallyweb! If there is a way to break the unbreakable, you're just the one to find it."

Thank you for showing me the error of my ways. :bow:
Last edited by wallyweb on 19 Feb 2010 20:26, edited 2 times in total.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Cargo Destinations.

Post by JGR »

wallyweb wrote:
JGR wrote:After some investigation the value for cdstcargoclassgentype is one digit longer than it should be, and hence the default value of 33333333333 was being used.
Oops! :oops:
Some kind of useful error message ought to be added...
Please be gentle ... :cry:
No worries dear. It's an easy mistake to make, especially on a parameter such as that.

As of r2305 TTDP will eat you for breakfast^W^W^W^W display a friendly error message, if you give it an out of bounds config value.
Ex TTDPatch Coder
Patch Pack, Github
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Cargo Destinations.

Post by michael blunck »

BTW, would someone like to elaborate on the difference between:
Digit value: 0: all cargo is by preferance routed, 1: all cargo is routed (or dropped at source)
?

regards
Michael
Image
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Cargo Destinations.

Post by JGR »

In the instance that no routes from the source station of the specified cargo exist, or there are no reachable destinations that accept the cargo (typically initially), setting 0 will just add the cargo as unrouted, and setting 1 will not add the cargo.
Ex TTDPatch Coder
Patch Pack, Github
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Cargo Destinations.

Post by michael blunck »

Ah! I.e.:
Digit value: 0: all cargo is routed (if possible), 1: all cargo is routed (or dropped at source, if not possible)
Now, what does "dropped at source" mean? "Source" being, e.g., a factory or a station at that factory? Will cargo be produced in case there´s no possible route?

regards
Michael
Image
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Cargo Destinations.

Post by JGR »

Essentially, the station refuses reception of the cargo.
What the old TTD code does then is not currently known, as I haven't dug through those bits.
It's a minor enough edge case (bearing in mind that no cargo would appear anyway until a suitable vehicle arrived) that subtle details like that aren't enough to prod me into wading through the mess :P

As for industries/etc, the easiest way to determine that is most likely experimentally.

It is likely however that either the cargo will show up as being produced at the industry, but will then vanish without a trace, and not appear at other stations. Or (less likely), TTD is intelligent enough to try to store the cargo somewhere else, and/or not count it as being produced/distributed.
Either way, I wouldn't worry about it.
Ex TTDPatch Coder
Patch Pack, Github
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Cargo Destinations.

Post by michael blunck »

JGR wrote: It is likely however that either the cargo will show up as being produced at the industry, but will then vanish without a trace, and not appear at other stations.
That´s what my question was aimed at.
JGR wrote: Or (less likely), TTD is intelligent enough to try to store the cargo somewhere else, and/or not count it as being produced/distributed.
Well, couldn´t this have an effect on the way ECS industries work? Seems that some experiments are needed ...

regards
Michael
Image
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Cargo Destinations.

Post by frosch »

Isn't that just the same as buying exclusive transport rights?
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Cargo Destinations.

Post by JGR »

frosch wrote:Isn't that just the same as buying exclusive transport rights?
As far as I can ascertain, no.


Specifically the add cargo to station function will not add the cargo and return cargo added = 0 in that circumstance.
Ex TTDPatch Coder
Patch Pack, Github
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: No registered users and 8 guests