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

Tsylatac
Engineer
Engineer
Posts: 50
Joined: 26 Dec 2015 01:04

Re: JGR's Patch Pack

Post by Tsylatac »

JGR wrote:
Tsylatac wrote:One thing that bugs me with this implementation of daylength is it affects some animations. Vehicles and water are fine, houses if I remember are fine, but industries and objects have their animation slowed by the day length factor. My eye candy and I would love to see this changed if possible :D

Would this be an easy fix, or would it be more of the typical daylength "if we tweak this part it breaks this other part" trouble?
This should be done now.
Sweet, thanks! :D
JGR wrote:
Vanderbildt wrote:Hey JGR
first off all: thanks for the work!
and here comes a wish can you please add this patch
Timetable change all staitions
http://www.tt-forums.net/viewtopic.php?f=32&t=50274
http://www.tt-forums.net/download/file.php?id=136017
or is it in and i be too stupid
Thanks
An equivalent implementation is now in the latest release.
I didn't know how much I needed this until I tried it! Can it be made to work for "change speed limit" too?

Also, do you have a "tip jar" on PayPal (or, preferably, a non-PayPal alternative?)
Auge
Director
Director
Posts: 636
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: JGR's Patch Pack

Post by Auge »

Hello
Tsylatac wrote:Also, do you have a "tip jar" on PayPal (or, preferably, a non-PayPal alternative?)
@JGR Maybe a Flattr account [1]?

Tschö, Auge

[1]: Wikipedia entry
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Tsylatac wrote:I didn't know how much I needed this until I tried it! Can it be made to work for "change speed limit" too?

Also, do you have a "tip jar" on PayPal (or, preferably, a non-PayPal alternative?)
That would be doable, I'm not sure I see the use case though, you want a train to run at a reduced speed for its whole order list?

I don't have a tip jar or anything like that. I'm not really doing this in expectation of any sort of financial gain.
Ex TTDPatch Coder
Patch Pack, Github
Tsylatac
Engineer
Engineer
Posts: 50
Joined: 26 Dec 2015 01:04

Re: JGR's Patch Pack

Post by Tsylatac »

JGR wrote:
Tsylatac wrote:I didn't know how much I needed this until I tried it! Can it be made to work for "change speed limit" too?
That would be doable, I'm not sure I see the use case though, you want a train to run at a reduced speed for its whole order list?
Temporarily, yes. That's my lazy way of adding "slack" to timetables - give a speed limit of 90-95% actual top speed, and let autofill do the work instead of me calculating/guesstimating it all. Which, come to think of it, means I should be asking very nicely for a change to "clear speed limit" too. :P

I guess I should give auto-timetable/auto-separation another try post-0.11.0, but I kind of like setting them up myself (yes, I'm aware I'm strange). Also manual timetables, while tedious, can work wonders for those busy stations/junctions that you just can't expand yet.

Alternate use case: Faster vehicles sharing most/all of their route with slower vehicles. Sometimes it's easier to just slow the faster vehicles to match the slower speed so they don't catch up (preventing trains from constantly stopping at signals and having to re-accelerate, and trams and long RVs from being passed while maintaining and spending the next year trying in vain to catch up... although now I tend to just timetable a depot in anyways.)

