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

ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

Thank you for your reply and for consideration.

I have not realised that long reserve/reserve through actually works when the train is also stopping at the station before reaching the signal. Thank you.

Still, if the station is in front of a junction, this might not actually be desirable behaviour, especially if the train is also stopping as it would block the junction :-) Or if the line is very busy and two takeover trains are close together as long reserve would failed on the second train. Anyway, I imagine amount of slots needed will be reduced. You might call me crazy, but I actually have station where there are two (2) overtaking lines and two platforms per direction, and I have (luckily) see a very nice takeover where it departs the station in completely reverse order! (It was implemented using presignal, though)

Another idea for consideration: allow routefinding restriction to read status of other (non-PBS) signal. My usage is that I sometime has stations where passenger platforms are in center and the overtaking lines (without platform) are diverged and are on the outside (for the sake of realism, as I was simulating a real-world system). I would want the through train to just use the platform line if it is available. I currently implementing this by adding penalty of 1000*{station length} to the overtaking line, but it seems very brittle to me and sometimes just not work as expected. Of course, I assume this was pretty trivial to implement. If not, just forget it. Its effect are purely cosmetic for me and my use case.

Appreciated your works.
drsid
Engineer
Engineer
Posts: 19
Joined: 30 Jun 2016 20:09

Re: JGR's Patch Pack

Post by drsid »

I dont know how about you guys, but i need diagonal tunnels, bridges and stations with programmable\PBS signals on it =\ I wont tell you usage if this, sorry
drsid
Engineer
Engineer
Posts: 19
Joined: 30 Jun 2016 20:09

Re: JGR's Patch Pack

Post by drsid »

And, btw, it seems that this game urgently need hexagonal workspace! Dont you agree?
User avatar
JGR
Tycoon
Tycoon
Posts: 2559
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

ino wrote:Another idea for consideration: allow routefinding restriction to read status of other (non-PBS) signal.
This feature was in the original TTDPatch implementation. It seemed to generate a lot of user confusion as to how it worked and how to use it (in particular which signal on the target tile was being looked at), and did not seem to get used much, which is why I did not re-implement it in the OpenTTD version. It would not be all that difficult to add it though.
For station layouts though, testing whether a tile/platform is reserved or occupied might be more useful and easier to understand.
ino wrote:My usage is that I sometime has stations where passenger platforms are in center and the overtaking lines (without platform) are diverged and are on the outside (for the sake of realism, as I was simulating a real-world system). I would want the through train to just use the platform line if it is available. I currently implementing this by adding penalty of 1000*{station length} to the overtaking line, but it seems very brittle to me and sometimes just not work as expected
You may need to adjust penalty values slightly depending on other track features. In particular, going through the back-side of a PBS signal has a default penalty of 1500.
Ex TTDPatch Coder
Patch Pack, Github
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

JGR wrote: For station layouts though, testing whether a tile/platform is reserved or occupied might be more useful and easier to understand.
I agree on this, but I doubt it would get used much either (other than me).
JGR wrote: You may need to adjust penalty values slightly depending on other track features. In particular, going through the back-side of a PBS signal has a default penalty of 1500.
Yeah. It is kinda hard to get this right IMO. Being able to restrict route base on signal/track occupancy would make this more straightforward. If it is not much work, I'd appreciate it. But don't mind it too much.

Thank you.
Cadde
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 07 Oct 2004 12:51

Re: JGR's Patch Pack

Post by Cadde »

JGR, thank you for your consideration of adding more noise options to the map generator. However, i found a "better" alternative in the free edition of TerraSculptor. It involves a bit of fidgeting but i managed to make an appropriate height map with 2048x2048 pixels which is what i needed. Doing some fine tuning in Photoshop it turned out acceptable.

So no rush on that request.
That being said, it's just a matter of changing some numbers in the terrain generator to implement the different noise options. And of course adding those altered numbers to the options which i would assume is trivial too.
And like i said, the only reason i didn't do it (as well as some other minor tweaks of the game code) is that i just can't be bothered to install the Windows SDK. Instead i spent a whole day playing around with different applications to make a heightmap. :P

In a perfect world, one would have direct access to each and every parameter of the noise options in an advanced-advanced version of the scenario creation GUI. ;)
User avatar
AntoninKyrene
Engineer
Engineer
Posts: 74
Joined: 29 May 2011 17:32
Location: SW US

Re: JGR's Patch Pack

Post by AntoninKyrene »

Hello JGR!

If I want to apply your patch pack to previous versions of OpenTTD, it would appear at GitHub that I can do so by applying an older version to a base trunk as noted in the repository. I am assuming that our base trunk numbers happen to coincide with a candidate or full release of OpenTTD, but I'm still working my way towards that conclusion. However, if I have a previous trunk that is not an RC, Beta or Full Release, can your previous versions be "subversion-ed" to the same nightly as OpenTTD?

Applying a previous version to a full release is my primary concern. Subversion is purely optional. I do all builds and coding in Linux, if that helps.

