Selectable Load/Unload and auto-refit suggestions
Moderator: TTDPatch Moderators
Re: Selectable Load/Unload and auto-refit suggestions
It wasn't until I started playing with aircraft that I realized FindNearestTrainDepot probably wasn't going to work properly. I spent about a minute trying to fix it, I think. Then I realized that I couldn't figure out how it was useful, and stopped trying.
I did tag them as "FIXME", but I dunno if it's worth fixing.
I didn't really mind this bughunting session. New features are worth a little bughunting. And I was up to my elbows in most of that code anyway, trying to get refit orders to work.
I did tag them as "FIXME", but I dunno if it's worth fixing.
I didn't really mind this bughunting session. New features are worth a little bughunting. And I was up to my elbows in most of that code anyway, trying to get refit orders to work.
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
Re: Selectable Load/Unload and auto-refit suggestions
Downgraded to bad thing.DaleStan wrote:I'm seeing neither. Is this a good thing or a bad thing?wallyweb wrote:Stay tuned for screamies or screenies.
We have a screamie Houston!
The Climate is Arctic with default industries (no sets, no mods) and with native support for paper.
The train is Canadian Set v0.2i with default parameter 0 - no special industry support.
ttdpatch is r1812.
Proverbial "thousand words" attached below:
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Selectable Load/Unload and auto-refit suggestions
But... But... It works in temperate. </whine>
The nightlies will be fixed in an hour. They're not any better as I type this, though.
The nightlies will be fixed in an hour. They're not any better as I type this, though.
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
Re: Selectable Load/Unload and auto-refit suggestions
Fixed in r1815 - Status - Upgrade to goodDaleStan wrote:The nightlies will be fixed in an hour. They're not any better as I type this, though.
Back to building a cute little screenie suitable for demo purposes and whatever ails you.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
-
- Tycoon
- Posts: 5950
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Selectable Load/Unload and auto-refit suggestions
Very nice, Dale. Just one minor suggestion: would it be possible to have the loading state operators "<" and ">" in addition (or instead of "is not")? ATM, I see the only real use for "is not" being "is not 100%". "<" and ">" would be more flexible, IMO.
Nevertheless, it´s very nice as it is.
regards
Michael
Nevertheless, it´s very nice as it is.
regards
Michael
Re: Selectable Load/Unload and auto-refit suggestions
Quite possible. In fact, JGR added them when he added the rest of that order. In r1799.michael blunck wrote:would it be possible to have the loading state operators "<" and ">" in addition (or instead of "is not")?
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
Auto-refit PBS bug?
Downgraded to bad thing.
We have another screamie Houston!
With AutoReplace on, a train that is due for replacement goes to the next scheduled depot and the engine gets replaced with an upgrade.
If there is a concurrent AutoRefit order, the train gets the upgrade, exits the depot, goes somewhere to turn around, returns to the depot and gets the refit. A bit convoluted but manageable.
If that depot opens into a PBS signal or a block ending with a PBS signal, the train becomes very shy after the upgrade and refuses to come out of the depot after the upgrade.
The attached zip contains:
- newgrf.cfg
- ttdpatch.cfg (r1818)
- TRP02.SV1 - Save game with Pre-signals
- TRP02.SV1 - Save game with PBS signals
We have another screamie Houston!
With AutoReplace on, a train that is due for replacement goes to the next scheduled depot and the engine gets replaced with an upgrade.
If there is a concurrent AutoRefit order, the train gets the upgrade, exits the depot, goes somewhere to turn around, returns to the depot and gets the refit. A bit convoluted but manageable.
If that depot opens into a PBS signal or a block ending with a PBS signal, the train becomes very shy after the upgrade and refuses to come out of the depot after the upgrade.
The attached zip contains:
- newgrf.cfg
- ttdpatch.cfg (r1818)
- TRP02.SV1 - Save game with Pre-signals
- TRP02.SV1 - Save game with PBS signals
- Attachments
-
- AutoRefit_PBS_Bug.zip
- That missing file
- (221.37 KiB) Downloaded 186 times
Last edited by wallyweb on 24 Jan 2008 15:40, edited 1 time in total.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Auto-refit PBS bug?
No, it doesn't. Or maybe the verb I want there is "isn't". In any case, I don't see it/them.wallyweb wrote:The attached zip contains:
Also, autoreplace or autorenew?
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
Re: Auto-refit PBS bug?
Do you mean the one that's up there now?DaleStan wrote:No, it doesn't. Or maybe the verb I want there is "isn't". In any case, I don't see it/them.
/me makes a mental note... PHPBB3 does not support astral projection.
Both.Also, autoreplace or autorenew?
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Selectable Load/Unload and auto-refit suggestions
That seems to be a bug in autoreplace/autorenew/gotodepot.
The train enters the depot, and gets replaced, then the new train leaves, with the exact same state. Without updating, checking, or processing the orders.
The train enters the depot, and gets replaced, then the new train leaves, with the exact same state. Without updating, checking, or processing the orders.
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
Re: Selectable Load/Unload and auto-refit suggestions
By updating, I assume you mean the refit order. What I find strange is that (without PBS) the train is able to leave the depot without the process jumping to the next order, which in this case would be the refit, yet, without a refit order, the train's order list does jump to the next destination after the autoreplace/autorenewDaleStan wrote:That seems to be a bug in autoreplace/autorenew/gotodepot.
The train enters the depot, and gets replaced, then the new train leaves, with the exact same state. Without updating, checking, or processing the orders.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Selectable Load/Unload and auto-refit suggestions
No, by updating, I mean the goto depot order. The train fails to realize that it went to a depot. If you remove the refit order, the train will still wander off in some random direction and come back to the depot.
With PBS, the train can't find a route back to the depot, so it won't enter the junction at all. Without PBS, the train still can't find a route, but it doesn't care, and makes a blind stab and ends up wandering off somewhere.
With PBS, the train can't find a route back to the depot, so it won't enter the junction at all. Without PBS, the train still can't find a route, but it doesn't care, and makes a blind stab and ends up wandering off somewhere.
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
Re: Selectable Load/Unload and auto-refit suggestions
Wait a minute. If I make up an order list to include a service at depot order, and it comes up when the train is getting old, the train does get replaced/renewed and then it continues on to its next order. The problem only arises if there is a refit order after the service at depot order.DaleStan wrote:If you remove the refit order, the train will still wander off in some random direction and come back to the depot.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Selectable Load/Unload and auto-refit suggestions
Not so. I removed the refit orders from train 2, in the non-PBS version, and watched it go to the depot, get replaced, and proceed to wander until it managed to return to the depot.wallyweb wrote:Wait a minute. If I make up an order list to include a service at depot order, and it comes up when the train is getting old, the train does get replaced/renewed and then it continues on to its next order. The problem only arises if there is a refit order after the service at depot order.DaleStan wrote:If you remove the refit order, the train will still wander off in some random direction and come back to the depot.
Service at depot works, as far as I can tell, but Goto depot does not, with or without a trailing refit order.
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
Re: Selectable Load/Unload and auto-refit suggestions
How long have we had Goto depot without anybody noticing this? I must plead somewhat guilty as I always use Service at Depot. Wait! Goto depot gets a "Stopped" doesn't it? So when the player's work is done, clearing the "Stopped" brings up the next order.DaleStan wrote:Service at depot works, as far as I can tell, but Goto depot does not, with or without a trailing refit order.
*EDIT* My bad! A Goto depot order does not get a "stopped". This only happens if the depot icon in the train window is used.
Last edited by wallyweb on 26 Jan 2008 10:56, edited 1 time in total.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Selectable Load/Unload and auto-refit suggestions
Hey there.
As we have these wonderful options of advanced orders, would it be possible to implement two additional things:
"no load" option: basically an option to tell a train to go to a station, cash in whatever cargo he can deliver, but then, not loading an cargo at this station, even, if the cargo he transports would be available.
and
"no unload" option: With this, you could tell a train to stop at a station, but not to unload any of his cargo, only to load additional ones. This would be particular handy on suburban trains that you want to feed into a central station.
Watcha think?
As we have these wonderful options of advanced orders, would it be possible to implement two additional things:
"no load" option: basically an option to tell a train to go to a station, cash in whatever cargo he can deliver, but then, not loading an cargo at this station, even, if the cargo he transports would be available.
and
"no unload" option: With this, you could tell a train to stop at a station, but not to unload any of his cargo, only to load additional ones. This would be particular handy on suburban trains that you want to feed into a central station.
Watcha think?
*** Ce French Train Set ***
*** Visit my transport related pictures on Flickr ***
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
"A committee is a group of men who individually can do nothing but as a group decide that nothing can be done" (Fred Allen 1894-1956 US radio comic).
*** Visit my transport related pictures on Flickr ***
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
"A committee is a group of men who individually can do nothing but as a group decide that nothing can be done" (Fred Allen 1894-1956 US radio comic).
Re: Selectable Load/Unload and auto-refit suggestions
I daresay that I could implement both of those, however as I am going to be away in the UK from this afternoon until Tuesday, I would only attempt/examine the possibility of that next week or probably more likely next weekend.
It shouldn't be too difficult to implement though.
JGR
It shouldn't be too difficult to implement though.
JGR
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: Selectable Load/Unload and auto-refit suggestions
Both excellent ideas. I would like to suggest a variation on these.The Irish wrote:Hey there. ... "no load" option ... "no unload" option ...
unload n% of [cargo]
load n% of [cargo]
Re my problem posts above, seeing as DaleStan believes the problem to be with the "Goto depot" order, should I continue that discussion here or give it a life of its own in another topic?
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Selectable Load/Unload and auto-refit suggestions
These are wonderful news. Thanks A LOT.JGR wrote:I daresay that I could implement both of those, however as I am going to be away in the UK from this afternoon until Tuesday, I would only attempt/examine the possibility of that next week or probably more likely next weekend.
It shouldn't be too difficult to implement though.
JGR
*** Ce French Train Set ***
*** Visit my transport related pictures on Flickr ***
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
"A committee is a group of men who individually can do nothing but as a group decide that nothing can be done" (Fred Allen 1894-1956 US radio comic).
*** Visit my transport related pictures on Flickr ***
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
"A committee is a group of men who individually can do nothing but as a group decide that nothing can be done" (Fred Allen 1894-1956 US radio comic).
Re: Selectable Load/Unload and auto-refit suggestions
I am having some problems getting this to work.
Loading the order in to veh.currorder fails in gotodepot.asm:newordertarget, as the code somehow later calls the function again with the second word thus overwriting the go to station order with junk, and causing it to balk and load the next order.
I've been spending too long with the debugger and I need to get some actual work done before tomorrow and in the subsequent days
I will post the patch as it stands, as I may have to drop this for a while, and fresher eyes may spot my error(s).
Note I haven't tested the actual load/unload prevention code yet, due to the above bug, and I know that this won't work at all on aircraft.
JGR
Loading the order in to veh.currorder fails in gotodepot.asm:newordertarget, as the code somehow later calls the function again with the second word thus overwriting the go to station order with junk, and causing it to balk and load the next order.
I've been spending too long with the debugger and I need to get some actual work done before tomorrow and in the subsequent days
I will post the patch as it stands, as I may have to drop this for a while, and fresher eyes may spot my error(s).
Note I haven't tested the actual load/unload prevention code yet, due to the above bug, and I know that this won't work at all on aircraft.
JGR
- Attachments
-
- half-noloadunloadadvorder.patch
- (10.06 KiB) Downloaded 177 times
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Who is online
Users browsing this forum: No registered users and 0 guests