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

michael blunck
Tycoon
Tycoon
Posts: 5954
Joined: 27 Apr 2005 07:09
Contact:

Re: JGR's Patch Pack

Post by michael blunck »

OzTrans wrote: What was the outcome ?
JGR wrote: If you're going to use action 1 I'd suggest that you try putting the different sprites into the same sprite set and use the register as an index into the sprite set.
That's it:

viewtopic.php?p=1061449#p1061449

However, it's a nuisance.

regards
Michael
Image
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1714
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

JGR wrote: 18 Sep 2023 08:18 If you're going to use action 1 I'd suggest that you try putting the different sprites into the same sprite set and use the register as an index into the sprite set.
That is really an interesting approach. I didn't know something like that is even possible. However, I was always wondering, why in the action-1 the number of sprites within a spriteset can be an extended byte and the number of sets is not unless you use the extended format.

Anyway, I'll give this a try.
michael blunck wrote: 18 Sep 2023 09:48 That's it:

viewtopic.php?p=1061449#p1061449

However, it's a nuisance.
Many thanks to pointing that out.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1714
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

Beautiful !!

Image

Many thanks for the tips and tricks, it works.
Attachments
River Bridges C.png
(435.18 KiB) Not downloaded yet
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

In the road menu, I get meaningless speed limits instead of real ones.
https://prnt.sc/xvVrgcd6Zecz
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 22 Sep 2023 17:23 In the road menu, I get meaningless speed limits instead of real ones.
https://prnt.sc/xvVrgcd6Zecz
Thanks, this will be fixed in the next release.
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

When I want to enter an auto-renew amount and I put 100 or 200,000, it rounds down senselessly. When I enter say 120,000, it's suddenly fine.
That didn't happen before.
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 23 Sep 2023 13:25 When I want to enter an auto-renew amount and I put 100 or 200,000, it rounds down senselessly. When I enter say 120,000, it's suddenly fine.
That didn't happen before.
Which currency are you using?
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

This is different, in this case it was Polish currency.
I'm not sure if this happens with other currency too as today is the first time it happened to me.
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 23 Sep 2023 14:37 This is different, in this case it was Polish currency.
I'm not sure if this happens with other currency too as today is the first time it happened to me.
£1 is 6zł. 100,000 is not evenly divisible by 6.
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

But I want it to be 100,000 gold, not pounds. The game does not have to recalculate anything, just set the desired amount. A strange mistake, this one.
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 23 Sep 2023 15:12 But I want it to be 100,000 gold, not pounds. The game does not have to recalculate anything, just set the desired amount. A strange mistake, this one.
All money values are in £. Other currencies are just for display.
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1309
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

I understand. In that case, it's okay. :)
Chillluca
Engineer
Engineer
Posts: 4
Joined: 25 Sep 2023 12:37
Location: Braga - Portugal

Re: JGR's Patch Pack

Post by Chillluca »

Hi there,

I’m a long time player of OpenTTD and I played both on Mac and on Android tablet moving between them.

I’ve discovered JGRPP one year ago and since I’ve “moved” all my saved games to this due to the great improvements.

Unfortunately I’ve made a mess with some saved games I’m playing: some are using version 0.40.4 (playable both on MacOS and Android via Pelya app on PlayStore) and some with version 0.55.1 (only playable on MacOS).

In the past I stopped using my tablet and moved all games on MacOS and upgrading various version up to 0.55.1. Few months ago I wanted to re-start to play with my Android Tablet but all games with version higher than 0.40.4 are not playable. As just stated I’m using Pelya JGRPP app that was updated last time on march 2021 and it’s equivalent to version 0.40.4

Questions: is there a way to “downgrade” the version of a saved game, even (maybe) risking a crash error?
Or alternatively is there a more updated version (at least 0.55.1) of the JGRPP ported to Android somewhere else other than the Google PlayStore?

I’m not a developer so I don’t know how to port/compile versions available on GitHub.

Many thanks in advance. :)

Regards
Luca
User avatar
kamnet
Moderator
Moderator
Posts: 8705
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: JGR's Patch Pack

Post by kamnet »

Chillluca wrote: 27 Sep 2023 13:08 Questions: is there a way to “downgrade” the version of a saved game, even (maybe) risking a crash error?

