Selectable Load/Unload and auto-refit suggestions

Got an idea for a new feature in TTDPatch? Post it here.

Moderator: TTDPatch Moderators

DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Selectable Load/Unload and auto-refit suggestions

Post by DaleStan »

wallyweb wrote: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?
Let's keep it here. Especially if what you want to say is "Yes, it's fixed" and "No, you didn't break anything else in the process." (r1820)

(The PBS junction appears to be an unsafe junction, hence more shyness. There are no reservable tiles between the depot and the two-way signal guarding it. Whether that's how it should be is a matter for Patchman.)

JGR: I hope you didn't have too much trouble figuring out the mess I made of your code. (And, I see, failed to comment.)

EDIT: I think I found the bug: gotodepot.asm:772 increments the order pointer. The order assignment works if I remove that line (and the two preceding ones, since those become pointless), and the calls to (multi)advanceorders do the right thing, instead of usually happening to be lucky.
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
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Selectable Load/Unload and auto-refit suggestions

Post by JGR »

Dalestan:

Thanks for spotting that, I have some free time tonight, so if possible I want to get it finished.
I did not occur to me that that function would be called on every vehicle tick when I originally wrote it...
I have just had a browse through the TTD dump and realised that, (better late than never).

JGR

Edit: Preliminary working version now in trunk.
Ex TTDPatch Coder
Patch Pack, Github
Scautura
Engineer
Engineer
Posts: 102
Joined: 01 Aug 2006 07:30

Re: Selectable Load/Unload and auto-refit suggestions

Post by Scautura »

This is the only post I can find that seems reasonably relevant, so I'm guessing I should post here rather than make a new post since it's related.

With advorders, I setup a train to be able to "Unload Only" at a station (an oil train dropping at a station near to an oil well), the train throws a hissy fit (either goes nowhere, or flips back and forth) and fails miserably to go to where it's told to unload.

I can't post a savegame (I stripped the orders and "faked it" with a normal goto followed by an unload at the same station) currently, but I'll resave with the glitch in place and post it later.

Scautura
Attachments
Demo_newgrfw.cfg
(6.2 KiB) Downloaded 214 times
Demo_ttdpatch.cfg
(36.98 KiB) Downloaded 215 times
Duct tape is like the Force - it has a Dark side, a Light side, and it holds the universe together.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: Selectable Load/Unload and auto-refit suggestions

Post by OzTrans »

Scautura wrote:... to "Unload Only" at a station ...
You may have misunderstood how the advanced order (ctrl-goto) 'Unload Only' works.

Basically, it is a normal order, but the train will not pick up new cargo, it will leave empty. Doing that near oil wells won't work, but it would work near a refinery.

If you want to unload your cargo at a station and leave empty, then have another train pick the load up again, you need to simply set the 'Unload' flag.
Scautura
Engineer
Engineer
Posts: 102
Joined: 01 Aug 2006 07:30

Re: Selectable Load/Unload and auto-refit suggestions

Post by Scautura »

OzTransLtd wrote:...near oil wells...
That's why I want to "Unload Only" - I don't want a train that's dropping off a load at a refinery (where there are also oil wells) to pick up oil to go back to an oil well (where there is no refinery)... Which is also why an "Unload" won't work (feeder service on) on it's own.

I've faked it by doing the following:

1: Goto Station 1 (Full Load)
2: Goto Station 2
3: Goto Station 2 (Unload) [this makes the train return the oil to the station - not an ideal solution, I must admit, but it works]
--- End of Orders ---

I've moved the station so it no longer covers the oil wells, but there's still oil at the station that I don't want to pick up. I'd prefer to just have order 2 being "Goto Station 2 (Unload Only)".

Hope that explains it more explicitly.

Scautura
Duct tape is like the Force - it has a Dark side, a Light side, and it holds the universe together.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: Selectable Load/Unload and auto-refit suggestions

Post by OzTrans »

Scautura wrote: ... Hope that explains it more explicitly. ...
Yes, it does. That is how 'Unload Only' is supposed to work. It works for me with passengers; may be there is something wrong when freight cargo is involved. A saved game may help to find out.
Scautura
Engineer
Engineer
Posts: 102
Joined: 01 Aug 2006 07:30

Re: Selectable Load/Unload and auto-refit suggestions

Post by Scautura »

cfgs as above, savegame below, 2.6r1836 (also tested on 2.6r1832) - look at Train 17 (near Flarnton), it's stuck before going into a tunnel.

Also note I've got reverse at stations and end of line (makes me thing of the flicking back and forth - didn't happen this time though)

