[NML] Only two railtypes showing up.

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
Erato
Chief Executive
Chief Executive
Posts: 740
Joined: 25 May 2015 09:09
Location: The Netherlands

[NML] Only two railtypes showing up.

Post by Erato »

I'm currently working on a track set for maglev trains, which will contain 5 railtypes. When I compile the code, however. At most 2 tracks will show up in the game. I can only get the other one to show up if I comment out one of the ones that did show up.
Am I missing something?

Source in the attachments.
Attachments
MTS source.rar
Source last compiled
(32.55 KiB) Downloaded 70 times
Maglev_Track_Set.grf
the latest working version of the track set.
(30.1 KiB) Downloaded 65 times
MMT.grf
A version of Modern Maglev trains to work with this set.
(165.61 KiB) Downloaded 60 times
No pics no clicks. Seriously.
ImageImageImageImageImageImage
User avatar
Erato
Chief Executive
Chief Executive
Posts: 740
Joined: 25 May 2015 09:09
Location: The Netherlands

Re: [NML] Only two railtypes showing up.

Post by Erato »

Update: I solved the problem. Turns out.

Code: Select all

make -B
is case-sensitive.
No pics no clicks. Seriously.
ImageImageImageImageImageImage
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: [NML] Only two railtypes showing up.

Post by Transportman »

Erato wrote:Update: I solved the problem. Turns out.

Code: Select all

make -B
is case-sensitive.
But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
Erato
Chief Executive
Chief Executive
Posts: 740
Joined: 25 May 2015 09:09
Location: The Netherlands

Re: [NML] Only two railtypes showing up.

Post by Erato »

Transportman wrote:
Erato wrote:Update: I solved the problem. Turns out.

Code: Select all

make -B
is case-sensitive.
But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.
I was told that the -B turns the .pnml file with all it's imports into one big .nml file, overwriting the .nml file that's already there.
This didn't happen when I had -b instead.
No pics no clicks. Seriously.
ImageImageImageImageImageImage
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: [NML] Only two railtypes showing up.

Post by Transportman »

Erato wrote:
Transportman wrote:
Erato wrote:Update: I solved the problem. Turns out.

Code: Select all

make -B
is case-sensitive.
But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.
I was told that the -B turns the .pnml file with all it's imports into one big .nml file, overwriting the .nml file that's already there.
This didn't happen when I had -b instead.
There is no need to use the -B flag to do that, make without any flags also recreates the .nml file from your .pnml-files, and creates a .grf for it.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
Leanden
Tycoon
Tycoon
Posts: 2613
Joined: 19 Mar 2009 19:25
Location: Kent

Re: [NML] Only two railtypes showing up.

Post by Leanden »

My makefile is just a .bat with the following command lines:

Code: Select all

gcc -C -E -nostdinc -x c-header -o BRTrains.nml BRTrains.pnml
nmlc BRTrains.nml 
PAUSE
Image
User avatar
Erato
Chief Executive
Chief Executive
Posts: 740
Joined: 25 May 2015 09:09
Location: The Netherlands

Re: [NML] Only two railtypes showing up.

Post by Erato »

Transportman wrote:
Erato wrote:
Transportman wrote: But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.
I was told that the -B turns the .pnml file with all it's imports into one big .nml file, overwriting the .nml file that's already there.
This didn't happen when I had -b instead.
There is no need to use the -B flag to do that, make without any flags also recreates the .nml file from your .pnml-files, and creates a .grf for it.
Thing is, if I do that, it doesn't overwrite the .nml file that's already there, and instead chooses to instead compile the .nml that's already there. Only if I remove the .nml file will it recreate a .nml file. Or at least, that's the case on my machine. And I know that for a fact because I went ahead and just tested it: a new NML file did not get made.
No pics no clicks. Seriously.
ImageImageImageImageImageImage
rowdog
Engineer
Engineer
Posts: 67
Joined: 24 May 2017 12:51
Location: East Texas

Re: [NML] Only two railtypes showing up.

Post by rowdog »

Transportman wrote:
Erato wrote:Update: I solved the problem. Turns out.

Code: Select all

make -B
is case-sensitive.
But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.

Code: Select all

       -B, --always-make
            Unconditionally make all targets.
I would guess that the makefile isn't set up with proper dependencies to support an incremental build. Or maybe it's a "make on windows" thing.
Transportman
Tycoon
Tycoon
Posts: 2781
Joined: 22 Feb 2011 18:34

Re: [NML] Only two railtypes showing up.

Post by Transportman »

rowdog wrote:
Transportman wrote:
Erato wrote:Update: I solved the problem. Turns out.

Code: Select all

make -B
is case-sensitive.
But why do you need the -B flag? What does it do and how does it solve your issue? Might be interesting to know, also for others, because I never needed the -B flag.

Code: Select all

       -B, --always-make
            Unconditionally make all targets.
I would guess that the makefile isn't set up with proper dependencies to support an incremental build. Or maybe it's a "make on windows" thing.
I think it would then be in the makefile, as I never had to use the -B flag, not on Windows using MinGW or WSL
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 4 guests