JGR's Patch Pack

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7238
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left »

If you select "Send to Depot & Sell" when you're in the 'shared orders' tab, this will execute successfully. However, any units that were already in a depot will not be sold within the depot they're already in. Is this something that can be altered so it also affects units in a depot already?
Note: I waited for 1 full game year, on fast forward, to see if it would sell them later on in a function that checks periodically, that also did not happen.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: JGR's Patch Pack

Post by Eddi »

note that everything related to servicing happens when entering the depot, things that are already inside the depot don't enter it.

with a bit of luck, the function you are trying to run also happens on leaving the depot.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Redirect Left wrote: 25 Jun 2022 02:15 If you select "Send to Depot & Sell" when you're in the 'shared orders' tab, this will execute successfully. However, any units that were already in a depot will not be sold within the depot they're already in. Is this something that can be altered so it also affects units in a depot already?
Note: I waited for 1 full game year, on fast forward, to see if it would sell them later on in a function that checks periodically, that also did not happen.
Vehicles already in a depot will presumably not have their current order as a go to depot for the depot where they already are.
If you did arrange for a vehicle in a depot to have its current order as a go to depot and sell for the depot it is already in, then it would be sold immediately instead of leaving the depot and trying to return to be sold.
It wouldn't make sense for an order to take effect when it is not the vehicle's current order.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
MasterMeNL
Engineer
Engineer
Posts: 86
Joined: 12 Oct 2012 17:16
Location: Netherlands

Re: JGR's Patch Pack

Post by MasterMeNL »

Hi,

I'm having some troubles with the road vehicle (bus and tram) depot's vehicle list "move order to another depot" feature. With NewGRFs Road Hog 1.4.1 with U&RaTT 0.7a it appears the custom road type depots are not handled as actual depots somehow, meaning the orders cannot be moved. It does nothing when clicking and does not show the white selection square either on the tile.

Without any NewGRF loaded it does work properly, so I'm thinking it's caused by custom road/tram track types. Ships, aircraft and trains works well. I also tested train depots with U&ReRMM 2 and that works fine too (for types tested anyway). Do you have an idea what could be causing this?

Thanks!
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

MasterMeNL wrote: 25 Jun 2022 13:51 Hi,

I'm having some troubles with the road vehicle (bus and tram) depot's vehicle list "move order to another depot" feature. With NewGRFs Road Hog 1.4.1 with U&RaTT 0.7a it appears the custom road type depots are not handled as actual depots somehow, meaning the orders cannot be moved. It does nothing when clicking and does not show the white selection square either on the tile.

Without any NewGRF loaded it does work properly, so I'm thinking it's caused by custom road/tram track types. Ships, aircraft and trains works well. I also tested train depots with U&ReRMM 2 and that works fine too (for types tested anyway). Do you have an idea what could be causing this?

Thanks!
Thanks for reporting this. It is now fixed and will be in the next release.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7238
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left »

JGR wrote: 25 Jun 2022 11:15 It wouldn't make sense for an order to take effect when it is not the vehicle's current order.
Would it be possible in that instance that anything not in a depot is told to go to a depot and be sold, and if its already in a depot and affected by the mass go to x and be sold it just issues a straight up sell command instead? That gets around being told to go to what its already in?
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Redirect Left wrote: 25 Jun 2022 18:24
JGR wrote: 25 Jun 2022 11:15 It wouldn't make sense for an order to take effect when it is not the vehicle's current order.
Would it be possible in that instance that anything not in a depot is told to go to a depot and be sold, and if its already in a depot and affected by the mass go to x and be sold it just issues a straight up sell command instead? That gets around being told to go to what its already in?
I think I misunderstood what you were asking before. Using the send to depot and sell command from the manage vehicle dropdown does make sense in that context. I thought you were talking about the order.
It should not be too difficult to make that work.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7238
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left »

JGR wrote: 25 Jun 2022 19:03
Redirect Left wrote: 25 Jun 2022 18:24
JGR wrote: 25 Jun 2022 11:15 It wouldn't make sense for an order to take effect when it is not the vehicle's current order.
Would it be possible in that instance that anything not in a depot is told to go to a depot and be sold, and if its already in a depot and affected by the mass go to x and be sold it just issues a straight up sell command instead? That gets around being told to go to what its already in?
I think I misunderstood what you were asking before. Using the send to depot and sell command from the manage vehicle dropdown does make sense in that context. I thought you were talking about the order.
It should not be too difficult to make that work.
To be fair I did read your comment like "...huh", I just assumed you'd been distracted so weren't wording things as precisely as normal! But yeah, that is what I was describing, my apologies if I didn't make it very clear originally, how send to depot & sell on vehicle manage ignores any vehicles already in a depot, so you're left with orphans.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Redirect Left wrote: 25 Jun 2022 19:29 To be fair I did read your comment like "...huh", I just assumed you'd been distracted so weren't wording things as precisely as normal! But yeah, that is what I was describing, my apologies if I didn't make it very clear originally, how send to depot & sell on vehicle manage ignores any vehicles already in a depot, so you're left with orphans.
Sorry about that, I don't use that part of the interface very often so it wasn't fresh in my mind.
That is implemented now, it'll be in the next release.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
MasterMeNL
Engineer
Engineer
Posts: 86
Joined: 12 Oct 2012 17:16
Location: Netherlands

