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

ecolortest
Engineer
Engineer
Posts: 19
Joined: 12 Oct 2016 07:46

Re: JGR's Patch Pack

Post by ecolortest »

JGR wrote:
ecolortest wrote:A bug in this version 0.27.1

Assertion failed at line 75 of /home/jgr/openttd/cross-win32/src/fontcache.cpp: IsPrintable(key)

This is happen if do click a Game Options
I presume this is in Wine?
I will look into it, but I don't anticipate much success in resolving the issue.
You'll probably be better building for your platform (Linux?).
Yes this is happen in wine
Auge
Director
Director
Posts: 633
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: JGR's Patch Pack

Post by Auge »

Hello
SimYouLater wrote:Oh! Congrats, then! Sorry I assumed you were inexperienced, you obviously know more than I do.
What do you want to tell me?

Tschö, Auge
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: JGR's Patch Pack

Post by SimYouLater »

Auge wrote:Hello
SimYouLater wrote:Oh! Congrats, then! Sorry I assumed you were inexperienced, you obviously know more than I do.
What do you want to tell me?

Tschö, Auge
I'm being sincere. I guess that was easy to mistake for sarcasm. >_<
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
User avatar
The Growl
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 30 May 2016 23:55
Location: London

Re: JGR's Patch Pack

Post by The Growl »

Hi, I love your patch pack, and I've been using it for years, but I've noticed on my line where fast trains and slower trains use the same space, there is a lot of stopping and starting which is somewhat annoying and causes a lot of annoyance. That's when I remembered this exists, a yellow signal patch which limits the speed of trains if there's one in the block ahead. Would it be possible that you could add this on to your pack, I think it'd be a great addition to the game :D .

You can find what I'm on about here.
Image
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

The Growl wrote:Hi, I love your patch pack, and I've been using it for years, but I've noticed on my line where fast trains and slower trains use the same space, there is a lot of stopping and starting which is somewhat annoying and causes a lot of annoyance. That's when I remembered this exists, a yellow signal patch which limits the speed of trains if there's one in the block ahead. Would it be possible that you could add this on to your pack, I think it'd be a great addition to the game :D .

You can find what I'm on about here.
This really do come up once in a while. Maybe JGR should make a list of considered and rejected patches.

It's hard to find the original response now, but the gist is that that patch still has some design problem regarding reservation into junction.

And what annoy me personally the most is that the R-Y-YY-G is European, while Japan use R-YY-Y-G. My railway knowledge and play style is predominantly Japan so this really annoy me. But this really is unrelated.
User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 721
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: JGR's Patch Pack

Post by Gwyd »

I mean that problem with the order of cautionariy signals can be fixed graphically...
I'd say that this stops being a problem if you want to put the time in to fully timetable your trains. Also, I played with this patch and found it didn't entirely help traffic jams.
User avatar
piratescooby
Route Supervisor
Route Supervisor
Posts: 449
Joined: 21 Nov 2014 12:39
Location: The Granite City.

Re: JGR's Patch Pack

Post by piratescooby »

viewtopic.php?f=33&t=52085&start=20 , this sounds good , seems to be the logical answer to having a slower train in front .
mak
Traffic Manager
Traffic Manager
Posts: 205
Joined: 30 Sep 2015 13:16

Re: JGR's Patch Pack

Post by mak »

Or

Just run a four track (two up, two down) with crossovers regularly spaced.

I do this especially on passenger lines with slow mail and fast passenger trains.

Fast trains then change track and overtake the slow train.

You do need the space for four tracks of course and there is a need to drop to two track (one up, one down) sometimes because of space restrictions, just signal appropriately.
User avatar
SquireJames
Tycoon
Tycoon
Posts: 1863
Joined: 07 Aug 2004 11:56
Skype: squirejames5
Location: Stoke-on-Trent
Contact:

Re: JGR's Patch Pack

Post by SquireJames »

mak wrote:Or

Just run a four track (two up, two down) with crossovers regularly spaced.

I do this especially on passenger lines with slow mail and fast passenger trains.

Fast trains then change track and overtake the slow train.

You do need the space for four tracks of course and there is a need to drop to two track (one up, one down) sometimes because of space restrictions, just signal appropriately.
I do this, but I also use the signalling restrictions to keep slower trains on the outside and faster trains on the inside. Quite happily, this also takes into account breakdowns, so an express that has broken down and is now crawling along will choose the slow line rather than the fast.
Image
User avatar
Quast65
Tycoon
Tycoon
Posts: 2654
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: JGR's Patch Pack