I'll be well miffed if it doesn't happen for someone else.
Attachments
TRP16.SV1
(325.28 KiB) Downloaded 211 times
Duct tape is like the Force - it has a Dark side, a Light side, and it holds the universe together.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: Selectable Load/Unload and auto-refit suggestions

Post by OzTrans »

Scautura wrote:... it's stuck before going into a tunnel. ...
... and so is every other train following it. The only thing, that makes them move is, to press depot button or change the advanced order to a normal order.

I tried a few variations, like removing the track above the tunnel, adding a few signals, rebuilding tunnel etc. But trains do refuse to enter the tunnel. Normally, they'd reverse back to the last signal, but it just reverses direction and stops.

I would say this is one for the experts to look at ... it is a bug ...
Scautura
Engineer
Engineer
Posts: 102
Joined: 01 Aug 2006 07:30

Re: Selectable Load/Unload and auto-refit suggestions

Post by Scautura »

OzTransLtd wrote:
Scautura wrote:... it's stuck before going into a tunnel. ...
... and so is every other train following it. The only thing, that makes them move is, to press depot button or change the advanced order to a normal order.

I tried a few variations, like removing the track above the tunnel, adding a few signals, rebuilding tunnel etc. But trains do refuse to enter the tunnel. Normally, they'd reverse back to the last signal, but it just reverses direction and stops.

I would say this is one for the experts to look at ... it is a bug ...
It's not just that train/part of the network - another save, Train 2 (part way into Flarnton - same game, later on) does the flicking back and forth thing, stuck just in the entrance of the station.

With regards to no train entering the tunnel, when the advanced order didn't work and the train got stuck in front of the tunnel, I deleted the order and modified the order list, so I didn't see it happening in trains without advanced orders.

Scautura
Attachments
TRP19.SV1
(336.3 KiB) Downloaded 206 times
Duct tape is like the Force - it has a Dark side, a Light side, and it holds the universe together.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Selectable Load/Unload and auto-refit suggestions

Post by JGR »

I am now looking into this issue...
Thanks for reporting it

JGR

Edit:
Disabling train reversing at stations or neutralising ChkTrainReverseForNewTarget (573136) seems to eliminate the bug, so I will have a poke through the code and probably commit a fix today or tomorrow...
Ex TTDPatch Coder
Patch Pack, Github
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Selectable Load/Unload and auto-refit suggestions

Post by JGR »

This bug is now fixed, see r1845.
Not quite as quick as promised but the bug was quite obscure in nature (at least IMO).

(Double post to draw attention to the commit for those waiting for bug resolution)

JGR
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Selectable Load/Unload and auto-refit suggestions

Post by wallyweb »

The Advanced Orders description exists in the online manual however the manual's downloadable zip only has this link:

Code: Select all

<li class="toclevel"><a href="AdvancedOrders:Alpha.html" class="link" title="Advanced Orders">AdvancedOrders:Alpha</a> - Advanced Orders</li>
"AdvancedOrders:Alpha.html" does not exist in the zip.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Selectable Load/Unload and auto-refit suggestions

Post by DaleStan »

Indeed all the :Alpha pages are missing.
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
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Selectable Load/Unload and auto-refit suggestions

Post by wallyweb »

Well at least there is still something in this can of AlphaGhetti I'm about to open ... erm ... uhoh ... It's empty too. :shock:
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Re: Selectable Load/Unload and auto-refit suggestions

Post by eis_os »

Well windows based systems don't allow : in filenames... so the export script has to be changed to convert : to something platform independent.
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Selectable Load/Unload and auto-refit suggestions

Post by wallyweb »

It's screamie time again.
DaleStan wrote:There are known bugs with ships and aircraft. Some have been fixed in 1812, others I am still working on.
Does this include "Unload only"?

Here is my story ... Patch r2096 ... Applies to default TTDX planes as well as to plane sets. If I build a plane at airport A and give it orders to pick up passengers and mail at airport A and then fly to airport B and "unload only", the plane goes to the terminal at Airport A, loads with whatever is available, then just sits there at the gate while the destination message at the bottom of its window goes blank. It seems the orders freeze when trying to advance to the next step.

Let me know if/what supporting evidence is required.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Selectable Load/Unload and auto-refit suggestions

Post by DaleStan »

At this point, any unfixed "known bugs" are no longer known.

Reproduced, and investigating.

EDIT: I rather suspect this wasn't one of the known bugs fixed in r1813. This could be because Load Only and Unload Only orders didn't exist in r1813.
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
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Selectable Load/Unload and auto-refit suggestions

Post by DaleStan »

2106 should do the trick.

Some interesting things happened in that process. For example, I discovered how to create headwinds that manage to exactly match the plane's airspeed, but in the opposite direction. (Unless you can come up with a better reason for having planes come to a screeching halt in mid-air?)
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
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Selectable Load/Unload and auto-refit suggestions

Post by wallyweb »

DaleStan wrote:(Unless you can come up with a better reason for having planes come to a screeching halt in mid-air?)
Ooops! :oops: My bad ... The pilot was refusing to leave the gate until we got him one of these. Unfortunately, we sent him the wrong one which explains the lack of headway when he took the wrong heading when heading towards LAX.

PS ... Thanks for the quick response. :D

PS#2 ... The pilot sends his compliments. He made it home for supper. :D
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Advanced Orders Sugestion

Post by wallyweb »

Add/drop a pusher/helper engine
Real life scenario:
A fast freight is highballing across the prairies. The engine is geared for speed but not for long grades.
The train arrives at the foot of a long grade where it stops at a siding. A powerful pusher/helper engine comes out of an adjacent siding and connects to the back of the fast freight.
The train climbs up the grade at a slower but still reasonable speed.
At the top of the grade, the train pulls up at a siding and the pusher/helper engine drops off to await a returning train, perhaps to assist with braking on the downslope trip.

TTDPatch adaptation:
The player sends the train to the depot and control+click purchases the desired pusher/helper engine
The player sends the train to the second depot and sells the pusher/helper engine.
Disadvantage: The player must monitor the train for the appropriate time to send the train to the depot.
Current Advanced Orders TTDPatch adaptation:
The player gives the train a set of Goto Depot orders, but the player must still monitor the train in order to buy/sell the pusher/helper engine.
In both these adaptations, the player can preposition a pusher/helper engine with a control+click purchase and avoid the need for repetitive buy/sell transactions, but the player must still monitor the train in order to add/drop the pusher/helper engine.

Suggestion: Add an Advanced Order function that adds/drops a prepositioned pusher/helper engine to the consist.
Some considerations:
- Articulated engines (steamer + tender) are usually treated as one item in the purchase window. Is this a concern for this suggestion?
- What if the player prepositions more than one pusher/helper engine? Can a parameter be added to specify the addition/dropping of one or more engines?
- What if a pusher/helper engine is not currently available (It's already helping another train)? Can the current train be made to await the availability of a pusher/helper engine to be dropped off by a returning train?

EDIT: With sincerest apologies to Pikkabird for the inadvertent blatant theft of his original idea for "Helpers/Bankers" and a thank you to Michael Blunck for pointing this out to me.

EDIT Please also see the related discussion under OTTD.
Last edited by wallyweb on 04 Mar 2010 12:39, edited 3 times in total.
Post Reply

Return to “Suggestions”

Who is online

Users browsing this forum: No registered users and 13 guests