JGR wrote:
Tsylatac wrote:Also, do you have a "tip jar" on PayPal (or, preferably, a non-PayPal alternative?)
I don't have a tip jar or anything like that. I'm not really doing this in expectation of any sort of financial gain.
Maybe not, but I (and I'm sure we) do appreciate your work, and especially that you take requests :wink:
vazoun51
Engineer
Engineer
Posts: 20
Joined: 05 Sep 2015 21:23

Re: JGR's Patch Pack

Post by vazoun51 »

Hi JGR. First of all let me to express my thanks for this patchpack and all your work. It's really great and I think many features should be implemented in the official version. But I have found a bug. I wonder nobody have noticed it yet. After some time (varying) of normal running most of oil rigs become unreachable by air. No matter of type of helicopter (airship), distance, other waypoints, cargo or anything else. Helicopters just hopelessly circle above it unable to land. It seems they consider oil rig's heliport occupied for some reason. I don't know if it is caused by your patchpack but I never experienced such behavior before, when I played official versions. Savegame is included.
Attachments
Armstrong & Co., 05-09-2092.sav
(7.03 MiB) Downloaded 43 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Tsylatac wrote:Temporarily, yes. That's my lazy way of adding "slack" to timetables - give a speed limit of 90-95% actual top speed, and let autofill do the work instead of me calculating/guesstimating it all. Which, come to think of it, means I should be asking very nicely for a change to "clear speed limit" too. :P

I guess I should give auto-timetable/auto-separation another try post-0.11.0, but I kind of like setting them up myself (yes, I'm aware I'm strange). Also manual timetables, while tedious, can work wonders for those busy stations/junctions that you just can't expand yet.

Alternate use case: Faster vehicles sharing most/all of their route with slower vehicles. Sometimes it's easier to just slow the faster vehicles to match the slower speed so they don't catch up (preventing trains from constantly stopping at signals and having to re-accelerate, and trams and long RVs from being passed while maintaining and spending the next year trying in vain to catch up... although now I tend to just timetable a depot in anyways.)
That makes sense. I've implemented it for the set/clear speed and clear waiting time buttons, it'll be in the next release.
vazoun51 wrote:Hi JGR. First of all let me to express my thanks for this patchpack and all your work. It's really great and I think many features should be implemented in the official version. But I have found a bug. I wonder nobody have noticed it yet. After some time (varying) of normal running most of oil rigs become unreachable by air. No matter of type of helicopter (airship), distance, other waypoints, cargo or anything else. Helicopters just hopelessly circle above it unable to land. It seems they consider oil rig's heliport occupied for some reason. I don't know if it is caused by your patchpack but I never experienced such behavior before, when I played official versions. Savegame is included.
I managed to reproduce this once, in a test game, but haven't been able to reproduce it since. It may take some time to track down the cause. Thanks for reporting the issue though.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Tintinfan
Engineer
Engineer
Posts: 105
Joined: 29 Sep 2010 11:36

Re: JGR's Patch Pack

Post by Tintinfan »

Greetings JGR,


I've been having some issues loading savegames from the dedicated server end. After some time I can't quite define, the server produces desyncs. The best error report I have (attached) comes from trying to reload the same game on the server after the desyncs happen. I can however, still load the game perfectly fine on the win64 version provided in the first post.
Attachments
crash.sav
(1.91 MiB) Downloaded 39 times
crash.txt
(11.72 KiB) Downloaded 40 times
National Infra, 25th Dec 1990.sav
(1.91 MiB) Downloaded 39 times
Regards,

Tinny/Tintinfan. :)
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Tintinfan wrote:Greetings JGR,


I've been having some issues loading savegames from the dedicated server end. After some time I can't quite define, the server produces desyncs. The best error report I have (attached) comes from trying to reload the same game on the server after the desyncs happen. I can however, still load the game perfectly fine on the win64 version provided in the first post.
It seems that the crash occurs because you're loading the game as a headless server, where the current company is "spectator". The crash is because part of the load process for template replacement trains was using the current company, instead of the owner company, which doesn't work for the spectator company. This will be fixed in the next release.
Edit: A related aspect of the load process for template replacement trains is the cause of the desync on join issue.

Thanks for reporting the issue.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