No.
Or alternatively is there a more updated version (at least 0.55.1) of the JGRPP ported to Android somewhere else other than the Google PlayStore?
Also no, the JGRPP port to Android was handled by the same person who ported OpenTTD to Android. He's currently drafted into the Ukranian military and will get back to it at a later date.
Chillluca
Engineer
Engineer
Posts: 4
Joined: 25 Sep 2023 12:37
Location: Braga - Portugal

Re: JGR's Patch Pack

Post by Chillluca »

Kamnet,

Thanks for the answers: it's not what I expected but ... it's better to face the truth :mrgreen:

Luca
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1714
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

An annoying crash ...

Steps to reproduce :

. Open Sprite Aligner
. 'Pick (any) Sprite'
. Close Sprite Aligner window

. Re-Open Sprite Aligner

(list of sprite numbers are still shown)

. Click any of those sprite numbers > crash

No crash if '(Re) Pick (any) Sprite' is performed beforehand, followed by selecting a sprite number.
Attachments
crash-20231014T221006Z.log.txt
(12.71 KiB) Downloaded 1578 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

OzTrans wrote: 14 Oct 2023 23:40 An annoying crash ...

Steps to reproduce :

. Open Sprite Aligner
. 'Pick (any) Sprite'
. Close Sprite Aligner window

. Re-Open Sprite Aligner

(list of sprite numbers are still shown)

. Click any of those sprite numbers > crash

No crash if '(Re) Pick (any) Sprite' is performed beforehand, followed by selecting a sprite number.
This is fixed now, it'll be in the next release.
Ex TTDPatch Coder
Patch Pack, Github
whoami
Engineer
Engineer
Posts: 4
Joined: 14 Jan 2007 00:06
Location: Germany

Re: JGR's Patch Pack

Post by whoami »

So recently, the conditional orders in JGRPP were changed a little: instead of "jump if next station accepts ...", which worked well, it is now necessary to specify the station. I wish it still would allow to choose the "next station" (and take this as default), in addition to the more flexible new method. This would make it easier to copy and adapt schedules.
As a related idea, I would like to be able to specify "accepts any of my freight" (and use this as default), and "accepts all of my freight" in addition to specifying a particular goods type. That would allow more sharing of schedules, but hopefully still works nicely with dynamic refitting.
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1714
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

Close Adjacent Level Crossings and Safer Level Crossings have become a bit of a nuisance ...

Prior to the introduction of that feature; I had my own solution for nicer displays of multi track crossings, using multiple rail types (4), i.e. for single, north end, south end and middle rail tracks.

That has worked very well.

LC [prior Saver Crossing feature].png
LC [prior Saver Crossing feature].png (24.85 KiB) Viewed 107441 times

Now with Close Adjacent Level Crossings and Safer Level Crossings enabled, things do not look nice any more, unless I continue using my own solution. Those RV stopping lines need to go, which have been added to the rail track piece.

LC [with Saver Crossing enabled].png
LC [with Saver Crossing enabled].png (26.29 KiB) Viewed 107441 times

Now, I thought updating the graphics by moving the RV stopping line from the rail track sprite to the crossing furniture and removing the extra rail types would solve the issue. Unfortunately, it does not work, too much clippings.

LC [Clippings].png
LC [Clippings].png (23.81 KiB) Viewed 107441 times

Unless there is another solution; can we have a new varact2 variable for rail types, that provides the following :

a) single rail track (crossing furniture north and south side) [value 3]
b) multi rail track (crossing furniture north side only) [value 1]
c) multi rail track (crossing furniture south side only) [value 2]
d) multi rail track (NO crossing furniture) [value 0]

This info should already be present for the Close Adjacent Level Crossings feature.

This would enable me to remove the extra rail types while still using my old solution.

Just something for consideration ...
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: JGR's Patch Pack

Post by Eddi »

OzTrans wrote: 23 Nov 2023 23:36Now, I thought updating the graphics by moving the RV stopping line from the rail track sprite to the crossing furniture and removing the extra rail types would solve the issue. Unfortunately, it does not work, too much clippings.
you probably need to fiddle with bounding boxes to get that to work, and probably never catch all corner cases. better to keep it in the ground sprite.
This info should already be present for the Close Adjacent Level Crossings feature.
kinda, sorta, maybe... the problem is, the crossing reservation updates happen rarely enough that you can get away with calculating adjacent crossings on the fly. but when you want to use that in drawing as well, it must be saved in the tile itself, or you get a potential performance hit. and level crossings are probably the most densely packed tile in the game, maybe tied with industry tiles.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 21 guests