-Marc
Kuolema Tekee Taiteilijan
Cadde
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 07 Oct 2004 12:51

Re: JGR's Patch Pack

Post by Cadde »

AntoninKyrene wrote:If I want to apply your patch pack to previous versions of OpenTTD...
I will just pitch in here and say it's possible. The method involves carefully comparing the revision the patch pack is targeted at and the revision you want to target and manually resolving any conflicts.
I've done it before with ChiPP. But let me warn you, it's not a fun experience depending on just how much has changed between revisions.

Normally, one would look for appropriate patches towards the revision that this PP holds and just assemble the patch pack itself. Again, resolving any conflicts between the various patches themselves. But some patches never get updated and you would have to manually "maintain" each and every one of those outdated or mismatching patches depending on which way you are going.

There's a reason there are so few patch packs. ;)
User avatar
JGR
Tycoon
Tycoon
Posts: 2559
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Cadde wrote:In a perfect world, one would have direct access to each and every parameter of the noise options in an advanced-advanced version of the scenario creation GUI. ;)
An "advanced-advanced" GUI generally means editing the settings manually using the console or a text editor.
AntoninKyrene wrote:If I want to apply your patch pack to previous versions of OpenTTD, it would appear at GitHub that I can do so by applying an older version to a base trunk as noted in the repository.
I wouldn't recommend attempting this.
There is no benefit anyway as the patchpack can read savegames from all previous trunk revisions.
AntoninKyrene wrote:I am assuming that our base trunk numbers happen to coincide with a candidate or full release of OpenTTD, but I'm still working my way towards that conclusion. However, if I have a previous trunk that is not an RC, Beta or Full Release, can your previous versions be "subversion-ed" to the same nightly as OpenTTD?
I generally pretty much ignore trunk releases. The trunk revision used is usually whatever was most recent at the time I did a release.
AntoninKyrene wrote:Applying a previous version to a full release is my primary concern. Subversion is purely optional. I do all builds and coding in Linux, if that helps.
If you want really want to try to rebase/merge onto an older trunk, I'd suggest using git. SVN will not help you.
Ex TTDPatch Coder
Patch Pack, Github
Cadde
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 07 Oct 2004 12:51

Re: JGR's Patch Pack

Post by Cadde »

JGR wrote:An "advanced-advanced" GUI generally means editing the settings manually using the console or a text editor.
Whoa... hold on a minute... Are you saying i can change the internal parameters of the noise generation algorithm via config file or console? If so, how?
Mind you, i know i can't do that... The values are hardcoded in a const array in code. ;)
That being said, i would be fine with having the option to change the parameters in config or console. At least it would save me having to come up with a new heightmap every time i want to play.
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Patch to buy area of land

Post by kamnet »

htk0708 just posted an update for this patch that previously went unnoticed by me. I think it would be a fine addition to your patch pack. What say you, JGR?

Patch to buy area of land
Cadde
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 07 Oct 2004 12:51

Timetable Creep?

Post by Cadde »

I have a 600 minute timetable set up where there's 4 vehicles sharing it. Each vehicle started out on, for example, 06:00, 11:00, 08:30 and 13:30. (Yes, Train 3 and 4 were added later)
But now, a few iteration later, their start times are 21:01, 16:00, 23:32 and 18:33 respectively. It's all good until you realize that minutes have been added somewhere to their start times.

I did check whether the timetable had extra ticks in it somewhere, which they don't. They are all multiples of 74 ticks.
And i did adjust the start times back to what they should be once and they still did the same thing eventually.
Can this be explained somehow?

Minutes
openttd_2017-05-28_05-38-55.png
Timetable ss
(240.23 KiB) Not downloaded yet
Ticks
openttd_2017-05-28_05-40-56.png
ticks ss
(234.27 KiB) Not downloaded yet
eshield
Engineer
Engineer
Posts: 32
Joined: 24 Feb 2009 12:41
Contact:

Re: JGR's Patch Pack

Post by eshield »

Hello,

I've been testing JGR PP with my friend via LAN and we were unable to buy vehicles in other company depots. He was unable to buy a vehicle in my depot and vise versa. The game says "Can't buy vehicle...".

For example. One have to build depot near other's rails and ask him to build rails to one's depot to be able to build a train. This is a bit uncomfortable.


Can this be fixed?

Thanks.
Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall open unto you.
Cadde
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 07 Oct 2004 12:51

Re: JGR's Patch Pack

Post by Cadde »

eshield wrote:... we were unable to buy vehicles in other company depots. He was unable to buy a vehicle in my depot and vise versa. The game says "Can't buy vehicle...".
Have you checked the settings? There's an option for that called "Enable competitors to buy and renew trains/road vehicles/ships in depots".
openttd_2017-05-28_12-12-56.png
openttd_2017-05-28_12-12-56.png (10.58 KiB) Viewed 2547 times
eshield
Engineer
Engineer
Posts: 32
Joined: 24 Feb 2009 12:41
Contact:

