Polish PKP Set 2.0 - development thread

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

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

Re: Polish Set

Post by kamnet »

CTarana45 wrote: 15 Aug 2022 03:24 I'm now trying out the Polish Set! :D It looks very well done, and I'm learning about Train Brakes too!
Just a note for other users. The Polish PKP Set stopped development several years ago. The project was forked and continues development as the Polish Train Set. It has it's own development forum at https://openttd-polska.pl/Thread-Kolej-Polish-Train-Set. You may want to report any issues there. As it is a Polish language forum, please be mindful and translate your posts into Polish using an online translator. Thanks!
qamil
Engineer
Engineer
Posts: 3
Joined: 16 Feb 2023 17:27

Re: Polish PKP Set 2.0 - development thread

Post by qamil »

Hi,
I'm replying in this old topic, because Mewa/Mevva who forked Polish Train Set and released version 3.0.2 is inactive since some time, I don't know NML, so I have to ask here for help :D

OpenTTD 13.0 has broken compatibility with Polish Train Set 3.0.2. Since version openttd-20230106-master-g29af0f8c7b, no matter what you set in "Disable electric rails" setting, all vehicles can run on non-electrified rails. Previous version (openttd-20230105-master-g58068883f8) was still correct. Looking into changelog (https://cdn.openttd.org/openttd-nightli ... ngelog.txt) I'm assuming, that it is probably connected with fix https://github.com/OpenTTD/OpenTTD/pull/10315 - Don't assume engclass 2 should be elrail.

On the other hand, older version of Polish Train Set still works correctly in OTTD 13.0. Looking on the changelog of Polish Train Set, there is one train that is coded differently than in PKP Set 2.0 - ET26 Dragon 2 (polish train set\src\engines\et26.pnml). Since Polish Train Set 3.0.0 it has "disel mode" - as multi track loco, it can run on electrified and not electrified track, and have different parameters. I have copied et26.pnml from PKP Set 1.2.2 (in this version it was only available in electrified rails, without diesel mode) and voila, it works correctly. So the reason of problems is in et26.pnml file, which have some additional switches like switch(FEAT_TRAINS, SELF, switch_et26_graphics_diesel, current_railtype) - but why this is affecting whole NewGRF, and making problems with all other trains too?

To sum up, combination of these two changes (one in OTTD and one in PKP Set) is causing all trains from set running on non-electric track. Could you help me with finding the reason of this, and potentially fixing? Source code of these versions of Polish Train Set are available in https://openttd-polska.pl/showthread.ph ... 7#pid25947 (no account needed for downloading).

Regards,
qamil
Brickblock1
Engineer
Engineer
Posts: 117
Joined: 04 Apr 2022 12:44
Location: The openttd discord server

Re: Polish PKP Set 2.0 - development thread

Post by Brickblock1 »

qamil wrote: 16 Feb 2023 18:21 Hi,
I'm replying in this old topic, because Mewa/Mevva who forked Polish Train Set and released version 3.0.2 is inactive since some time, I don't know NML, so I have to ask here for help :D

OpenTTD 13.0 has broken compatibility with Polish Train Set 3.0.2. Since version openttd-20230106-master-g29af0f8c7b, no matter what you set in "Disable electric rails" setting, all vehicles can run on non-electrified rails. Previous version (openttd-20230105-master-g58068883f8) was still correct. Looking into changelog (https://cdn.openttd.org/openttd-nightli ... ngelog.txt) I'm assuming, that it is probably connected with fix https://github.com/OpenTTD/OpenTTD/pull/10315 - Don't assume engclass 2 should be elrail.
You are probably correct this would be because the track_type property is set to rail and not elrl which is wrong but worked before the change in openttd.
qamil wrote: 16 Feb 2023 18:21 On the other hand, older version of Polish Train Set still works correctly in OTTD 13.0. Looking on the changelog of Polish Train Set, there is one train that is coded differently than in PKP Set 2.0 - ET26 Dragon 2 (polish train set\src\engines\et26.pnml). Since Polish Train Set 3.0.0 it has "disel mode" - as multi track loco, it can run on electrified and not electrified track, and have different parameters. I have copied et26.pnml from PKP Set 1.2.2 (in this version it was only available in electrified rails, without diesel mode) and voila, it works correctly. So the reason of problems is in et26.pnml file, which have some additional switches like switch(FEAT_TRAINS, SELF, switch_et26_graphics_diesel, current_railtype) - but why this is affecting whole NewGRF, and making problems with all other trains too?
I believe it affects the entire grf becaouse the railtype table is defined there and removing it by replacing that file removes it and therefore it doesn't use the new fix in openttd. This is however just a theory and I would need to test it which I do not have time for now.
qamil wrote: 16 Feb 2023 18:21 To sum up, combination of these two changes (one in OTTD and one in PKP Set) is causing all trains from set running on non-electric track. Could you help me with finding the reason of this, and potentially fixing? Source code of these versions of Polish Train Set are available in https://openttd-polska.pl/showthread.ph ... 7#pid25947 (no account needed for downloading).
Fixing this should be as easy as changing every mention of RAIL in the properties of the electric trains to ELRL, but it might be a good idea to change the code to use the standardised railtype scheme and redo the et26 to work with any trackset. I would be able to make a separate grf to fix it but redoing the et26 won't be possible that route.
qamil wrote: 16 Feb 2023 18:21 Regards,
qamil
Brickblock1
Engineer
Engineer
Posts: 117
Joined: 04 Apr 2022 12:44
Location: The openttd discord server

Re: Polish PKP Set 2.0 - development thread

Post by Brickblock1 »

I have managed to get it to compile now but I wouldn't be able to upload it to bananas.
User avatar
kamnet
Moderator
Moderator
Posts: 8619
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Polish PKP Set 2.0 - development thread

Post by kamnet »

Brickblock1 wrote: 17 Feb 2023 16:57 I have managed to get it to compile now but I wouldn't be able to upload it to bananas.
It would be best to post it to the development thread on OpenTTD Polska.
Brickblock1
Engineer
Engineer
Posts: 117
Joined: 04 Apr 2022 12:44
Location: The openttd discord server

Re: Polish PKP Set 2.0 - development thread

Post by Brickblock1 »

kamnet wrote: 17 Feb 2023 17:45 It would be best to post it to the development thread on OpenTTD Polska.
For some reason it doesn't seam to work for me
qamil
Engineer
Engineer
Posts: 3
Joined: 16 Feb 2023 17:27

Re: Polish PKP Set 2.0 - development thread

Post by qamil »

Hi,

Brickblock1 helped a lot with fixing this, so today I'm releasing updated version of Polish Train Set 3.
https://github.com/qamil95/Polish-Train ... tag/v3.0.3
Changelog is not long:

Code: Select all

Fixed handling of electrified rail in OpenTTD 13 (Thanks for Brickblock1!)
Fixed EN63A (Impuls) graphics alignment
Added bulk cargo colours: ferrochrome (FIRS4), recyclables (XIS), biomass (XIS)
Fixed sources not compiling under latest NML
I hope that I would succesfully contact Mewa, or find another way to publish it as update on Bananas.

Best regards,
qamil
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 5 guests