Have NML compilers default to NFO7?
Moderator: Graphics Moderators
Have NML compilers default to NFO7?
Im not very up-to-speed on NML and the most recent improvements to the NFO spec, and honestly not much time to dig through it, so bear with me if I'm wrong about what I'm about to ask.
I've noticed that as NewGRF authors have started to migrate to NFO, that many of their works are being compiled with NFO8 specs, even though their projects don't take advantage of the newer features. The result is that their newer releases are not compatible with older versions of OpenTTD which don't support NFO8, but do support NFO7. When speaking to many of these authors, they say that they don't know of a way to make the NML compilers use NFO7, other than to use an older compiler that only supports NFO7.
Could it be possible for the compiler to either check if NFO8 features are being used, and if they are not, automatically revert to NFO7? Or, is there a possibility that the authors can set a flag to force the usage of NFO7 if they know they're not using NFO8 features?
I've noticed that as NewGRF authors have started to migrate to NFO, that many of their works are being compiled with NFO8 specs, even though their projects don't take advantage of the newer features. The result is that their newer releases are not compatible with older versions of OpenTTD which don't support NFO8, but do support NFO7. When speaking to many of these authors, they say that they don't know of a way to make the NML compilers use NFO7, other than to use an older compiler that only supports NFO7.
Could it be possible for the compiler to either check if NFO8 features are being used, and if they are not, automatically revert to NFO7? Or, is there a possibility that the authors can set a flag to force the usage of NFO7 if they know they're not using NFO8 features?
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Have NML compilers default to NFO7?
That involves an effort in compiler (=nmlc) writing which by no means is justified by the gain.kamnet wrote: Could it be possible for the compiler to either check if NFO8 features are being used, and if they are not, automatically revert to NFO7? Or, is there a possibility that the authors can set a flag to force the usage of NFO7 if they know they're not using NFO8 features?
It would be WAY less work to update every existing patchpack.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Have NML compilers default to NFO7?
It's possible, but highly unlikely to be ever implemented given the amount of effort it takes to implement and maintain such an option.
Also, it might very well be that the NewGRF doesn't use NFO8, however uses features that were introduced after NFO8. At that moment the resulting NewGRF doesn't work with OpenTTD versions that only support NFO7, and thus there is no harm in using NFO8.
Also, it might very well be that the NewGRF doesn't use NFO8, however uses features that were introduced after NFO8. At that moment the resulting NewGRF doesn't work with OpenTTD versions that only support NFO7, and thus there is no harm in using NFO8.
-
- Tycoon
- Posts: 1660
- Joined: 16 Dec 2007 22:24
- Location: Idaho, USA
Re: Have NML compilers default to NFO7?
It's easier for the author to identify whether there are any features that require nightly NML versions (and GRFv8), and if not, to compile using NML 0.2.3, rather than trying to code NML to identify for you.
Although NML 0.2.3 will probably complain if you try to compile something that uses GRFv8 features, so in a sense that'd be a way of telling.
Although NML 0.2.3 will probably complain if you try to compile something that uses GRFv8 features, so in a sense that'd be a way of telling.
Last edited by Supercheese on 14 Sep 2012 16:06, edited 1 time in total.
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects
"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Have NML compilers default to NFO7?
It's not exactly that easy. You'll have to re-write some parts. See the list of changesSupercheese wrote:It's easier for the author to identify whether there are any features that require nightly NML versions (and thus GRFv8), and if not, to compile using NML 0.2.3, rather than trying to code NML to identify for you.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
-
- Tycoon
- Posts: 1660
- Joined: 16 Dec 2007 22:24
- Location: Idaho, USA
Re: Have NML compilers default to NFO7?
Yes, but surely it is easier than trying to make NML do it for you, no?planetmaker wrote:It's not exactly that easy. You'll have to re-write some parts. See the list of changes
Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects
"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Have NML compilers default to NFO7?
Oh, now I get what you saidSupercheese wrote:Yes, but surely it is easier than trying to make NML do it for you, no?planetmaker wrote:It's not exactly that easy. You'll have to re-write some parts. See the list of changes

Personally I'd estimate the needed effort to make NML decide automatically nfov7+container format 1 vs. nfo v8+container format 2 to be of the order of one to two years work - given the current not-so-slow rate of work on NML. And I'd rather see station and bridge support instead. Requiring a manual switch might make it easier, but still would bloat the code dramatically, slowing down every future development tremendously
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Have NML compilers default to NFO7?
Support for nfov7/grfv1 might (or might not) be re-added in the future. As I don't expect lots of further changes to grf-outputting section in NML, the extra overhead of maintaining two versions of the output format should be manageable. But, as planetmaker said, the time spent adding nfov7 support cannot also be spent adding station/bridge support. Take your pick
As a work-around, you might want to try to let NML output nfo and use grfcodec to encode that (v32) nfo into a GRF container version 1 NewGRF.

As a work-around, you might want to try to let NML output nfo and use grfcodec to encode that (v32) nfo into a GRF container version 1 NewGRF.
Create your own NewGRF? Check out this tutorial!
Re: Have NML compilers default to NFO7?
Station/bridge, pleaseHirundo wrote:Take your pick![]()

-
- Tycoon
- Posts: 1660
- Joined: 16 Dec 2007 22:24
- Location: Idaho, USA
Re: Have NML compilers default to NFO7?
Yes indeed (and personally, stations more than bridgesFooBar wrote:Station/bridge, please

Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects
"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
Re: Have NML compilers default to NFO7?
First steps...Supercheese wrote:Yes indeed (and personally, stations more than bridgesFooBar wrote:Station/bridge, please).
Still a looong way to go, though. I'd estimate that with these commits it's just 5-10% done.
Create your own NewGRF? Check out this tutorial!
Who is online
Users browsing this forum: No registered users and 13 guests