Difference between revisions of "NML:Changes 0.3"

From GRFSpecs
Jump to navigationJump to search
(Required changes for grfs between NML 0.2 and 0.3)
(No difference)

Revision as of 08:44, 12 December 2011

Introduction

Between NML 0.2.x and NML 0.3.x (and their corresponding nightlies) the generated NewGRF version by NML changed from v7 to v8. This brings lot of advantages, but requires a few changes to existing NML files. NewGRFs thus will require a minimum OpenTTD version of 1.2.0 (r23166).

Callbacks

NML 0.3 only supports the new style callbacks. Thus all callback_flag properties have been removed as have the callback flag constants *CBF*. For a complete list of affected constants see the related commit

Industry availability

In NewGRF v8 the availability property has been changed to an industry probability, so that more fine-grained control of the availability of an industry becomes feasible. Thus the corresponding constants of the callback have been changed:

  • CB_RESULT_IND_ALLOW is replaced by CB_RESULT_IND_PROBABILITY_FROM_PROPERTY
  • CB_RESULT_IND_DISALLOW is replaced by CB_RESULT_IND_NO_CONSTRUCTION