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
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 »

No it doesn't: it still crashed when I did the same thing with the same NewGRF.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

This looks to be a fault with the GRF in question. It's probably worth forwarding a bug report to whoever maintains it.
I will look into replacing the assertion with something less user-unfriendly at some point soonish.
Ex TTDPatch Coder
Patch Pack, Github
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 shall let myself know. I'll check teh sounds, but I don't get why it doesn't work on your patch pack.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: JGR's Patch Pack

Post by Alberth »

Gwyd wrote:No it doesn't: it still crashed when I did the same thing with the same NewGRF.
Yes, so it's not because the internals of the savegame were messed up in some way. If a fresh game worked, the former would be the cause. That is, messed up savegame got eliminated as cause, because it crashes consistently rather than just in that one savegame.
Being a retired OpenTTD developer does not mean I know what I am doing.
p4nzer
Engineer
Engineer
Posts: 31
Joined: 27 Jun 2017 21:43

Re: JGR's Patch Pack

Post by p4nzer »

I think I made something of a mistake. I changed the daylength in one save, and when I opened another save it had messed with all of the timetabling and dispatch scheduling in that save, despite the daylength being the same. Is there any way to fix this without deleting all of the schedules and starting over?
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Gwyd wrote:I shall let myself know. I'll check teh sounds, but I don't get why it doesn't work on your patch pack.
Sorry, didn't know that it was your GRF.
The sound in question appears to have 2 channels.
I've added some checks which log a suitable error message instead of aborting.
It'll be in the next release.
p4nzer wrote:I think I made something of a mistake. I changed the daylength in one save, and when I opened another save it had messed with all of the timetabling and dispatch scheduling in that save, despite the daylength being the same. Is there any way to fix this without deleting all of the schedules and starting over?
I'll look into it, if you could post the savegame that would be helpful.

Edit:
I'm not sure that I understand what you have done.
If you changed the day length and then overwrote your good savegame with it, then yes, you will most likely need to adjust scheduled dispatch start dates (i.e. by using the start date button).
If changing the daylength in one game and loading an unrelated game somehow adjusted your scheduled dispatches in the unrelated game, relative to just loading it directly, that would be a bug.
Ex TTDPatch Coder
Patch Pack, Github
p4nzer
Engineer
Engineer
Posts: 31
Joined: 27 Jun 2017 21:43

Re: JGR's Patch Pack

Post by p4nzer »

It would appear that daylength is a global variable, which I didn't know. Changing it back made everything go back to normal.

edit: but yes, changing daylength in one save overwrote schedules in every save.
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

p4nzer wrote:It would appear that daylength is a global variable, which I didn't know. Changing it back made everything go back to normal.

edit: but yes, changing daylength in one save overwrote schedules in every save.
The day length variable is saved to and loaded from the savegame. I cannot reproduce any problem of this type.
Are you sure that you are not changing the client time display settings instead? (Ticks per minute, etc.)

The only potential problem that I can find with scheduled dispatch is multiplayer-related.
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 »

While I have not tested in multiplayer, I have written the schedule dispatch with multi-player in mind (that is also why date/time stuff in the patch is stored in complicated way) and unless I miss, I believe it would work as-is in multiplayer. Working with tick system under the day-length patch is confusing :P

Minute-per-day and minute offset are global setting, though if you revert everything back it should make everything looks normal again. Note that those two settings are purely for UI, so if those are changed, and while the dispatch schedule and timetable will look very weird, it is actually functioning the same (i.e. dispatching train on the same interval as before the change).
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

ino wrote:While I have not tested in multiplayer, I have written the schedule dispatch with multi-player in mind (that is also why date/time stuff in the patch is stored in complicated way) and unless I miss, I believe it would work as-is in multiplayer. Working with tick system under the day-length patch is confusing :P

