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
kamnet
Moderator
Moderator
Posts: 8591
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: JGR's Patch Pack

Post by kamnet »

kolcon wrote: 15 Jan 2024 08:22 It's there any newgrf available yet that has the multi-cargo ships?
Not that I'm aware of. I don't know of anybody who is working on it. All the coders I know are already in the middle of projects. If one does become available, you might want to be over on the official Discord to get first wind of it.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

kolcon wrote: 15 Jan 2024 08:22 It's there any newgrf available yet that has the multi-cargo ships?
I've only got as far as verifying that the feature works as expected.
If I get time I may look into making a modified version of a suitable existing ship GRF to support this.
Ex TTDPatch Coder
Patch Pack, Github
alc
Engineer
Engineer
Posts: 24
Joined: 04 Sep 2019 18:42

Re: JGR's Patch Pack

Post by alc »

Hi JGR!
As always, many thanks for your contribution to the game.
I have a crash. I was also making my stations longer to accept newer trains but one of my trains old trains dislike it...
I loaded the chrash...sav and didn't crash and seems ok.
If you can have a look to understand what cause the error I will much appreciated.

Best regards and :bow:
Alberto
Attachments
crash-20240116T103159Z.png
(736.35 KiB) Not downloaded yet
crash-20240116T103159Z.sav
(1.57 MiB) Downloaded 44 times
crash-20240116T103159Z.log.txt
(45.53 KiB) Downloaded 50 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

alc wrote: 16 Jan 2024 10:55 Hi JGR!
As always, many thanks for your contribution to the game.
I have a crash. I was also making my stations longer to accept newer trains but one of my trains old trains dislike it...
I loaded the chrash...sav and didn't crash and seems ok.
If you can have a look to understand what cause the error I will much appreciated.

Best regards and :bow:
Alberto
Thanks, this should be fixed in the next release now.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

JGR wrote: 16 Jan 2024 09:02
kolcon wrote: 15 Jan 2024 08:22 Is there any newgrf available yet that has the multi-cargo ships?
I've only got as far as verifying that the feature works as expected. ...
CSL Hovercraft.png
CSL Hovercraft.png (80.85 KiB) Viewed 9721 times
I can confirm, that multi-cargo ships work just fine, these are however not yet available ...

But, this cannot be said of the 'Transparent' mode (glass effect), it no longer works in JGR-PP v0.56.2, but there is no problem in OpenTTD v13.4.

This affects all features that have sprites, like glass panels and roof shadows, to be shown in transparent mode (have bit 14 set) and even includes the glass panels of the Original TTD Station Roof. The sprite in question shows up in the sprite aligner as normal, but has zero effect in game and does not even display at all.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

OzTrans wrote: 17 Jan 2024 08:34 But, this cannot be said of the 'Transparent' mode (glass effect), it no longer works in JGR-PP v0.56.2, but there is no problem in OpenTTD v13.4.

This affects all features that have sprites, like glass panels and roof shadows, to be shown in transparent mode (have bit 14 set) and even includes the glass panels of the Original TTD Station Roof. The sprite in question shows up in the sprite aligner as normal, but has zero effect in game and does not even display at all.
I cannot reproduce anything like that. Sprites look fine here.

The only relevant thing that i can think of this: https://github.com/OpenTTD/OpenTTD/pull/11616, is this what you are talking about?
Ex TTDPatch Coder
Patch Pack, Github
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

JGR wrote: 17 Jan 2024 19:48
OzTrans wrote: 17 Jan 2024 08:34 ... 'Transparent' mode ...
I cannot reproduce anything like that. Sprites look fine here.

The only relevant thing that i can think of this: https://github.com/OpenTTD/OpenTTD/pull/11616, is this what you are talking about?
Could be ... Look at the shadows created by the the station roofs ... not there any more ... all sprites are in paletted 8bpp ...

Transparent Mode A.png
Transparent Mode A.png (86.01 KiB) Viewed 9558 times
... and here is the code that works in OpenTTD v13.4 but not in JGR-PP ...

Code: Select all

