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
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

JGR wrote:
Redirect Left wrote:Nice work. Finally got around to installing it and having a good play with it.

A do find a few things trigger slow downs though. If you have a train that has a lot of destinations, opening its window will slow down. If you have a train that has endless repeats / implicit orders due to a routing error, it can make fixing them quite a horrendous task due to the FPS drop when you open up the train vehicle window.
Not sure you can do anything about this, unless you can make a train exempt from displaying the info that seems to drain the cycles if the train has > X orders? It's whenever the game loads the station info.
The attached screenshot hopefully makes it clear what I mean. This is one of those times where it has managed to amass a load of implicits due to an error in routing (I assume). at time this was taken, FPS was roughly 2-3 per second (ouch)
I never use implicit orders so hadn't encountered this issue. Probably the simplest solution would be to just not display route markers/lines for implicit orders.

More generally if using implicit orders results in excessively long order lists like that it suggests that something is wrong with the mechanism for implicit orders. I'm not sure what to do about that though.

In the meantime, if you can send/upload a savegame which has the train in question I'll see if something can be done about the performance issue.
Do you use non-stop for your explicit orders? That will prevent your train from making implicit stops which are added to your train's orders. You can set this in each train's order window or you can set it globally in the company section of the settings window.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

wallyweb wrote:Do you use non-stop for your explicit orders? That will prevent your train from making implicit stops which are added to your train's orders. You can set this in each train's order window or you can set it globally in the company section of the settings window.
Yes I've always had non-stop orders on by default. I'm not a fan of orders without the non-stop flag and implicit orders and so don't use them.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

JGR wrote:
wallyweb wrote:Do you use non-stop for your explicit orders? That will prevent your train from making implicit stops which are added to your train's orders. You can set this in each train's order window or you can set it globally in the company section of the settings window.
Yes I've always had non-stop orders on by default. I'm not a fan of orders without the non-stop flag and implicit orders and so don't use them.
I as well and exactly for Redirect Left's problem.
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 »

I usually just select the first and end destination, and let the train find its own way and add the middle stations itselves.. I only select middle destinations if there is a realistic alternative route the pathfinder could send it on at a junction.
Usually when this happens, the implicits don't add up endlessly. I've never figured out why they do sometimes pile up, i've always assumed pathfinder struggling and just repeating. I've got trains that run for thousands of years that never pile up implicits and just keep say the (example) 2 implicits between start and finish.

If it occurs again, i'll snatch a savegame if it'll help. I've resolved all the current endless implicits.
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 »

it could be that at trips to depot it could skip stations, or you forgot to consider an alternate route
User avatar
YSH
Engineer
Engineer
Posts: 101
Joined: 15 Jan 2008 15:05

Re: JGR's Patch Pack

Post by YSH »

I don't know if this code is affected by your patch pack, but I thought I'd be best to post about it here before annoying the trunk developers.

As you can see in the screenshot, I have a bit of a lighthouse epidemic. Clearly they like rugged little island on the edge of the map a little bit too much.
Attachments
Heerhugellum Transport, 1 Mei 1937.png
(204.24 KiB) Not downloaded yet
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

YSH wrote:I don't know if this code is affected by your patch pack, but I thought I'd be best to post about it here before annoying the trunk developers.

As you can see in the screenshot, I have a bit of a lighthouse epidemic. Clearly they like rugged little island on the edge of the map a little bit too much.
This isn't something that I've observed before, and I don't believe that I've changed anything related to NewGRF/map objects.
I'll take a closer look soon, thanks for reporting the issue.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
cirdan
Director
Director
Posts: 539
Joined: 07 Apr 2007 18:08

Re: JGR's Patch Pack

Post by cirdan »

YSH wrote:I don't know if this code is affected by your patch pack, but I thought I'd be best to post about it here before annoying the trunk developers.

As you can see in the screenshot, I have a bit of a lighthouse epidemic. Clearly they like rugged little island on the edge of the map a little bit too much.
This can happen in openttd trunk, too, under certain circumstances. The number of lighthouses created during map generation is proportional to map size. If the map is large but there are few spots suitable for lighthouses (they must be on land near the map edge), they tend to bunch up at those possible locations.
Wahazar
Tycoon
Tycoon
Posts: 1451
Joined: 18 Jan 2014 18:10

Re: JGR's Patch Pack

Post by Wahazar »

