NML: 16-cargo industry support

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

Moderator: Graphics Moderators

User avatar
GarryG
Tycoon
Tycoon
Posts: 3756
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: NML: 16-cargo industry support

Post by GarryG »

planetmaker wrote:
20 Feb 2020 12:58
There's nothing wrong with using the current development version to get going
Shhhh .. by waiting for the official release gives me a reason to concentrate on my other projects for now. Besides once I start the Industry set again, I have lots of plans and new ideas.
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335

User avatar
Andrew350
Director
Director
Posts: 579
Joined: 19 Dec 2011 07:54
Location: Washington State, USA
Contact:

Re: NML: 16-cargo industry support

Post by Andrew350 »

I had a quick question regarding the change to 16-cargo support:

Are the changes savegame-safe?

In other words, if I update an industry NewGRF to use the new NML 0.5 syntax but otherwise don't change it's behavior, will it remain compatible to savegames using that NewGRF with the "old" industry code? My gut says it should be fine, but I don't know how the conversion is handled "under the hood", and while a little bit of testing hasn't revealed any obvious issues, it's hard to say about the effects in the long term. I understand if this is an unknown, but figured I should ask just to be safe :)

Also, I want to take the opportunity to thank those who worked on this :) I've been dreading what it would take to convert the old code to the new, only to find out it was in fact extremely easy. The new syntax is not only more powerful but indeed easier to understand and more intuitive, so thank you for the work you do to keep making the game even better :)

User avatar
jfs
Tycoon
Tycoon
Posts: 1241
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: NML: 16-cargo industry support

Post by jfs »

I think the answer is "maybe safe"!
As long as the cargo types for accepts and produces end up declared in the same order (so using the same indexes on the industries) it should be compatible. The question is getting NML to generate the correct order, which I think is possible.

User avatar
andythenorth
Tycoon
Tycoon
Posts: 5217
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: NML: 16-cargo industry support

Post by andythenorth »

My guess would be that the new action 0 props would be missing from the industry instances. AFAICT, they're instantiated when the industry is built in game, and not migrated if the grf changes.

That's my interpretation from changing industries many times, I haven't read the actual OpenTTD code. :)

Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests