Page 3 of 4

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 04 Feb 2008 07:10
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.

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 04 Feb 2008 16:43
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.

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 13 Mar 2008 17:39
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

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 13 Mar 2008 19:05
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.

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 13 Mar 2008 20:23
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

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 13 Mar 2008 20:38
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.

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 13 Mar 2008 21:01
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.

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 13 Mar 2008 21:38
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 ...

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 13 Mar 2008 22:14
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

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 13 Mar 2008 22:37
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...

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 18 Mar 2008 18:32
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

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 08 Apr 2008 08:50
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.

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 08 Apr 2008 14:14
by DaleStan
Indeed all the :Alpha pages are missing.

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 08 Apr 2008 14:33
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:

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 11 Apr 2008 11:08
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.

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 29 Apr 2009 14:23
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.

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 29 Apr 2009 15:03
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.

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 30 Apr 2009 06:51
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?)

Re: Selectable Load/Unload and auto-refit suggestions

Posted: 30 Apr 2009 11:13
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

Advanced Orders Sugestion

Posted: 21 Feb 2010 02:59
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.