Is it possible to freeze vehicle running costs, if vehicle stay in depot?
With new station orders patch, timetable for depot patch and vehicle repairs cost patch, there should be no additional running costs for vehicle stopped in depot, regardless if stopped manually, by timetable or conditional station order.

shortly: I propose to disable counting running costs, if vehicle is inside depot and repair costs are turned on.

BTW, 'go do station if cargo accepted' is awesome tool in case of ECS.
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

McZapkie wrote:Is it possible to freeze vehicle running costs, if vehicle stay in depot?
With new station orders patch, timetable for depot patch and vehicle repairs cost patch, there should be no additional running costs for vehicle stopped in depot, regardless if stopped manually, by timetable or conditional station order.

shortly: I propose to disable counting running costs, if vehicle is inside depot and repair costs are turned on.

BTW, 'go do station if cargo accepted' is awesome tool in case of ECS.
GRFs already control running costs when stopped. I don't see that it's necessary to override them on this.
Ex TTDPatch Coder
Patch Pack, Github
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: JGR's Patch Pack

Post by Eddi »

i don't know what patches you run, but the unpatched game sets running costs for stopped trains to 0 (as in shows a red flag/blob, not trains that just have a speed of zero)
tlpwka
Engineer
Engineer
Posts: 16
Joined: 09 Feb 2015 17:12

Re: JGR's Patch Pack

Post by tlpwka »

Hello,
A problem with game crash is resolved, thank you!

There is something weird about departure board, long-distance trains always shown as "Delayed". I'v tried different configurations - autoseparation, autoseparation+automate timetable, only automate timetable.

For short distance train it's seems to be a rare thing.

Here is save game (with ngrf):
https://www.dropbox.com/s/go18wiwbbamnq ... 9.rar?dl=0
Attachments
2016-10-16_12-50-28.png
(42.05 KiB) Not downloaded yet
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

tlpwka wrote:Hello,
A problem with game crash is resolved, thank you!

There is something weird about departure board, long-distance trains always shown as "Delayed". I'v tried different configurations - autoseparation, autoseparation+automate timetable, only automate timetable.

For short distance train it's seems to be a rare thing.

Here is save game (with ngrf):
https://www.dropbox.com/s/go18wiwbbamnq ... 9.rar?dl=0
Having a quick look at it, the NYC-MIA trains haven't started their timetables yet, presumably as the timetable mode was recently changed.
The NYC-CHG train is running late. As it left on time and there are no waypoints or other timetable points en route it can't predict how late it will arrive though.
In general having both enabled is what you want. You may want to disable one but not the other if you're doing semi-manual or clock-face timetabling or have some other form of advanced setup.
You'll most likely want to disable both if you are using full-load orders or any form of conditional orders.
Ex TTDPatch Coder
Patch Pack, Github
mrjack2
Engineer
Engineer
Posts: 74
Joined: 21 Jan 2016 23:04

Re: JGR's Patch Pack

Post by mrjack2 »

Hi JGR, are there any known bugs between Cargodist and daylength factors here? Because running a daylength factor here, Cargodist simply isn't sending cargo down new links. I have a savegame attached: a simple way to reproduce this would be to set up a passenger route between two towns and see if anyone ever uses it ( I get it staying white forever). The only fix seems to be to turn cargodist off and then on again. So some process in Cargodist seems to be not running.


Edit: Aha, turning "do not scale linkgraph days by the daylength factor" on seems to fix it. But it definitely wasn't just a matter of it taking 5 times longer than usual to update linkgraph!
Attachments
Island Game.sav
(256.22 KiB) Downloaded 63 times
SkullKrixzz
Engineer
Engineer
Posts: 26
Joined: 31 Oct 2014 18:24
Location: London, Ontario

Re: JGR's Patch Pack

Post by SkullKrixzz »

JGR wrote:
SkullKrixzz wrote:1: road speed limits
This is something that has been asked for a few times, I'm planning to look into it at some point.
SkullKrixzz wrote:2 random road construction
This looks quite interesting, and seems an easy pick to merge, may give this one a try.
SkullKrixzz wrote:mossy tracks
I'm not really sold on this one TBH, graphically it looks a bit dodgy to me and has some odd corner cases, and it uses up map bits which could be more usefully allocated to other things.
i have been away for a while so sorry im a bit behind on everything :P but thanks for considering these, and ya the mossy tracks might be abit glitchy and stuff, but at the same time do have a pretty good use tho, i have run hardpack patch for a while before and because the tracks got mossy helped me fix some issues with my lines. but it is your pack so you do have final say, i would more rather the other two anyways....
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

