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
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 286
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: JGR's Patch Pack

Post by ColdIce »

ino wrote:
05 Oct 2020 16:12
ColdIce wrote:
05 Oct 2020 16:06
Hy JGR,

I have a problem with conditional orders. I can't set the value more than 2047 solid cargo on a conditional order, but i can set higher value with liquid cargo. I'm using FIRS 1.4.4.
Liquid cargo is stored internally as a kiloliter. So 2047 solid cargo is equivalent to 2,047,000 liters.
:shock: :shock: thank you. well.. now I have a huge network to review :lol: :lol:
ImageImage

Lw25
Engineer
Engineer
Posts: 16
Joined: 09 Jun 2019 13:41

Re: JGR's Patch Pack

Post by Lw25 »

When I updated to newest one my game language changed from Polish to English. Is there any way of reverting it?

mak
Traffic Manager
Traffic Manager
Posts: 133
Joined: 30 Sep 2015 13:16

Re: JGR's Patch Pack

Post by mak »

Lw25 wrote:
14 Oct 2020 05:11
When I updated to newest one my game language changed from Polish to English. Is there any way of reverting it?
Yes. Start page, select 'game options'

User avatar
nirasa
Engineer
Engineer
Posts: 65
Joined: 03 Sep 2015 07:11
Location: Czech republic

Re: JGR's Patch Pack

Post by nirasa »

Can I see a list of stations somewhere, how many trains pass through them? Is there a list? Thanks

MLG
Engineer
Engineer
Posts: 23
Joined: 07 Sep 2020 15:12

Re: JGR's Patch Pack

Post by MLG »

