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
einsteinyh
Engineer
Engineer
Posts: 46
Joined: 15 Feb 2016 01:22
Location: Bogotá

Re: JGR's Patch Pack

Post by einsteinyh »

JGR wrote:
einsteinyh wrote:Signals in Tunnels are not workingin v0.12.1 unless you place a signal after stations and before tunnels. In 0.12.0 they worked without any additional signal.
Can you be more specific about what you mean by "not working"?
There have been no signals on bridges/tunnels changes between v0.12.0 and v0.12.1 (there is an unrelated change for the next release though).
I haven't been able to get your savegame to work yet as it uses 15 GRFs which aren't available on bananas, most importantly including the train sets, can you provide a link or send me a copy?
I'm sorry :oops: , I didn't remember the amount of GRFs I played with; This is a test savegame without any GRF but with the same rail layout I generally use with metro GRFs. It was tested on v0.13.0 and configuration of signals in tunnels was set up in every 2 squares.
One-way roads indicate direction of each tunnel that I want you to focus on. The tunnel under the road surrounded by owned tiles only allows the entrance of 1 train at a time, when it could easily host 3 or 4 depending on the configuration (also tried adjusting the signals to 1 tile).
In a large underground network happened frequently; this was what I meant with "signals were not working".
I didn't do tests with route based signals, it would be appropriate doing them despite diminishing a lot the capacity of the intersection.
I really thank you for implementing PBSignals because it cured a huge headache I had on my first attempts of creating underground networks :bow: :bow:
Attachments
Mariano Transport, 2 Abr 2000.sav
(16.15 KiB) Downloaded 48 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

vazoun51 wrote:Eddi and JGR you are absolutely right. I just don't understand the way that bank bookkeeping is modified to be equivalent to vehicle bookkeping. When i add up all sums from group info it makes much more then revenues in my balance sheet. If it would be really calculated the way Eddi wrote, it should be the same. It doesn't matter if the whole income is assigned to one vehicle or it is divided between more of them. The amount of money is still the same. But i'm afraid that portion of money assigned to the transfer vehicle is added to the group info sum as well as the whole sum after delivery. These same sums you can see in yellow and green floating on your screen above the vehicle. Thus percentage assigned to the transfer vehicles is added twice to group info sums. That explains why group info says my road vehicles earned 27 mil. last year but balance sheet says just 7 mil. I use them as feeders for trains and much of their income is "imagined" as you wrote Eddi.
I had another look at the code and found what looks suspiciously like a merging/forward porting bug on my part which may be the cause of the discrepancy. I will do some testing...
Edit: After fixing the bug, the group and finance windows match up with each other again, this will be in the next release. Thanks for raising this issue.
einsteinyh wrote:I'm sorry :oops: , I didn't remember the amount of GRFs I played with; This is a test savegame without any GRF but with the same rail layout I generally use with metro GRFs. It was tested on v0.13.0 and configuration of signals in tunnels was set up in every 2 squares.
One-way roads indicate direction of each tunnel that I want you to focus on. The tunnel under the road surrounded by owned tiles only allows the entrance of 1 train at a time, when it could easily host 3 or 4 depending on the configuration (also tried adjusting the signals to 1 tile).
In a large underground network happened frequently; this was what I meant with "signals were not working".
I didn't do tests with route based signals, it would be appropriate doing them despite diminishing a lot the capacity of the intersection.
I really thank you for implementing PBSignals because it cured a huge headache I had on my first attempts of creating underground networks :bow: :bow:
If you change the tunnel exit signal of the tunnel behind the one where the issue is from PBS to block (see screenshot), or remove the adjacent station tile, the problem goes away. This is probably due to some special handling of PBS with stations, I will investigate further. Thanks for reporting this.
Edit: If trains are run through the station non-stop, the problem also goes away.
Edit 2: Written a fix for this, will be in the next release.
Attachments
Screenshot_2016-04-28_19-19-41.png
Screenshot_2016-04-28_19-19-41.png (43.75 KiB) Viewed 3292 times
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 »

vazoun51 wrote:When i add up all sums from group info it makes much more then revenues in my balance sheet. If it would be really calculated the way Eddi wrote, it should be the same.
well, not entirely, because if a transfer happens in one year, and the final delivery in the next year, the numbers can diverge.

also, some transfers have probably happened where the final delivery is still in the future.
AkipTsaqif
Engineer
Engineer
Posts: 21
Joined: 28 Apr 2016 11:11

Re: JGR's Patch Pack

Post by AkipTsaqif »

AkipTsaqif wrote:Hi JGR.

I have a problem with your latest patch pack (v0.13). Whenever I created desert map (neither a new game nor scenario editor), it doesn't have any highlands anymore (the one with grasses and trees).

Is this ok? I don't like it because it makes me harder to grow cities.

Thanks :) .
So, no answer for me? :cry:
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

AkipTsaqif wrote: So, no answer for me? :cry:
Sorry, forgot about this post. You should try adjusting the settings and/or the random seed you use when creating the map. There aren't any changes relative to trunk to do with desert terrain distribution that I'm aware of.
Ex TTDPatch Coder
Patch Pack, Github
AkipTsaqif
Engineer
Engineer
Posts: 21
Joined: 28 Apr 2016 11:11

Re: JGR's Patch Pack

Post by AkipTsaqif »

JGR wrote:
AkipTsaqif wrote: So, no answer for me? :cry:
Sorry, forgot about this post. You should try adjusting the settings and/or the random seed you use when creating the map. There aren't any changes relative to trunk to do with desert terrain distribution that I'm aware of.
Thanks. I guess I've found the culprit. I've set the max map height to 15 and it's back. I didn't know that this setting affects the height of grassy land in desert.

Thanks again. :D
Davie_UCF
Traffic Manager
Traffic Manager
Posts: 155
Joined: 11 Sep 2004 19:55
Location: Colchester, Essex, United Kingdom

Re: JGR's Patch Pack

Post by Davie_UCF »

Hi, a question regarding the timetable autoseparation.

How come I can't use both autoseparation and manual timetables? The start date button is greyed out so I can't set up timetables for some vehicles but use autoseparation for others?

Thanks
East of England/East Anglia scenario/map released!! http://www.tt-forums.net/viewtopic.php?p=205440#205440
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Davie_UCF wrote:Hi, a question regarding the timetable autoseparation.

How come I can't use both autoseparation and manual timetables? The start date button is greyed out so I can't set up timetables for some vehicles but use autoseparation for others?

Thanks
At the moment there isn't a per-vehicle setting for auto-separation, it's either on or off for all vehicles.
This is as implemented in the original patch, I've not had a reason to change it.
Ex TTDPatch Coder
Patch Pack, Github
Davie_UCF
Traffic Manager
Traffic Manager
Posts: 155
Joined: 11 Sep 2004 19:55
Location: Colchester, Essex, United Kingdom

Re: JGR's Patch Pack

Post by Davie_UCF »

Can I ask about the day length patch?
What does it modify exactly?

I noticed some strange problems with it when using timetables. I've got it set to show time instead of days and using vehicle separation (CTRL+Click on start date) but sometimes if I want to put in say, start date as 0552 when its entered it shows as 0553 on the timetable. If I set day length back to 1, it enters fine. Also if I get one timetable right, say my trains leave on the hour at 0600, sometime later it seems to change to 0569.

Could this be explained? Does it depend on what day length I use?

Also does day length 2 mean it's half the speed of normal?

Thanks

JGR wrote:
Davie_UCF wrote:Hi, a question regarding the timetable autoseparation.

How come I can't use both autoseparation and manual timetables? The start date button is greyed out so I can't set up timetables for some vehicles but use autoseparation for others?

Thanks
At the moment there isn't a per-vehicle setting for auto-separation, it's either on or off for all vehicles.
This is as implemented in the original patch, I've not had a reason to change it.
Thanks for the response. I'll just turn off that part as I like to set up my own timetables. Although auto separation would be good for my road vehicles
East of England/East Anglia scenario/map released!! http://www.tt-forums.net/viewtopic.php?p=205440#205440
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Davie_UCF wrote:Can I ask about the day length patch?
What does it modify exactly?

I noticed some strange problems with it when using timetables. I've got it set to show time instead of days and using vehicle separation (CTRL+Click on start date) but sometimes if I want to put in say, start date as 0552 when its entered it shows as 0553 on the timetable. If I set day length back to 1, it enters fine. Also if I get one timetable right, say my trains leave on the hour at 0600, sometime later it seems to change to 0569.

Could this be explained? Does it depend on what day length I use?

Also does day length 2 mean it's half the speed of normal?

Thanks
At a day length of 2, a "day" takes twice a long as in standard OpenTTD.
Vehicle movement remains at the same effective rate, and hence a vehicle can travel twice as far in a day, however various other things such as passenger/cargo generation, town growth, etc. maintain the same per-day rate, and hence occur at half-speed relative to player-time.

Timetables currently use units which are equal to 1/74 of an unscaled day. Converting from these units to minutes is subject to rounding.
Davie_UCF wrote:Thanks for the response. I'll just turn off that part as I like to set up my own timetables. Although auto separation would be good for my road vehicles
I may add making it a per-vehicle setting to the todo list.
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 which of the various daylength patches is used here, but usually they involve some problem where times are rounded to full days (or full original days), instead of rounded to minutes, and thus sync issues occur. (try displaying in ticks to check this)
Davie_UCF
Traffic Manager
Traffic Manager
Posts: 155
Joined: 11 Sep 2004 19:55
Location: Colchester, Essex, United Kingdom

