NewGRF compatibility

In the course of writing a NewGRF you probably will release not only one version but you may want to provide a bug fix version or versions which add additional features to your existing NewGRF. There are various pitfalls though when it comes to keeping a NewGRF compatible with its previous versions. This page tries to list some of the most common pitfalls and changes to a NewGRF which break compatibility

Dangerous changes

How to avoid breaking compatibility

Tips: when you need to change a vehicle (or other thing, works also with tiles, industries objects and houses and alike) such that you break compatibility there is a way to avoid breaking compatibility:

This will make sure that existing savegames with the old vehicle will keep using it, but it won't be available for purchase anymore and the fixed vehicle will be available instead.

What to do when you have or want to break compatibility

Make use of the grf version and minimum_compatible_version in order to set your grf version and the (minimum) version of your newgrf which you're backward compatible to; set the minimum compatible version to the current version of your NewGRF when you need to break compatibility.