Re: JGR's Patch Pack

Post by MasterMeNL »

Hi again,

Thanks a lot for the quick fix! Today while playing I was thinking of some things related to group management in the vehicle list UI, which are possibly very easy to implement.

Normally when viewing vehicle lists of any kind (global, shared order, station/depot, etc) the vehicle's group is shown above the vehicle sprite itself, like so:
Screenshot_20220626_170133.png
Screenshot_20220626_170133.png (9.84 KiB) Viewed 2706 times
1. Would it be possible to include all parent groups instead of only the most inner group the vehicle is part of? I'm thinking some basic string concat with slash like "Group / Subgroup / Subsubgroup" should be perfectly natural.

2. When using "Group by" with "Shared orders" the group name disappears. I realise that technically speaking shared orders may not all be in the same group, but I think for most people groups are used that way. Would it be possible to display the first vehicle's group with this "Group by" filter option? (You could also loop over all vehicles to verify their group is the same and only display then, but that is possibly quite some work for questionable value.)

This would make group management on companies with hundreds of vehicles with dozens of (often nested) groups much nicer to work with.

Thanks!
p4nzer
Engineer
Engineer
Posts: 31
Joined: 27 Jun 2017 21:43

Re: JGR's Patch Pack

Post by p4nzer »

Got back into this game after a break and I've been really enjoying the latest updates! I've been an avid JGRPP user for years now and the concepts these patches enabled me to explore played no small role in me becoming a professional transportation planner 🙂

I have a question about expected behavior for the new-ish multiple dispatch features. I'm trying to use it to run services that only travel to a depot in the nighttime and operate in passenger service during the day. My implementation is to dispatch the trains from the depot in the early morning, then use the first station on the route as the dispatch stop for the train services. Then in order to get the trains back to the depot, I use time-based conditional orders. This works fine except for three issues:

1. The time-based conditional orders need to be updated if the service span ever changes. This is clunky and it seems like a better solution could be found - perhaps a condition could be set that relates to the dispatch schedules? Something like "Jump to order X when no more scheduled departures."
2. The departure boards don't know how to handle conditional orders. This makes sense, but in cases where the outcome of the conditional can be predicted in advance, it makes sense to do so.
3. Conditionals are evaluated after load orders, which means that in some cases, the train stops at what should be its final station but returns to the depot still full of passengers.

Is there a better way to do what I'm trying to do? Example:

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

Re: JGR's Patch Pack

Post by JGR »

MasterMeNL wrote: 26 Jun 2022 15:11 1. Would it be possible to include all parent groups instead of only the most inner group the vehicle is part of? I'm thinking some basic string concat with slash like "Group / Subgroup / Subsubgroup" should be perfectly natural.
I've added a setting for this.
MasterMeNL wrote: 26 Jun 2022 15:11 2. When using "Group by" with "Shared orders" the group name disappears. I realise that technically speaking shared orders may not all be in the same group, but I think for most people groups are used that way. Would it be possible to display the first vehicle's group with this "Group by" filter option? (You could also loop over all vehicles to verify their group is the same and only display then, but that is possibly quite some work for questionable value.)
This is implemented now. Checking that all of the vehicles are in the same group is easy, so that part is included.
p4nzer wrote: 27 Jun 2022 23:06 1. The time-based conditional orders need to be updated if the service span ever changes. This is clunky and it seems like a better solution could be found - perhaps a condition could be set that relates to the dispatch schedules? Something like "Jump to order X when no more scheduled departures."
Something along these lines should be possible.
p4nzer wrote: 27 Jun 2022 23:06 2. The departure boards don't know how to handle conditional orders. This makes sense, but in cases where the outcome of the conditional can be predicted in advance, it makes sense to do so.
The departure boards can follow unconditional and time-based conditional orders.
There is a setting to control how to handle the other (unpredictable) types.
p4nzer wrote: 27 Jun 2022 23:06 3. Conditionals are evaluated after load orders, which means that in some cases, the train stops at what should be its final station but returns to the depot still full of passengers.
You could use an order sequence: unload and leave empty, conditional branch, load with attached scheduled dispatch.
If the unload and leave empty and load orders are for the same station, the train need not leave and return.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
MasterMeNL
Engineer
Engineer
Posts: 86
Joined: 12 Oct 2012 17:16
Location: Netherlands