Re: JGR's Patch Pack

Post by Davie_UCF »

Eddi wrote:i don't know which of the various daylength patches is used here, but usually they involve some problem where times are rounded to full days (or full original days), instead of rounded to minutes, and thus sync issues occur. (try displaying in ticks to check this)
I'll check it out.

Had daylength set to 2, for quite sometimes all my departures were nice, like on the hour, half past, quarter past etc. But then later on, an hour or two of gameplay the on the hour departures showed 59, the half past 29, and quarter past 14, if that makes sense.. They had all lost a minute.

I'm guessing this is unavoidable?

Really I just want a year to last longer because I spend so much time messing with timetables and track that by time I've finished one little branch i've lost like 5 years :p
East of England/East Anglia scenario/map released!! http://www.tt-forums.net/viewtopic.php?p=205440#205440
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: JGR's Patch Pack

Post by Eddi »

Davie_UCF wrote:I'm guessing this is unavoidable?
it's not, but a bit of care must be applied when using/combining these patches (daylength and absolute time). as a workaround, you can set up the timetable in ticks, and manually round to full minutes (ticks per minute should be able to be set up). otherwise, set minutes to multiples of 74 ticks (original day length), it should also get around this.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Davie_UCF wrote:I'll check it out.

Had daylength set to 2, for quite sometimes all my departures were nice, like on the hour, half past, quarter past etc. But then later on, an hour or two of gameplay the on the hour departures showed 59, the half past 29, and quarter past 14, if that makes sense.. They had all lost a minute.

I'm guessing this is unavoidable?

Really I just want a year to last longer because I spend so much time messing with timetables and track that by time I've finished one little branch i've lost like 5 years :p
I'd switch to ticks mode and check that your timetable is the exact length you think it is (i.e. your ticks per minute x the expected number of minutes).
Eddi wrote: it's not, but a bit of care must be applied when using/combining these patches (daylength and absolute time). as a workaround, you can set up the timetable in ticks, and manually round to full minutes (ticks per minute should be able to be set up). otherwise, set minutes to multiples of 74 ticks (original day length), it should also get around this.
Timetable auto-fill is rounded up to multiples of 74 ticks. Manually specified times and auto-timetable adjustments are not rounded.
The departure boards patch changed auto-fill rounding to be based on the client-local timetable display mode, but I reverted this when I noticed, as it is non-deterministic, which is unhelpful in multi-player games.
Setting ticks per minute to 37 should also work as above.

Clock-face timetabling was not a use-case I had in mind when integrating any of these patches, so there's been no testing or modifications to support that.
Ex TTDPatch Coder
Patch Pack, Github
d0mi3l
Engineer
Engineer
Posts: 23
Joined: 16 Aug 2013 18:04
Location: Poland

Re: JGR's Patch Pack

Post by d0mi3l »

Always when I start new game and I set no. of towns in map custom, I have no. 294 or above. Even when I set 4k map and no. cities: high. Its still 294 or above.
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: JGR's Patch Pack

Post by Eddi »

your town name set does not provide enough names. if it runs out, no more towns can be created.

try a different town name generator.
d0mi3l
Engineer
Engineer
Posts: 23
Joined: 16 Aug 2013 18:04
Location: Poland

Re: JGR's Patch Pack

Post by d0mi3l »

Eddi wrote:.. try a different town name generator.
Thanks a lot. In 4k maps: 1023 no. of towns. 8)
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

I've made some changes to go in the next release, which should make this sort of timetabling easier.

Auto separation is now a per-vehicle setting, with a company setting for the default.
The autofill timetable rounding ticks value is now a company setting.
I've added a client setting to show the remainder when dividing timetable tick values to display units (minutes/days).

Edit: now in 0.13.1
Ex TTDPatch Coder
Patch Pack, Github
User avatar
einsteinyh
Engineer
Engineer
Posts: 46
Joined: 15 Feb 2016 01:22
Location: Bogotá

Re: JGR's Patch Pack

Post by einsteinyh »

Please could you add these patches in a future release? :oops: (I know It can be hard, but it costs nothing to dream) :roll:
Tunnel End http://www.tt-forums.net/viewtopic.php?f=33&t=72639
Chunnel http://www.tt-forums.net/viewtopic.php?f=33&t=41775
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

einsteinyh wrote:Please could you add these patches in a future release? :oops: (I know It can be hard, but it costs nothing to dream) :roll:
Tunnel End http://www.tt-forums.net/viewtopic.php?f=33&t=72639
Chunnel http://www.tt-forums.net/viewtopic.php?f=33&t=41775
The tunnel end patch seems sensible, I'll have a look at that.
I've looked at the chunnel patch(es) before and I'm not all that keen on the idea of merging it. Bugs and odd corner cases seemed to a persistent issue.
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