Digitalfox NML Questions!

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

Moderator: Graphics Moderators

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

Re: Digitalfox NML Questions!

Post by Eddi »

allowing NewGRF to provide the movement patterns ("state machines") for custom airport layouts was planned, but never fully implemented.
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Re: Digitalfox NML Questions!

Post 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 :wink: ) if somehow It would start at 1:1, problem solved!
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Digitalfox NML Questions!

Post by Eddi »

no, that is not possible either.
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Re: Digitalfox NML Questions!

Post 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 :|
Eddy Arfik
Transport Coordinator
Transport Coordinator
Posts: 260
Joined: 09 Apr 2014 11:10

Re: Digitalfox NML Questions!

Post 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
dirt international airport.png (54.07 KiB) Viewed 6214 times
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Re: Digitalfox NML Questions!

Post 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 :wink:

Image
Attachments
Airport.png
Airport.png (565.74 KiB) Viewed 1845 times
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Re: Digitalfox NML Questions!

Post by Digitalfox »

Good night fellow TT friends! :D

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? :?
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Re: Digitalfox NML Questions!

Post by Digitalfox »

Ah ok, many thanks Eddi :mrgreen:
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 991
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Digitalfox NML Questions!

Post 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.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Re: Digitalfox NML Questions!

Post 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 :))
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Re: Digitalfox NML Questions!

Post 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 :|
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Digitalfox NML Questions!

Post by planetmaker »

You probably compiled using and forcing the DOS palette for it by additionally using the -p DEFAULT
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Re: Digitalfox NML Questions!

Post by Digitalfox »

planetmaker wrote:You probably compiled using and forcing the DOS palette for it by additionally using the -p DEFAULT
Yep it worked! :bow:

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 :shock:
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Re: Digitalfox NML Questions!

Post by Digitalfox »

How do you only disable NMLC output animation warnings, no other errors or warnings, just the "pixels are animated" ones?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Digitalfox NML Questions!

Post 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
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Re: Digitalfox NML Questions!

Post by Digitalfox »

Ok got it! :bow:

Thank you planetmaker :o
Transportman
Tycoon
Tycoon
Posts: 2792
Joined: 22 Feb 2011 18:34

Re: Digitalfox NML Questions!

Post 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.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Re: Digitalfox NML Questions!

Post 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.
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Re: Digitalfox NML Questions!

Post by Digitalfox »

I eliminated .nmlcache folder and seems the error is gone...

It re-encoded everything and it seems it cleared the warnings...
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 21 guests