Post by Quast65 »

Been a while since I just played the game, as I have been mostly developing stuff for the game.
But I want to try to get back into playing a bit more and this patchpack seems to have all the features I would like to have in a game and will hopefully in the future get even more desireable things like multiple roadtypes and realistic shunting.
Excellent work!! :bow:

I do have two questions though..

- Would it be possible to add a parameter in the gamesettings to disable the (un)loading penalty for trains that are longer than a station?

- Are there plans to add a part of Cirdans NewMapFeatures fork, that allows two different railtypes on one tile? (when the rails are horizontal/vertical)?
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

Quast65 wrote: - Would it be possible to add a parameter in the gamesettings to disable the (un)loading penalty for trains that are longer than a station?
You know that you can change that in openttd.cfg, right? yapf.rail_shorter_platform_penalty etc.
User avatar
nirasa
Engineer
Engineer
Posts: 83
Joined: 03 Sep 2015 07:11
Location: Czech republic

Re: JGR's Patch Pack

Post by nirasa »

ecolortest wrote:
JGR wrote:
ecolortest wrote:A bug in this version 0.27.1

Assertion failed at line 75 of /home/jgr/openttd/cross-win32/src/fontcache.cpp: IsPrintable(key)

This is happen if do click a Game Options
I presume this is in Wine?
I will look into it, but I don't anticipate much success in resolving the issue.
You'll probably be better building for your platform (Linux?).
Yes this is happen in wine
I compile the program myself; you can watch the video https://www.youtube.com/watch?v=jHj1xpgWbnk
It's in the Czech language, I hope it will not deter you.
My YouTube channel: https://www.youtube.com/c/nirasa/videos Czech language. :D
User avatar
Quast65
Tycoon
Tycoon
Posts: 2654
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: JGR's Patch Pack

Post by Quast65 »

ino wrote:
Quast65 wrote: - Would it be possible to add a parameter in the gamesettings to disable the (un)loading penalty for trains that are longer than a station?
You know that you can change that in openttd.cfg, right? yapf.rail_shorter_platform_penalty etc.
Tried it, didnt work…
Maybe its an extra penalty over the already existing overhang-penalty of the game.

What is needed is that a part of economy.cpp needs to be removed/altered (I removed it for the old game I am currently using and then recompiled that game and that does the trick, but it would be nicer if it is included as a patch).
Hackalittlebit already has made a patch:
https://bugs.openttd.org/task/3622
Discussion-topic is here:
viewtopic.php?p=854926#p854926
Maybe something to include (if possible) in the cheat-menu (as it is kind of a cheat ;-) )

This would for example be nice for short stations at the end of a tunnel, that way the train stops partially in the tunnel, faking an underground station.
Or for a short station in between or at the end of a bridge, to fake a station on a bridge.
In both cases it would be nice then to not get a (un)loading penalty ;-)
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

Quast65 wrote:
ino wrote:
Quast65 wrote: - Would it be possible to add a parameter in the gamesettings to disable the (un)loading penalty for trains that are longer than a station?
You know that you can change that in openttd.cfg, right? yapf.rail_shorter_platform_penalty etc.
Tried it, didnt work…
Maybe its an extra penalty over the already existing overhang-penalty of the game.

What is needed is that a part of economy.cpp needs to be removed/altered (I removed it for the old game I am currently using and then recompiled that game and that does the trick, but it would be nicer if it is included as a patch).
Hackalittlebit already has made a patch:
https://bugs.openttd.org/task/3622
Discussion-topic is here:
viewtopic.php?p=854926#p854926
Maybe something to include (if possible) in the cheat-menu (as it is kind of a cheat ;-) )

This would for example be nice for short stations at the end of a tunnel, that way the train stops partially in the tunnel, faking an underground station.
Or for a short station in between or at the end of a bridge, to fake a station on a bridge.
In both cases it would be nice then to not get a (un)loading penalty ;-)
Oh, sorry, I thought you mean pathfinding panelty, not loading speed panelty.