Minute-per-day and minute offset are global setting, though if you revert everything back it should make everything looks normal again. Note that those two settings are purely for UI, so if those are changed, and while the dispatch schedule and timetable will look very weird, it is actually functioning the same (i.e. dispatching train on the same interval as before the change).
It mostly looks fine to me. OrderList::ResetScheduledDispatch() looks problematic though as it is called in command context and depends on the local setting for whether time is displayed in minutes, and the ticks per minute.
In an MP game, a CMD_SCHEDULED_DISPATCH enable command on a vehicle which hadn't previously been used with scheduled dispatch looks like it would initialise the vehicle with different values on the different machines.
In the past similar constructs around these two settings have caused desync bug reports.
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: It mostly looks fine to me. OrderList::ResetScheduledDispatch() looks problematic though as it is called in command context and depends on the local setting for whether time is displayed in minutes, and the ticks per minute.
In an MP game, a CMD_SCHEDULED_DISPATCH enable command on a vehicle which hadn't previously been used with scheduled dispatch looks like it would initialise the vehicle with different values on the different machines.
In the past similar constructs around these two settings have caused desync bug reports.
Ouch. Totally forgotten about that. Will fix.
Kruemelchen
Transport Coordinator
Transport Coordinator
Posts: 287
Joined: 18 Feb 2017 17:47

Re: JGR's Patch Pack

Post by Kruemelchen »

Hi JGR,

due to the recent additions of patches, I have been greeted at every start of OpenTTD by an ever-growing number of missing translated strings (in my case German). And since it grew to a number at which I could say it bugged my ingame experience a little bit, I decided to do some translations on my own and (possibly) submit them upstream.

However I'm not so sure as to whereto submit my translations of the strings of the various patches and additions, so maybe I asked myself it would be okay to submit it to the patch pack instead :?:

Anyway, here is the language file:
german.txt
German language file
(520.11 KiB) Downloaded 29 times
PS: Or should I create a .diff? You can however easily see my additions by comparing it with the language file for v. 20.1.
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: JGR's Patch Pack

Post by michael blunck »

Kruemelchen wrote: Anyway, here is the language file:
Are these all missing translations? I don´t think so.

Nevertheless, some remarks (mostly trunk translations):

Code: Select all

STR_TOOLTIP_RESIZE                                              :{BLACK}Klicken und Ziehen zum Ändern der Größe des Fensters
STR_TOOLTIP_TOGGLE_LARGE_SMALL_WINDOW                           :{BLACK}Zwischen Fenstergrößen umschalten
I´d like to see "Fenstergröße" and "Größe des Fensters" unified to "Fenstergröße".

Code: Select all

STR_TOOLBAR_TOOLTIP_FUND_CONSTRUCTION_OF_NEW                    :{BLACK}Liste aller Industrien oder Errichtung und Finanzierung einer neuen Industrie
-> Liste aller Industrien anzeigen, sowie Errichtung oder Finanzierung einer neuen Industrie
But since "prospection" means "Erkundung", I´d like to propose
-> Liste aller Industrien anzeigen, sowie Erkundung von Rohstoffen oder Finanzierung einer neuen Industrie

STR_SMALLMAP_TOOLTIP_SHOW_LINK_STATS_ON_MAP :{BLACK}Zeige Frachtverbindungen auf Karte
-> Zeige Frachtverbindungen auf der Karte
or better, since every other string uses "Weltkarte"
-> Zeige Frachtverbindungen auf der Weltkarte

Code: Select all

STR_SMALLMAP_TOOLTIP_COMPANY_SELECTION                          :{BLACK}Anzeigeeigenschaften mit Klick auf Firma ändern. Strg+Klick deaktiviert alle Firmen außer die ausgewählte. Wiederholtes Strg+Klick aktiviert alle Firmen
-> Anzeigeeigenschaften mit Klick auf Firma ändern. Strg+Klick deaktiviert alle Firmen außer der ausgewählten. Wiederholtes Strg+Klick aktiviert alle Firmen

regards
Michael
Image
Kruemelchen
Transport Coordinator
Transport Coordinator
Posts: 287
Joined: 18 Feb 2017 17:47

Re: JGR's Patch Pack

Post by Kruemelchen »