Re: JGR's Patch Pack

Post by eshield »

Cadde wrote: Have you checked the settings? There's an option for that called "Enable competitors to buy and renew trains/road vehicles/ships in depots".
Thanks a lot, mate! Seems like my vision is not that perfect! :cheers:
Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall open unto you.
User avatar
JGR
Tycoon
Tycoon
Posts: 2559
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: Timetable Creep?

Post by JGR »

Cadde wrote:I have a 600 minute timetable set up where there's 4 vehicles sharing it. Each vehicle started out on, for example, 06:00, 11:00, 08:30 and 13:30. (Yes, Train 3 and 4 were added later)
But now, a few iteration later, their start times are 21:01, 16:00, 23:32 and 18:33 respectively. It's all good until you realize that minutes have been added somewhere to their start times.

I did check whether the timetable had extra ticks in it somewhere, which they don't. They are all multiples of 74 ticks.
And i did adjust the start times back to what they should be once and they still did the same thing eventually.
Can this be explained somehow?

Minutes
openttd_2017-05-28_05-38-55.png

Ticks
openttd_2017-05-28_05-40-56.png
I'll look into this issue, thanks for letting me know about it.
Would you be able to upload a savegame? If not, what day length factor are you using here?
Ex TTDPatch Coder
Patch Pack, Github
Cadde
Transport Coordinator
Transport Coordinator
Posts: 290
Joined: 07 Oct 2004 12:51

Re: Timetable Creep?

Post by Cadde »

JGR wrote:I'll look into this issue, thanks for letting me know about it.
Would you be able to upload a savegame? If not, what day length factor are you using here?
I don't remember which savegame specifically cause the issue and either way, i am using some custom NewGRF so you wouldn't be able to load it anyways.
And the issue hasn't repeated itself since. But i would think it has something to do with auto separation (which i did not enable for the vehicles in question btw) but then again, i didn't check the source.
The reasoning for my thinking that is the perfect 0, 1, 2 and 3 minutes offsets. As if they don't like stopping at the same station at the exact same time for some reason.

The timetable was set up with a station in the middle as the starting point. A<->B<->C where B is the start order.
Obviously, the distances A-B and B-C were not identical so the vehicles stayed at A longer than they did C in such a manner that they both arrived at B at the exact same time every time.

I did not see the timetables creeping further than 0, 1, 2 and 3 minutes though. So i would not really call it "creep" anymore but rather refusal to comply with my set start times.
And it's not a big issue but my OCD was tingling a bit. ;)
Gf245g
Engineer
Engineer
Posts: 3
Joined: 31 May 2017 21:30

Re: JGR's Patch Pack

Post by Gf245g »

[tin01] JGR Patchpack Server
This server is technically unavailable without asking for some specific GRFs, and there is no warning that server is private, no password, no GRF named "my ultra private classified:

- Stolen trees - update (08 Oct 2007)
- NuTracks 1.1.2
- Hungarian Tram Set 1.1b
- MariCo v0.33 01 01 2016"

Any other time i'd say a lot of excitement words for server with huge map and great graphic trees, but because "find missing grfs" quest technically impossible to solve, and only finish result of this quest is lost evening, I can only send to hell server author, sorry X( .
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: JGR's Patch Pack

Post by kamnet »

Gf245g wrote:[tin01] JGR Patchpack Server
This server is technically unavailable without asking for some specific GRFs, and there is no warning that server is private, no password, no GRF named "my ultra private classified:

- Stolen trees - update (08 Oct 2007)
- NuTracks 1.1.2
- Hungarian Tram Set 1.1b
- MariCo v0.33 01 01 2016"

Any other time i'd say a lot of excitement words for server with huge map and great graphic trees, but because "find missing grfs" quest technically impossible to solve, and only finish result of this quest is lost evening, I can only send to hell server author, sorry X( .
Let's see what I can dig up.

NuTracks 1.1.2: http://bundles.openttdcoop.org/nutracks ... -1.1.2.zip
MariCo v0.33: Contact Michael Blunck via PM
Hungarian Tram Set 1.1b: Contact Colossal404 via PM
Stolen Trees: Good luck with this one. It's unfortunate that it's still being traded, as the graphics were stolen from another artist, and it took a long time for this file to be removed. The server's operator should really be using it's successor set, INFRA Trees. It might be available from inside the OpenTTD Coop Pack but I cannot clearly identify which version this is.
Auge
Director
Director
Posts: 636
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: JGR's Patch Pack

Post by Auge »

Hello

Because I read the first posting of the thread again, I found the following under the point "miscellaneous":
Increase maximum permitted vehicle name length (added in v0.17.0), and vehicle group name length (added in v0.17.2)
I would be very pleased, when also the names of stations and, for me much more important, the names of depots had a larger allowed name length. It's very annoying, when I want to rename a depot and not even the length of the actual name is allowed by the name check.

Longer names rules! ;-)

Tschö, Auge
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 35 guests