Re: JGR's Patch Pack

Post by MasterMeNL »

Thanks again for the quick additions! Looking forward to the next release.
TransportFanMar
Engineer
Engineer
Posts: 9
Joined: 16 Dec 2021 12:02

Re: JGR's Patch Pack

Post by TransportFanMar »

Can we add a patch for different speed limit on one-way and two-way roads as well as in and out of towns (compatible with NRT)? Similar to viewtopic.php?t=35402
gravelpit
Traffic Manager
Traffic Manager
Posts: 200
Joined: 26 Feb 2015 14:49
Location: Poland

Re: JGR's Patch Pack

Post by gravelpit »

Hello, I have a problem with the latest jgrpp 0.48.0 update
the point is that when I play on ECS, I have a problem with the mapping settings, I can not set up many companies, for example bricks works or a steel plant
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7238
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left »

When you zoom out, the tunnels stop being dashed lines and become thick black ones. Is it possible to make sure it maintains that dashed effect, either that or actually place the trains in the tunnels instead of a thick black empty looking line? I keep looking at this and going "oh no, where's my trains!" when its just a long tunnel avoiding Coventry (insert joke about Coventry here). You can see in this image a train is about go into the tunnel, and there are trains in the tunnel, but they're invisible due to tunnel.
When you're closer you can see the train shadows in the tunnel, and slightly zoomed out its a dash lined so you know to not panic if you don't see anything on it as its underground. But at this zoom, its just a big black line of nothing :(
2022-07-13 23_12_46-OpenTTD jgrpp-0.48.0.png
2022-07-13 23_12_46-OpenTTD jgrpp-0.48.0.png (45.79 KiB) Viewed 1976 times
Last edited by Redirect Left on 13 Jul 2022 23:57, edited 1 time in total.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1675
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

Road stop var-act2 0x50 [One-way road information] has incorrect values for road-stop view 04; i.e northbound is 2 should be 1 and southbound is 1 should be 2. For road-stop view 05 values are correct.
Attachments
Road Stop [var 0x50].png
Road Stop [var 0x50].png (7.79 KiB) Viewed 1968 times
gravelpit
Traffic Manager
Traffic Manager
Posts: 200
Joined: 26 Feb 2015 14:49
Location: Poland

Re: JGR's Patch Pack

Post by gravelpit »

gravelpit wrote: 12 Jul 2022 11:14 Hello, I have a problem with the latest jgrpp 0.48.0 update
the point is that when I play on ECS, I have a problem with the mapping settings, I can not set up many companies, for example bricks works or a steel plant
In version 0.47.0 I do not have such a problem with the ECS add-on, can anyone tell me what has changed in version 0.48.0 regarding the creation of a new map
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: JGR's Patch Pack

Post by Eddi »

most likely it's a change in your newgrf setup (like, order of GRFs), not a change in the game.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

gravelpit wrote: 12 Jul 2022 11:14 Hello, I have a problem with the latest jgrpp 0.48.0 update
the point is that when I play on ECS, I have a problem with the mapping settings, I can not set up many companies, for example bricks works or a steel plant
This is fixed now, it'll be in the next release.
OzTrans wrote: 13 Jul 2022 23:46 Road stop var-act2 0x50 [One-way road information] has incorrect values for road-stop view 04; i.e northbound is 2 should be 1 and southbound is 1 should be 2. For road-stop view 05 values are correct.
I've updated the documentation, it should match the actual behaviour now. Thanks for letting me know about this.
Redirect Left wrote: 13 Jul 2022 22:15 When you zoom out, the tunnels stop being dashed lines and become thick black ones. Is it possible to make sure it maintains that dashed effect, either that or actually place the trains in the tunnels instead of a thick black empty looking line? I keep looking at this and going "oh no, where's my trains!" when its just a long tunnel avoiding Coventry (insert joke about Coventry here). You can see in this image a train is about go into the tunnel, and there are trains in the tunnel, but they're invisible due to tunnel.
When you're closer you can see the train shadows in the tunnel, and slightly zoomed out its a dash lined so you know to not panic if you don't see anything on it as its underground. But at this zoom, its just a big black line of nothing :(
I've made an adjustment so it should look a bit better now. It'll be in the next release.
Ex TTDPatch Coder
Patch Pack, Github
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 12 guests