Reading the original.discussion, if you aim for realistic, JGR has load-through mode (you need to enable in setting, and it will be part of middle/far end/near end cycle. Basically the train will align the first set of wagon to station, load only those wagon, move forward to next set of wagon, repeat. It works and looks real. Not sure if this is what you really want though.
User avatar
Quast65
Tycoon
Tycoon
Posts: 2654
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: JGR's Patch Pack

Post by Quast65 »

ino wrote:Oh, sorry, I thought you mean pathfinding panelty, not loading speed panelty.
No problem, but you got my hopes up a bit that it would be something very simple ;-)
Sadly not the case.. ;(
ino wrote:JGR has load-through mode … Not sure if this is what you really want though
That is indeed not my aim.
It is nice and realistic for regular short stations, but my aim is for short stations in combination with a tunnel/bridge.
And then you dont really want the train to crawl along the short station...

EDIT: Also (I may be wrong though) I thought that the load-through mode is for cargo-trains only, not for passengertrains...
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: JGR's Patch Pack

Post by SimYouLater »

Quast65 wrote:
ino wrote:Oh, sorry, I thought you mean pathfinding panelty, not loading speed panelty.
No problem, but you got my hopes up a bit that it would be something very simple ;-)
Sadly not the case.. ;(
ino wrote:JGR has load-through mode … Not sure if this is what you really want though
That is indeed not my aim.
It is nice and realistic for regular short stations, but my aim is for short stations in combination with a tunnel/bridge.
And then you dont really want the train to crawl along the short station...

EDIT: Also (I may be wrong though) I thought that the load-through mode is for cargo-trains only, not for passengertrains...
It is for freight only. Passenger trains would need to be handled differently to get what you're after, at this point you simply have to have a full-length platform.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
yellyFish
Engineer
Engineer
Posts: 8
Joined: 04 Oct 2018 20:22

Re: JGR's Patch Pack

Post by yellyFish »

Hi. I have been trying to play in a server that uses your patch version 0.27.0. But everytime the map gets loaded the game gets super slow, my CPU usage goes to 100% and the only clue i get about this is using debug mode. i get this error spammed in console.

Code: Select all

dbg: [grf] Unhandled vehicle variable 0x61, type 0x0
I have digged in the code trying to find the newgrf responsible or if it is something with the patch or openttd itself but i can't seem to find it.
I'll attach the server savefile so you can test if it happens to you too and if you have any clue on what is causing this.

UPDATE: i found the newgrf responsible for the errors. now i am asking the creator what he knows. It was 2cc Trains In NML version 3.0-alpha2.
Attachments
autosave15.sav
(4.99 MiB) Downloaded 54 times
AkipTsaqif
Engineer
Engineer
Posts: 21
Joined: 28 Apr 2016 11:11

Re: JGR's Patch Pack

Post by AkipTsaqif »

Hi JGR, I have a little bit question here.

Suppose the following branch line scenario:

Image

Those red and green were signals and its direction. All of them were path signals.

My question is, how I can hold train 2 in station B until train 1 depart from station A, then pass train 2 in station B using routefinding restriction? Is there a way to do it besides making new crossovers in station A or double tracking the track?

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

Re: JGR's Patch Pack

Post by ino »

AkipTsaqif wrote:Hi JGR, I have a little bit question here.

Suppose the following branch line scenario:

Image

Those red and green were signals and its direction. All of them were path signals.

My question is, how I can hold train 2 in station B until train 1 depart from station A, then pass train 2 in station B using routefinding restriction? Is there a way to do it besides making new crossovers in station A or double tracking the track?

Thanks
Not sure if I understand your diagram correctly.

But first, you don't really need two Red-colored signal on the single-track line. Then train departing left station will need to reserve the path all the way into platform in order for it to depart.

Though, that does not look realistic. If you want it realistic while keeping it simple, then

Image

Of course, this is still not perfect, but it's easy to do. If you don't want the train to reserve the platform early (maybe you need it for train from the other line in the meantime), then you need to use SLOT. You need to enable them first in settting (iirc it's "Advanced routefinding restriction" setting).

Image

Hope it helps.
AkipTsaqif
Engineer
Engineer
Posts: 21
Joined: 28 Apr 2016 11:11

Re: JGR's Patch Pack

Post by AkipTsaqif »

ino wrote:Not sure if I understand your diagram correctly.

But first, you don't really need two Red-colored signal on the single-track line. Then train departing left station will need to reserve the path all the way into platform in order for it to depart.

Though, that does not look realistic. If you want it realistic while keeping it simple, then
[+] Spoiler
Image
Of course, this is still not perfect, but it's easy to do. If you don't want the train to reserve the platform early (maybe you need it for train from the other line in the meantime), then you need to use SLOT. You need to enable them first in settting (iirc it's "Advanced routefinding restriction" setting).
[+] Spoiler
Image
Hope it helps.
Thanks for answering. Yeah I'm trying to make my rail lines as realistic as possible.

What does reserve through actually do? I never use that because I don't understand its usage. And yeah, I'm still confused about the slots. Could you please elaborate it to me by using my diagram above?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 9 guests