// DEFSTNLAY STATIONCODE(PC.PLNR) TILEID(++) ;
//    LAYOUT(*B2_PLATFORM_REAR_NRM ;
//           *B2_PLATFORM_REAR_SNO ;
//           *B1_STN_FENCE_N3 ;
//           *B2_ROOF_REAR_NRM ;
//           *B2_ROOF_REAR_SNO ;
//           *B2_ROOF_REAR_SHDW ;
//           *B2_PLATFORM_FRONT_NRM ;
//           *B2_PLATFORM_FRONT_SNO ;
//           *B2_ROOF_FRNT_NRM ;
//           *B2_ROOF_FRNT_SNO ;
//           *B2_ROOF_FRNT_SHDW ;
//           *B1_STN_FENCE_S2 ;
//           *CO_SIGN_AVL_1947P) ;
//    GROUNDSPRITE(*RAIL_TRACK) ;
//    COMMENT(Plain Platforms [roofed] - single)
              
 4D   F3 03 00 00 00 00  E4 04 00 C0 41 00 00 00 00 05 0C 04 60 04 
                         E6 04 00 C0 41 00 00 00 00 05 0C 04 61 04 
                         9A 04 00 80 43 00 00 00 00 02 10 04 53 22 04
                         18 05 00 80 41 00 00 00 00 05 10 0C 60 04 
                         1A 05 00 80 41 00 00 00 00 05 10 0C 61 04 
                         1C 45 00 80 40 00 00 00 00 05 10 0E 04          <<<< Shadows, with bit 14 set in sprite number.
                         EA 04 00 C0 41 00 0B 00 00 02 0A 04 60 04 
                         EC 04 00 C0 41 00 0B 00 00 02 0A 04 61 04 
                         1E 05 00 80 41 00 0B 00 00 04 10 0A 60 04 
                         20 05 00 80 41 00 0B 00 00 04 10 0A 61 04 
                         22 45 00 80 40 00 0C 00 00 05 10 0E 04          <<<< Shadows 
                         9E 04 00 80 43 00 10 00 00 02 10 04 52 22 04 
                         32 04 00 80 41 00 00 00 00 00 00 00 41 03
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

OzTrans wrote: 17 Jan 2024 23:05
JGR wrote: 17 Jan 2024 19:48
OzTrans wrote: 17 Jan 2024 08:34 ... 'Transparent' mode ...
I cannot reproduce anything like that. Sprites look fine here.

The only relevant thing that i can think of this: https://github.com/OpenTTD/OpenTTD/pull/11616, is this what you are talking about?
Could be ... Look at the shadows created by the the station roofs ... not there any more ... all sprites are in paletted 8bpp ...


Transparent Mode A.png

... and here is the code that works in OpenTTD v13.4 but not in JGR-PP ...

Code: Select all

// DEFSTNLAY STATIONCODE(PC.PLNR) TILEID(++) ;
//    LAYOUT(*B2_PLATFORM_REAR_NRM ;
//           *B2_PLATFORM_REAR_SNO ;
//           *B1_STN_FENCE_N3 ;
//           *B2_ROOF_REAR_NRM ;
//           *B2_ROOF_REAR_SNO ;
//           *B2_ROOF_REAR_SHDW ;
//           *B2_PLATFORM_FRONT_NRM ;
//           *B2_PLATFORM_FRONT_SNO ;
//           *B2_ROOF_FRNT_NRM ;
//           *B2_ROOF_FRNT_SNO ;
//           *B2_ROOF_FRNT_SHDW ;
//           *B1_STN_FENCE_S2 ;
//           *CO_SIGN_AVL_1947P) ;
//    GROUNDSPRITE(*RAIL_TRACK) ;
//    COMMENT(Plain Platforms [roofed] - single)
              
 4D   F3 03 00 00 00 00  E4 04 00 C0 41 00 00 00 00 05 0C 04 60 04 
                         E6 04 00 C0 41 00 00 00 00 05 0C 04 61 04 
                         9A 04 00 80 43 00 00 00 00 02 10 04 53 22 04
                         18 05 00 80 41 00 00 00 00 05 10 0C 60 04 
                         1A 05 00 80 41 00 00 00 00 05 10 0C 61 04 
                         1C 45 00 80 40 00 00 00 00 05 10 0E 04          <<<< Shadows, with bit 14 set in sprite number.
                         EA 04 00 C0 41 00 0B 00 00 02 0A 04 60 04 
                         EC 04 00 C0 41 00 0B 00 00 02 0A 04 61 04 
                         1E 05 00 80 41 00 0B 00 00 04 10 0A 60 04 
                         20 05 00 80 41 00 0B 00 00 04 10 0A 61 04 
                         22 45 00 80 40 00 0C 00 00 05 10 0E 04          <<<< Shadows 
                         9E 04 00 80 43 00 10 00 00 02 10 04 52 22 04 
                         32 04 00 80 41 00 00 00 00 00 00 00 41 03