nirasa wrote:
14 Oct 2020 13:49
Can I see a list of stations somewhere, how many trains pass through them? Is there a list? Thanks
Yes, click that station icon, rigth to the left from your money report. You can sort them by waiting cargo, but not by no. of vehicles. :( (of course the list can be sorted by name)
Hope, that this is at least partially useful...
You can write to me in English, or Czech.
Můžete mi psát česky, nebo anglicky.

Lw25
Engineer
Engineer
Posts: 16
Joined: 09 Jun 2019 13:41

Re: JGR's Patch Pack

Post by Lw25 »

mak wrote:
14 Oct 2020 07:14
Lw25 wrote:
14 Oct 2020 05:11
When I updated to newest one my game language changed from Polish to English. Is there any way of reverting it?
Yes. Start page, select 'game options'
It is not that simple. I don't have Polish there as an option now.
Edit: Okay, I'm stupider than I thought, I got older build. on 0.37 everything works fine. Sorry for that.

User avatar
nirasa
Engineer
Engineer
Posts: 65
Joined: 03 Sep 2015 07:11
Location: Czech republic

Re: JGR's Patch Pack

Post by nirasa »

MLG wrote:
14 Oct 2020 15:44
nirasa wrote:
14 Oct 2020 13:49
Can I see a list of stations somewhere, how many trains pass through them? Is there a list? Thanks
Yes, click that station icon, rigth to the left from your money report. You can sort them by waiting cargo, but not by no. of vehicles. :( (of course the list can be sorted by name)
Hope, that this is at least partially useful...
Ok. Thanks. I know the arrangement according to the goods very well and I use it a lot. There is no list of stations by number of passing vehicles. :-(

McZapkie
Tycoon
Tycoon
Posts: 1203
Joined: 18 Jan 2014 18:10

Re: JGR's Patch Pack

Post by McZapkie »

Is it possible to compile this patch (or generally openttd) when my cmake version is 3.5.1 (and I can't upgrade it further)?

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

Re: JGR's Patch Pack

Post by JGR »

McZapkie wrote:
16 Oct 2020 18:02
Is it possible to compile this patch (or generally openttd) when my cmake version is 3.5.1 (and I can't upgrade it further)?
You could try removing the minimum version line and seeing if it works anyway.
What platform are you using that you can't install a newer version on?
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf

McZapkie
Tycoon
Tycoon
Posts: 1203
Joined: 18 Jan 2014 18:10

Re: JGR's Patch Pack

Post by McZapkie »

I'm using ubuntu 14, it is server instance thus I don't want to mess with current version.

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

Re: JGR's Patch Pack

Post by JGR »

McZapkie wrote:
16 Oct 2020 21:42
I'm using ubuntu 14, it is server instance thus I don't want to mess with current version.
You could build or download a pre-built more recent copy of cmake in a different directory and run that. You don't have to overwrite the version in PATH you already have.
That said, as cmake is backwards compatible I don't think anything problematic would happen if you did anyway.
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf

mak
Traffic Manager
Traffic Manager
Posts: 133
Joined: 30 Sep 2015 13:16

Re: JGR's Patch Pack

Post by mak »

Lw25 wrote:
15 Oct 2020 01:44
mak wrote:
14 Oct 2020 07:14
Lw25 wrote:
14 Oct 2020 05:11
When I updated to newest one my game language changed from Polish to English. Is there any way of reverting it?
Yes. Start page, select 'game options'
It is not that simple. I don't have Polish there as an option now.
Edit: Okay, I'm stupider than I thought, I got older build. on 0.37 everything works fine. Sorry for that.
No not stupid at all, we all miss things sometimes,did it myself recently :oops: :roll:

McZapkie
Tycoon
Tycoon
Posts: 1203
Joined: 18 Jan 2014 18:10

Re: JGR's Patch Pack

Post by McZapkie »

I'm making newgrf with signals, using nml, is it possible to provide support for programmable signals in case of own newgrf?

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

Re: JGR's Patch Pack

Post by JGR »

McZapkie wrote:
17 Oct 2020 16:14
I'm making newgrf with signals, using nml, is it possible to provide support for programmable signals in case of own newgrf?
Sure, see here.
For programmable pre-signals you'll probably want to use action 5, this is near the bottom of the text.
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf

McZapkie
Tycoon
Tycoon
Posts: 1203
Joined: 18 Jan 2014 18:10

Re: JGR's Patch Pack

Post by McZapkie »

Not sure what I'm doing wrong, but I have following nml code:

Code: Select all

switch (FEAT_RAILTYPES, SELF, switch_signals_russian_type, extra_callback_info2 & 0x00FFFFFF) {
    (0 << 16) | (0 << 8) | 0 : LS00_russian_signals_block_red;
    (0 << 16) | (0 << 8) | 1 : LS01_russian_signals_block_green;
    ...blah blah...
    (6 << 16) | (0 << 8) | 0 : LS60_russian_signals_program_red;
    (6 << 16) | (0 << 8) | 1 : LS61_russian_signals_program_green;
and while all custom signals are properly displayed in menu, including programmable signals, there are still standard programmable signals placed
(among correctly displayed vanilla openttd customized signals):
customss.jpg
customss.jpg (217.72 KiB) Viewed 345 times
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.

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

Re: JGR's Patch Pack

Post by JGR »

McZapkie wrote:
18 Oct 2020 09:11
Not sure what I'm doing wrong, but I have following nml code:

Code: Select all

switch (FEAT_RAILTYPES, SELF, switch_signals_russian_type, extra_callback_info2 & 0x00FFFFFF) {
    (0 << 16) | (0 << 8) | 0 : LS00_russian_signals_block_red;
    (0 << 16) | (0 << 8) | 1 : LS01_russian_signals_block_green;
    ...blah blah...
    (6 << 16) | (0 << 8) | 0 : LS60_russian_signals_program_red;
    (6 << 16) | (0 << 8) | 1 : LS61_russian_signals_program_green;
and while all custom signals are properly displayed in menu, including programmable signals, there are still standard programmable signals placed
(among correctly displayed vanilla openttd customized signals):

customss.jpg
The feature is opt-in, in that a property has to be specifically set in order for custom graphics to be used for programmable pre-signals via railtype action 2/3 (this is "railtype_enable_programmable_signals" in the document).
Otherwise, the majority of railtype GRFs which know nothing about these extensions are liable to give wrong/broken results when queried with values outside the range given in the main specification.
This should apply to the signal build window as well, it looks like you're using an old version. Which version are you testing this on?

Looking through the NML spec now, I can't see an obvious way to insert NFO or do anything custom.
I've been trying to avoid having to modify/fork NML.

Can you send me your code? I will have a tinker and see what I can do.
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf

McZapkie
Tycoon
Tycoon
Posts: 1203
Joined: 18 Jan 2014 18:10

Re: JGR's Patch Pack

Post by McZapkie »

I was using old version (0.31.0) - I'm still struggling to compile current release after switching all openttd system to cmake.

Is there any way to enable railtype action 2/3 in nml? I don't speak NFO assembler ;)

My nml code is here: https://dev.openttdcoop.org/projects/v4 ... s_SZD.pnml

Edit: I tried to run my newgrf under regular openttd and there is 'invalid sprite' error.
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.

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

Re: JGR's Patch Pack

Post by JGR »

McZapkie wrote:
18 Oct 2020 13:21
I was using old version (0.31.0) - I'm still struggling to compile current release after switching all openttd system to cmake.
This feature was only added in v0.38.0.
McZapkie wrote:
18 Oct 2020 13:21
Is there any way to enable railtype action 2/3 in nml? I don't speak NFO assembler ;)
Railtype action2/3 is what NML emits already.
For getting NML to turn on the property to opt-in to programmable pre-signals via that mechanism, the short answer appears to be no.
To avoid having to write any NFO, someone would have to add the relevant functionality to a fork of NML.
McZapkie wrote:
18 Oct 2020 13:21
My nml code is here: https://dev.openttdcoop.org/projects/v4 ... s_SZD.pnml

Edit: I tried to run my newgrf under regular openttd and there is 'invalid sprite' error.
I compiled the GRF and it worked fine in v1.10.3.
Ex TTDPatch Coder
Patch Pack, Github
Dad-Coder since April 2018

Avatar by MoonsongWolf

Eddi
Tycoon
Tycoon
Posts: 7504
Joined: 17 Jan 2007 00:14

Re: JGR's Patch Pack

Post by Eddi »

well, adding a property to NML should be a one-liner
You might not exactly be interested in Ferion, but if you are, have fun :)

User avatar
Gadg8eer
Engineer
Engineer
Posts: 119
Joined: 14 Dec 2019 14:22

Re: JGR's Patch Pack

Post by Gadg8eer »

JGR wrote:
18 Oct 2020 16:50
...
Gadg8eer wrote:
03 Oct 2020 05:17
Is there any chance of integrating some of the patches from dbpp? I know you already added the click-and-drag NewObjects, but what are your thoughts on the remaining features?
I guess you missed my post? Sorry to bother you with a "feature request" question.

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 11 guests