vazoun51 wrote:Hi JGR. First of all let me to express my thanks for this patchpack and all your work. It's really great and I think many features should be implemented in the official version. But I have found a bug. I wonder nobody have noticed it yet. After some time (varying) of normal running most of oil rigs become unreachable by air. No matter of type of helicopter (airship), distance, other waypoints, cargo or anything else. Helicopters just hopelessly circle above it unable to land. It seems they consider oil rig's heliport occupied for some reason. I don't know if it is caused by your patchpack but I never experienced such behavior before, when I played official versions. Savegame is included.
It seems that this is another improved breakdowns bug.
If an aircraft had a breakdown of a type which required it to go to a hangar at a different airport, at the moment when it was taking off or landing, the aircraft would leave the airport's state machine without clearing its reservations/occupied blocks status, and begin flying to the hangar. A similar issue also existed with out of fuel crashes.
These should be fixed now, and I've added a console command to unblock existing heliports, which are in the latest release.
Ex TTDPatch Coder
Patch Pack, Github
dromer20
Engineer
Engineer
Posts: 9
Joined: 19 Feb 2016 16:19

Re: JGR's Patch Pack

Post by dromer20 »

JGR, tnx for great patch pack! I played it for 100's of hours with friends on a multiplayer server (3 week games), often the most busy (but private) one in the list running on JGR.

WARNING: Do NOT use template based replacement yet in multiplayer games!! It contains a bug that corrupts your game and save file in multiplayer games, making it impossible to reload save games (only) on a multiplayer server , i.e. on a crash.

Path to reproduce: In a multiplayer game, create a template, replace a train with the template, save the game, try to load the game (on a multiplayer server). Crash: "Assertion failed at line 314 of /home/jgr/openttd/cross-win64/src/company_cmd.cpp: owner < OWNER_END". Crash can sometimes also be triggered by sending a replaced train to the depot.

What seems to be happening is that the template replacement somehow messes up something related to vehicle ownership information. Even when removing all trains that were "template replaced" (and the templates) and saving the save game was still corrupt (not loadable in multiplayer).


Just some thoughts what i'm missing in OpenTTD in general at the moment:
- Working template based replacement! :)
- 32 bit trainsets. We should set up a fund :)
- Copy & paste of stations/rails.
- Difficulty balancing & simple Easy/Med/Hard/Very hard setting. I had to spend over 40 hours to create balanced and challenging cost/revenue settings because the default game is way way too easy but way way too hard to increase difficulty (track/station cost settings, daylenght/cargo generation settings, train costs settings per trainset, etc).
- What would be a great first step is a patch that overrides the train & bus running costs based on their Speed, power & capacity (and the difficulty setting). If i currently combine two or three of the popular train and bus sets their always out of balance, causing everybody to use only the cheapest trainset. You can often configure the running costs, but this A) requires too much tuning time B) is often not a solution because i.e. the wagons are too cheap but the engines too expensive.
Last edited by dromer20 on 30 Mar 2016 14:18, edited 1 time in total.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Which version are you using? This should be fixed in 0.12.1.
Ex TTDPatch Coder
Patch Pack, Github
dromer20
Engineer
Engineer
Posts: 9
Joined: 19 Feb 2016 16:19

Re: JGR's Patch Pack

Post by dromer20 »

Aaah great! Yes we're still on 0.11 because we play for 2-5 weeks (daylenght 8, in cause you're wondering).
User avatar
burty
Transport Coordinator
Transport Coordinator
Posts: 326
Joined: 16 Jun 2006 17:18
Location: Somwhere near a computer

Re: JGR's Patch Pack

Post by burty »

Pikka tried to get a kickstarter going for his 32bpp base set but it didn't do too well sadly


Sent from my iPhone using Tapatalk
KeldorKatarn
Transport Coordinator
Transport Coordinator
Posts: 274
Joined: 13 Apr 2010 21:31

Re: JGR's Patch Pack

Post by KeldorKatarn »

@JGR: I added support for 32 rail types instead of 16 to my patch pack, in case you want to add that to yours. Check my development branch, two commits from 1st and 2nd April. Easy to spot from their commit message. I think it's the first one on April 1st and the last one on April 2nd.
I used bit 7 on byte m1, which is unused for all tile types that have rail on them as one additional railtype bit. Had to adjust the parameters in all the commands of course too.
If you find any further problems with it, let me know but I think I got it bug free.
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: JGR's Patch Pack