The closest GRF that I have to what appears to be in your screenshot is Canadian Stations v1.6.
I cannot reproduce any such problems with this GRF in any blitter configuration.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: JGR's Patch Pack

Post by OzTrans »

JGR wrote: 18 Jan 2024 13:57... Transparent Mode ...
I've got the culprit ...

We have to go back to the old days of TTDPatch. BTW, Canadian Stations v1.6 was coded to be TTDPatch compatible, that is why it works there.

In newer developments, I did no longer also add the recolour sprite (802) to the sprite number (by mistake) and everything has been working well until now. Up until at least v13.4 transparent mode worked with or without the recolour sprite 802. This has been the case for rail stations as well as road stops and objects.

Anyway, thanks for looking into it. Back in business again ...
SparkyMarkyR33
Engineer
Engineer
Posts: 10
Joined: 16 Feb 2020 17:18

Re: JGR's Patch Pack

Post by SparkyMarkyR33 »

Hi all.. quick question to anyone who might know, but is there a place I can check to see where passengers/cargo on vehicles are going to? a bit like the stations cargo screen which says where passengers/cargo want(s) to go but for the vehicle itself. At the moment it says e.g. 'X amount 'of passengers from 'Y station'. But if it had a drop down to show - 10 passenger to here, 20 passenger to there etc.

if not, is this something that could be implemented at all? would be a nice feature (not necessarily important/functional, but for informative purposes)
dol422
Transport Coordinator
Transport Coordinator
Posts: 310
Joined: 29 Dec 2015 20:06
Location: England

Re: JGR's Patch Pack

Post by dol422 »

SparkyMarkyR33 wrote: 21 Jan 2024 22:59 Hi all.. quick question to anyone who might know, but is there a place I can check to see where passengers/cargo on vehicles are going to? a bit like the stations cargo screen which says where passengers/cargo want(s) to go but for the vehicle itself. At the moment it says e.g. 'X amount 'of passengers from 'Y station'. But if it had a drop down to show - 10 passenger to here, 20 passenger to there etc.

if not, is this something that could be implemented at all? would be a nice feature (not necessarily important/functional, but for informative purposes)
Cargo distribution? If you set it to asymmetric or symmetric it will show where cargo wants to go and how much.
Take a look at: http://www.tt-forums.net/viewtopic.php?f=47&t=74993
Why do it tomorrow when you can do it today
User avatar
jfs
Tycoon
Tycoon
Posts: 1764
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: JGR's Patch Pack

Post by jfs »

SparkyMarkyR33 wrote: 21 Jan 2024 22:59 Hi all.. quick question to anyone who might know, but is there a place I can check to see where passengers/cargo on vehicles are going to? a bit like the stations cargo screen which says where passengers/cargo want(s) to go but for the vehicle itself. At the moment it says e.g. 'X amount 'of passengers from 'Y station'. But if it had a drop down to show - 10 passenger to here, 20 passenger to there etc.

if not, is this something that could be implemented at all? would be a nice feature (not necessarily important/functional, but for informative purposes)
That's not how CargoDist works, though. The cargo has a provisional destination while waiting at a station, which is used to decide which vehicles it will want to get loaded onto. But as soon as it gets loaded onto a vehicle, it "forgets" that destination. Then it will just unload at some random station later, where it might either decide to be delivered, if it can, or transfer to another vehicle, if there are any that would not just bring it further in the same direction or backwards.
SparkyMarkyR33
Engineer
Engineer
Posts: 10
Joined: 16 Feb 2020 17:18

Re: JGR's Patch Pack

Post by SparkyMarkyR33 »

Cargo distribution? If you set it to asymmetric or symmetric it will show where cargo wants to go and how much.

I know that part, I apologise if there was some misunderstanding. I was wondering if there was a part in the vehicle information window specifically that might expand on the cargo inside the vehicle itself


That's not how CargoDist works, though. The cargo has a provisional destination while waiting at a station, which is used to decide which vehicles it will want to get loaded onto. But as soon as it gets loaded onto a vehicle, it "forgets" that destination. Then it will just unload at some random station later, where it might either decide to be delivered, if it can, or transfer to another vehicle, if there are any that would not just bring it further in the same direction or backwards.


Ahh thanks anyway, would of been a nice thing to have show up
alc
Engineer
Engineer
Posts: 24
Joined: 04 Sep 2019 18:42