michael blunck wrote:
Kruemelchen wrote: Anyway, here is the language file:
Are these all missing translations? I don´t think so.
There are still a few strings (let's say around 4) missing, which I didn't think I could correctly translate without 'diving further into the matter'.

However, I translated merely the patches (or some minor spelling corrections to 3 or so trunk translations). Your additions are very welcome :D

(and if you spot some mistranslations in my strings, you're free to correct them or just contact me and I'll look into it :) )
Auge
Director
Director
Posts: 633
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: JGR's Patch Pack

Post by Auge »

Hello
Kruemelchen wrote:… I decided to do some translations on my own …
"Some translations" is a euphemism at all. As far I can see and as you stated yourself it's a more or less complete translation. Congratulations.
Kruemelchen wrote:You can however easily see my additions by comparing it with the language file for v. 20.1.
You took the 20.1 language file as the base for your translations? Please check the list of closed pull requests of JGRPP, because I translated a few patch settings and ingame strings during the last weeks (german translation parts 4 and 5). Maybe you can improve my translations or vice versa. For preventing double work it seems to be to late. :-)

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

Re: JGR's Patch Pack

Post by SimYouLater »

JGR wrote:
p4nzer wrote:It would appear that daylength is a global variable, which I didn't know. Changing it back made everything go back to normal.

edit: but yes, changing daylength in one save overwrote schedules in every save.
The day length variable is saved to and loaded from the savegame. I cannot reproduce any problem of this type.
Are you sure that you are not changing the client time display settings instead? (Ticks per minute, etc.)

The only potential problem that I can find with scheduled dispatch is multiplayer-related.
ino wrote:
JGR wrote:
ino wrote:While I have not tested in multiplayer, I have written the schedule dispatch with multi-player in mind (that is also why date/time stuff in the patch is stored in complicated way) and unless I miss, I believe it would work as-is in multiplayer. Working with tick system under the day-length patch is confusing :P

Minute-per-day and minute offset are global setting, though if you revert everything back it should make everything looks normal again. Note that those two settings are purely for UI, so if those are changed, and while the dispatch schedule and timetable will look very weird, it is actually functioning the same (i.e. dispatching train on the same interval as before the change).
It mostly looks fine to me. OrderList::ResetScheduledDispatch() looks problematic though as it is called in command context and depends on the local setting for whether time is displayed in minutes, and the ticks per minute.
In an MP game, a CMD_SCHEDULED_DISPATCH enable command on a vehicle which hadn't previously been used with scheduled dispatch looks like it would initialise the vehicle with different values on the different machines.
In the past similar constructs around these two settings have caused desync bug reports.
Ouch. Totally forgotten about that. Will fix.
Would that have anything to do with my inability to use the clock with certain settings?

The settings I'm trying to combine are...
  • Show time in minutes rather than days: On
  • Enter timetable start times in text (requires time to be in minutes): On (but doesn't fix it by being off)
  • Ticks per minute: 255 (longer minutes)
  • Clock offset in minutes: 0 (should be changed? It didn't help when I tried, just changed the negative numbers)
  • Round up auto-filled timetables times to multiples of this many ticks: 85 (20 seconds under the 255 tick setting?)
  • Day length factor: 125 (very long days)
...but it gives me weird times like "-H:-M" (with numbers at least). I'll include my config as well...
openttd.cfg
(47.15 KiB) Downloaded 23 times
Attachments
Unnamed, 2100-01-01.png
(352.06 KiB) Not downloaded yet
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.
Kruemelchen
Transport Coordinator
Transport Coordinator
Posts: 287
Joined: 18 Feb 2017 17:47

Re: JGR's Patch Pack

Post by Kruemelchen »

Thank you, Auge :)
Auge wrote:You took the 20.1 language file as the base for your translations? Please check the list of closed pull requests of JGRPP, because I translated a few patch settings and ingame strings during the last weeks (german translation parts 4 and 5). Maybe you can improve my translations or vice versa. For preventing double work it seems to be to late. :-)
Thank you for your contribution, I'll have a look at your commits :D
Well it didn't take me long, and I'm glad I can now compare them!

