Page 6 of 7
Re: Digitalfox NML Questions!
Posted: 01 Dec 2014 19:38
by Eddi
allowing NewGRF to provide the movement patterns ("state machines") for custom airport layouts was planned, but never fully implemented.
Re: Digitalfox NML Questions!
Posted: 01 Dec 2014 19:40
by Digitalfox
Eddi wrote:allowing NewGRF to provide the movement patterns ("state machines") for custom airport layouts was planned, but never fully implemented.
Hi Eddi, I'm aware that, I remember topics about it, but to be honest the movement pattern is fine by me, it's just that movement pattern starts at 0,0 (If you know what I mean

) if somehow It would start at 1:1, problem solved!
Re: Digitalfox NML Questions!
Posted: 01 Dec 2014 19:44
by Eddi
no, that is not possible either.
Re: Digitalfox NML Questions!
Posted: 01 Dec 2014 19:48
by Digitalfox
Eddi wrote:no, that is not possible either.
Ok. Yeah yesterday I started changing aircraft_movement and airports tiles in source, but It's a lot of code that can in the future be changed in trunk and make my savegames incompatible... I'm divided on what to do

Re: Digitalfox NML Questions!
Posted: 02 Dec 2014 08:06
by Eddy Arfik
If the tiles you are trying to add are purely cosmetic, why not simply modify the ogfx-airport-objects grf and extend your airports with NewObject tiles? It's a lot easier than re-defining state machines, etc in the game code, it also has the benefit of giving more flexibility with the layouts. For example this screenshot, somewhere in there is a real, usable small airport

- dirt international airport.png (54.07 KiB) Viewed 6216 times
Re: Digitalfox NML Questions!
Posted: 02 Dec 2014 23:06
by Digitalfox
Eddy Arfik wrote:If the tiles you are trying to add are purely cosmetic, why not simply modify the ogfx-airport-objects grf and extend your airports with NewObject tiles? It's a lot easier than re-defining state machines, etc in the game code, it also has the benefit of giving more flexibility with the layouts. For example this screenshot, somewhere in there is a real, usable small airport
The attachment dirt international airport.png is no longer available
Yeah took that route

Re: Digitalfox NML Questions!
Posted: 04 Dec 2014 21:05
by Digitalfox
Good night fellow TT friends!
I'm creating, as above is showed, NewGRF Objects.
I've been using opengfx-landscape as example successfully.
But now almost all my Objects (for Airports at this point) are created and I'm cleaning my code.
My question is:
Code: Select all
object_flags: bitmask(OBJ_FLAG_ANYTHING_REMOVE, OBJ_FLAG_NO_FOUNDATIONS, OBJ_FLAG_ALLOW_BRIDGE, OBJ_FLAG_DRAW_WATER, OBJ_FLAG_ON_WATER, 13);
What does "13" represent?

Re: Digitalfox NML Questions!
Posted: 04 Dec 2014 23:42
by Eddi
Re: Digitalfox NML Questions!
Posted: 04 Dec 2014 23:49
by Digitalfox
Ah ok, many thanks Eddi

Re: Digitalfox NML Questions!
Posted: 05 Dec 2014 19:53
by frosch
Well, if you want to use that, better use "OBJ_FLAG_SCALE_BY_WATER"

I guess the 13 is only a remnant from testing the feature.
Re: Digitalfox NML Questions!
Posted: 06 Dec 2014 14:13
by Digitalfox
frosch wrote:Well, if you want to use that, better use "OBJ_FLAG_SCALE_BY_WATER"

I guess the 13 is only a remnant from testing the feature.
To be honest I did think it was something not needed in my case since I tried with and without it and had no effect, but instead of just removing and then a few months from now on a savegame some problem arise, I thout it was better to just make sure on what it did

Re: Digitalfox NML Questions!
Posted: 06 Jan 2015 18:25
by Digitalfox
I'm trying to compile latest build of Zbase:
http://bundles.openttdcoop.org/zbuild/n ... T/?C=M&O=D r256
I get: ERROR: Indices 0xD7..0xE2 are not allowed in recolour sprites when the output is in the WIN palette
This a untouched source compile.
Command used: nmlc -c --grf zbase_base.grf zbase_base.nml
Version of NML used:
http://bundles.openttdcoop.org/nml/nigh ... -win32.zip
I've compiled zBase a few months ago, don't remember hitting this show stopper

Re: Digitalfox NML Questions!
Posted: 06 Jan 2015 22:32
by planetmaker
You probably compiled using and forcing the DOS palette for it by additionally using the -p DEFAULT
Re: Digitalfox NML Questions!
Posted: 07 Jan 2015 01:07
by Digitalfox
planetmaker wrote:You probably compiled using and forcing the DOS palette for it by additionally using the -p DEFAULT
Yep it worked!
Strangely I don't recall using it before, but it was months ago, maybe after so many GRF's I've compiled this last 6 months I forgot

Re: Digitalfox NML Questions!
Posted: 10 Jan 2015 15:38
by Digitalfox
How do you only disable NMLC output animation warnings, no other errors or warnings, just the "pixels are animated" ones?
Re: Digitalfox NML Questions!
Posted: 10 Jan 2015 15:50
by planetmaker
Digitalfox wrote:How do you only disable NMLC output animation warnings, no other errors or warnings, just the "pixels are animated" ones?
you don't. Currently you cannot switch on or off individual warning types other than fixing them. In this case you fix all those warnings by either fixing the sprites (if they are not supposed to be animated) and especially by giving those real sprites the appropriate flags which indicates whether they contain animated pixels.
http://newgrf-specs.tt-wiki.net/wiki/NML:Realsprites
Re: Digitalfox NML Questions!
Posted: 10 Jan 2015 18:45
by Digitalfox
Ok got it!
Thank you planetmaker

Re: Digitalfox NML Questions!
Posted: 10 Jan 2015 18:51
by Transportman
If they are not supposed to be animated, you might want to look at
TIQ, to convert the animation colors to their non-animated counterparts.
Re: Digitalfox NML Questions!
Posted: 26 Jan 2016 23:07
by Digitalfox
A year later, I'm back to my project
So after updating all the tools and start right from I left I'm stumbling at this on my zbase compile, I've must messed something before my 1 year pause, this was my last change a year ago...
nmlc warning: "zbase_base.nml", line 3837: Sprites are already defined for base_graphics-block 'spr1145' for this zoom level / bit depth combination. This data will be overridden.
Code using /nml/nightlies/v5850-426/:
Code: Select all
base_graphics spr1145(1145, "gfx/X_OpenGFX/infrastructure\infra06.png") { [ 2, 5016, 12, 8, 15, 6] }
alternative_sprites(spr1145, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP, "gfx/X_EZ_GFX/base/1145.png", "gfx/X_EZ_GFX/base/1145m.png") { [0, 0, 52, 42, -25, -18] }
alternative_sprites(spr1145, ZOOM_LEVEL_IN_2X, BIT_DEPTH_32BPP, "gfx/X_EZ_GFX/base/1145_z1.png", "gfx/X_EZ_GFX/base/1145_z1m.png") { [0, 0, 103, 84, -50, -37] } //This is line 3837
alternative_sprites(spr1145, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP, "gfx/X_EZ_GFX/base/1145_z0.png", "gfx/X_EZ_GFX/base/1145_z0m.png") { [0, 0, 205, 167, -100, -73] }
On game the sprites are fine, this is the Monorail depot sprites on temperate.
Re: Digitalfox NML Questions!
Posted: 27 Jan 2016 13:37
by Digitalfox
I eliminated .nmlcache folder and seems the error is gone...
It re-encoded everything and it seems it cleared the warnings...