Re: JGR's Patch Pack

Post by alc »

Hi JGR,
this time, I am not finding any bug. What I would like is to request you a feature where on the station history graph, that currently is up to 48 days if it is possible to add a button on the history window to switch between 48 day or 48 months.
Having a longer history allows to see a long term behavior of the transport capacity. I have stations with thousands of passanger that I want to reduce, then I add more capacity but I get lost if in the mid term is working or not.
It could be implemented with a daily accumulation in a variable and then divided by the number of days of that month. In order to avoid a lag of the game the first day of the month, it could be done, for instance, every day 15 of each month.

As always, :bow: :bow: :bow:
Alberto
Argus
Tycoon
Tycoon
Posts: 1204
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

I have a problem. He's been in Tycoon for a long time and I have no idea if he has a solution.
I have a train that goes to two stations. In one, another train transfers cattle, because running the track to the receiving station would be complicated at that point by other, unrelated trains.
So the train receives the cattle, and unloads at the second station, and loads the meat and fish.
So in both stations, if possible, it loads and unloads the required cargo, but not all.
But when I give this command, it looks like the car has no commands.
Why is it hiding like this and can it be solved?
Attachments
Quigley & Co., 11. kvě 1967.png
(172.78 KiB) Not downloaded yet
Argus
Tycoon
Tycoon
Posts: 1204
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

My point is that it's confusing to me, if I come back to the game after a long time I may think I forgot to give commands to the train.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

alc wrote: 24 Jan 2024 13:47 Hi JGR,
this time, I am not finding any bug. What I would like is to request you a feature where on the station history graph, that currently is up to 48 days if it is possible to add a button on the history window to switch between 48 day or 48 months.
Having a longer history allows to see a long term behavior of the transport capacity. I have stations with thousands of passanger that I want to reduce, then I add more capacity but I get lost if in the mid term is working or not.
It could be implemented with a daily accumulation in a variable and then divided by the number of days of that month. In order to avoid a lag of the game the first day of the month, it could be done, for instance, every day 15 of each month.

As always, :bow: :bow: :bow:
Alberto
I can look into something along these lines. I'm not too keen to allow the amount of storage for histories to be very large, as this wastes memory, but summarising old histories into weekly/monthly/etc averages is likely doable.
Argus wrote: 27 Jan 2024 13:36 I have a problem. He's been in Tycoon for a long time and I have no idea if he has a solution.
I have a train that goes to two stations. In one, another train transfers cattle, because running the track to the receiving station would be complicated at that point by other, unrelated trains.
So the train receives the cattle, and unloads at the second station, and loads the meat and fish.
So in both stations, if possible, it loads and unloads the required cargo, but not all.
But when I give this command, it looks like the car has no commands.
Why is it hiding like this and can it be solved?
I am finding it difficult to understand what you are actually asking. If you are talking about the full load and unload dropdowns, then the defaults are "Pokud možno naložit" and "Vyložit vyžadovaný náklad". These are what are used for normal orders and so don't need extra text in the order listing.
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1204
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

Yes, I understand. But if there is no text, how can I be sure that the command is correct the next time I upload this game? I don't always have to remember why that is. And in my opinion, it can be unnecessarily confusing even for newbies.
It's not a bug, it's just a cosmetic flaw. Basically, I just wanted to ask why this is the case and if it would be possible to set the text to be there anyway.
If that's not possible for some reason, I understand.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Argus wrote: 27 Jan 2024 14:56 Yes, I understand. But if there is no text, how can I be sure that the command is correct the next time I upload this game? I don't always have to remember why that is. And in my opinion, it can be unnecessarily confusing even for newbies.
It's not a bug, it's just a cosmetic flaw. Basically, I just wanted to ask why this is the case and if it would be possible to set the text to be there anyway.
If that's not possible for some reason, I understand.
This is the default state. Every order having redundant text next to it to say that it is the default is not really helpful.
Ex TTDPatch Coder
Patch Pack, Github
Argus
Tycoon
Tycoon
Posts: 1204
Joined: 16 Oct 2018 08:31
Location: Heart of the Highlands. Not Scottish. Czech.

Re: JGR's Patch Pack

Post by Argus »

Yes, but there is no text, so from my perspective it looks like I didn't set the command correctly.
Now the only way to make sure the command is working is to watch what the train is doing.
But okay, I understand why that is. Although not completely. I think my logic conflicts with the developers logic. :lol:
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 19 guests