mrjack2 wrote:Hi JGR, are there any known bugs between Cargodist and daylength factors here? Because running a daylength factor here, Cargodist simply isn't sending cargo down new links. I have a savegame attached: a simple way to reproduce this would be to set up a passenger route between two towns and see if anyone ever uses it ( I get it staying white forever). The only fix seems to be to turn cargodist off and then on again. So some process in Cargodist seems to be not running.


Edit: Aha, turning "do not scale linkgraph days by the daylength factor" on seems to fix it. But it definitely wasn't just a matter of it taking 5 times longer than usual to update linkgraph!
I did some testing and cargo is routed on new links if you are patient enough. Part of the problem is that you have a highly disconnected network.
In your game link graphs are recalculated every 4 days, and you have around 108 link graphs, so an individual link graph is recalculated about every 432 days. So on average you'll have to wait around half that time for a link to be processed. Turning on "do not scale linkgraph days by the daylength factor" reduces that time by 5, but doesn't otherwise make any difference that I could find.
Perhaps I'll have a look and see if I can come up with a better way of scheduling link graph updates when there's a large number of small graphs.
SkullKrixzz wrote:i have been away for a while so sorry im a bit behind on everything :P but thanks for considering these, and ya the mossy tracks might be abit glitchy and stuff, but at the same time do have a pretty good use tho, i have run hardpack patch for a while before and because the tracks got mossy helped me fix some issues with my lines. but it is your pack so you do have final say, i would more rather the other two anyways....
Random road re-construction is done already, there's a setting for it. Town road speed limits is on my to-do list, I've just been a bit busy with RL and such of late.
Ex TTDPatch Coder
Patch Pack, Github
mrjack2
Engineer
Engineer
Posts: 74
Joined: 21 Jan 2016 23:04

Re: JGR's Patch Pack

Post by mrjack2 »

JGR wrote:
mrjack2 wrote:Hi JGR, are there any known bugs between Cargodist and daylength factors here? Because running a daylength factor here, Cargodist simply isn't sending cargo down new links. I have a savegame attached: a simple way to reproduce this would be to set up a passenger route between two towns and see if anyone ever uses it ( I get it staying white forever). The only fix seems to be to turn cargodist off and then on again. So some process in Cargodist seems to be not running.


Edit: Aha, turning "do not scale linkgraph days by the daylength factor" on seems to fix it. But it definitely wasn't just a matter of it taking 5 times longer than usual to update linkgraph!
I did some testing and cargo is routed on new links if you are patient enough. Part of the problem is that you have a highly disconnected network.
In your game link graphs are recalculated every 4 days, and you have around 108 link graphs, so an individual link graph is recalculated about every 432 days. So on average you'll have to wait around half that time for a link to be processed. Turning on "do not scale linkgraph days by the daylength factor" reduces that time by 5, but doesn't otherwise make any difference that I could find.
Perhaps I'll have a look and see if I can come up with a better way of scheduling link graph updates when there's a large number of small graphs.
Ah, that makes sense! I guess I can turn the number of days down further if I want, and then once I connect passenger networks together later, I can turn it back up to avoid lag.
b1tm4rx1st
Engineer
Engineer
Posts: 19
Joined: 25 Mar 2016 01:26
Location: Netherlands....

Re: JGR's Patch Pack

Post by b1tm4rx1st »

Looks like the custom houses mod doesnt work in this patch...
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

b1tm4rx1st wrote:Looks like the custom houses mod doesnt work in this patch...
Works fine here, can you be more specific about what doesn't work for you?
Ex TTDPatch Coder
Patch Pack, Github
User avatar
openbu.org
Engineer
Engineer
Posts: 74
Joined: 14 Nov 2014 07:40
Location: USA
Contact:

Re: JGR's Patch Pack

Post by openbu.org »

Settings,House_zones
BTW,IMO,The mayor(in-game) love House_zones,But,I dislike.
Attachments
Clipboard01.jpg
Clipboard01.jpg (34.01 KiB) Viewed 2299 times
Clipboard02.jpg
Clipboard02.jpg (403.99 KiB) Viewed 894 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 10 guests