I guess I should take the chance to finally get myself a github account then :mrgreen:
I'll then rework the translations and do a pull request anytime soon!
Maybe we'll then have a full translation when everything is combined :wink:

cheers
User avatar
JGR
Tycoon
Tycoon
Posts: 2557
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

SimYouLater wrote:Would that have anything to do with my inability to use the clock with certain settings?

The settings I'm trying to combine are...
  • Show time in minutes rather than days: On
  • Enter timetable start times in text (requires time to be in minutes): On (but doesn't fix it by being off)
  • Ticks per minute: 255 (longer minutes)
  • Clock offset in minutes: 0 (should be changed? It didn't help when I tried, just changed the negative numbers)
  • Round up auto-filled timetables times to multiples of this many ticks: 85 (20 seconds under the 255 tick setting?)
  • Day length factor: 125 (very long days)
...but it gives me weird times like "-H:-M" (with numbers at least). I'll include my config as well...

openttd.cfg
This is due to numeric overflow in the function(s) which convert tick counts to HH:MM strings. It's fixed now.
At day-lengths that high, the tick count no longer fits into a 32-bit signed integer. Somehow those functions got missed when changing types and field sizes.
Thanks for the bug report. It'll be in the next release.
Kruemelchen wrote:Thank you, Auge :)
Auge wrote:You took the 20.1 language file as the base for your translations? Please check the list of closed pull requests of JGRPP, because I translated a few patch settings and ingame strings during the last weeks (german translation parts 4 and 5). Maybe you can improve my translations or vice versa. For preventing double work it seems to be to late. :-)
Thank you for your contribution, I'll have a look at your commits :D
Well it didn't take me long, and I'm glad I can now compare them!

I guess I should take the chance to finally get myself a github account then :mrgreen:
I'll then rework the translations and do a pull request anytime soon!
Maybe we'll then have a full translation when everything is combined :wink:

cheers
I'd be happy to merge your translations when you feel that they are ready.
Many thanks for your contributions.
Ex TTDPatch Coder
Patch Pack, Github
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: JGR's Patch Pack

Post by SimYouLater »

JGR wrote:
SimYouLater wrote:Would that have anything to do with my inability to use the clock with certain settings?

The settings I'm trying to combine are...
  • Show time in minutes rather than days: On
  • Enter timetable start times in text (requires time to be in minutes): On (but doesn't fix it by being off)
  • Ticks per minute: 255 (longer minutes)
  • Clock offset in minutes: 0 (should be changed? It didn't help when I tried, just changed the negative numbers)
  • Round up auto-filled timetables times to multiples of this many ticks: 85 (20 seconds under the 255 tick setting?)
  • Day length factor: 125 (very long days)
...but it gives me weird times like "-H:-M" (with numbers at least). I'll include my config as well...

openttd.cfg
This is due to numeric overflow in the function(s) which convert tick counts to HH:MM strings. It's fixed now.
At day-lengths that high, the tick count no longer fits into a 32-bit signed integer. Somehow those functions got missed when changing types and field sizes.
Thanks for the bug report. It'll be in the next release.
Thank you! When I started reading "numerical overflow" (the thing that caused old high score games to roll over, or similar, right?) I thought "Oh. I'll have to hold back on the numbers then because i went too far." Glad that it can be (relatively) easily fixed. No problem for the bug report. I've had it for months and for some stupid reason never thought to let you know. >_<
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
kamnet
Moderator
Moderator
Posts: 8548
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: JGR's Patch Pack

Post by kamnet »

I managed to break 0.20.1! I generated an out of memory error while loading up as many NewGRFs as I could (I think I'm right near the limit) and intentionally adding/modifying/removing them. You probably don't have a lot of the NewGRFs used. Here's the crash files, if they're of any use. If you want a copy of all the files, I'll upload them someplace - some of them aren't public files. :)

I hate to say it, but I had fun breaking it ;)
Attachments
crash.tar
(19.34 MiB) Downloaded 30 times
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 11 guests