Post by Leanden »

Hi JGR, any chance i can poke and prod you to upgrade "place houses" patch to the new v4 to remove zone restrictions.

Thanks :)
Image
dromer20
Engineer
Engineer
Posts: 9
Joined: 19 Feb 2016 16:19

Re: JGR's Patch Pack

Post by dromer20 »

@JGR: Have you every considered/tried one of the Copy&Paste patches? Could be very nice to be able to copy station layouts instead of creating them from scratch every time.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

KeldorKatarn wrote:@JGR: I added support for 32 rail types instead of 16 to my patch pack, in case you want to add that to yours. Check my development branch, two commits from 1st and 2nd April. Easy to spot from their commit message. I think it's the first one on April 1st and the last one on April 2nd.
I used bit 7 on byte m1, which is unused for all tile types that have rail on them as one additional railtype bit. Had to adjust the parameters in all the commands of course too.
If you find any further problems with it, let me know but I think I got it bug free.
Thanks, I will take a look at this soon.
Leanden wrote:Hi JGR, any chance i can poke and prod you to upgrade "place houses" patch to the new v4 to remove zone restrictions.

Thanks :)
This should be doable, will take a look.
dromer20 wrote:@JGR: Have you every considered/tried one of the Copy&Paste patches? Could be very nice to be able to copy station layouts instead of creating them from scratch every time.
This has been asked for a few times. I'm not particularly keen on it. It's somewhat awkward to integrate properly for quite a small benefit, and I don't want to encourage copy/paste spam.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Auge wrote:Hello JGR

Is ist possible to implement the selection of vehicle groups as a criterion for restrictions in the restricted signals patch? Sometimes it would be useful to restrict the use of specific platforms to a group of trains without having the possibility to differentiate the vehicles with their max speed or the last, current or next orders.

Tschö, Auge
This is implemented now, using a drop-down box.
KeldorKatarn wrote:@JGR: I added support for 32 rail types instead of 16 to my patch pack, in case you want to add that to yours. Check my development branch, two commits from 1st and 2nd April. Easy to spot from their commit message. I think it's the first one on April 1st and the last one on April 2nd.
I used bit 7 on byte m1, which is unused for all tile types that have rail on them as one additional railtype bit. Had to adjust the parameters in all the commands of course too.
If you find any further problems with it, let me know but I think I got it bug free.
Thanks for this, I've imported these commits.
One change of note which I have made is in the implementation of the rail type fixup in ReloadNewGRFData().
I've modified the algorithm to only traverse the map once, only do the label lookup once per track type, and not store a list of rail tiles, so it should be faster and have O(N) instead of O(N log N) behaviour. I've not actually measured anything yet though.
Leanden wrote:Hi JGR, any chance i can poke and prod you to upgrade "place houses" patch to the new v4 to remove zone restrictions.

Thanks :)
This is done now.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: JGR's Patch Pack

Post by Leanden »

JGR wrote:
Leanden wrote:Hi JGR, any chance i can poke and prod you to upgrade "place houses" patch to the new v4 to remove zone restrictions.

Thanks :)
This is done now.
Any chance i can get you to update the first post with the win32/64 bundles so i can test it out? :D
Image
KeldorKatarn
Transport Coordinator
Transport Coordinator
Posts: 274
Joined: 13 Apr 2010 21:31

Re: JGR's Patch Pack

Post by KeldorKatarn »

JGR wrote:Thanks for this, I've imported these commits.
One change of note which I have made is in the implementation of the rail type fixup in ReloadNewGRFData().
I've modified the algorithm to only traverse the map once, only do the label lookup once per track type, and not store a list of rail tiles, so it should be faster and have O(N) instead of O(N log N) behaviour. I've not actually measured anything yet though.
You're welcome. I might steel your group-restriction addon in return ;) As for these performance changes. I might copy them. Considering this is only done once and very rarely when the player loads newgrfs (which takes forever anyway) I wasn't very concerned with making that ultra performant.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 40 guests