Difference between revisions of "NML:Overriding vehicles in other NewGRFs"

From GRFSpecs
Jump to navigationJump to search
(content of nml r1625)
 
(add nav template)
 
Line 1: Line 1:
  +
{{NMLNavBlocksyntax}}
  +
 
If one wants to modify vehicles defined in another NewGRF it has to be stated explicitly by the <code style="color:darkgreen">engine_override</code> command that this is desired. If stated, all vehicles defined within the overriding NewGRF will try to override the vehicle with the same ID within the overridden NewGRF. This can be used to modify single properties of these only. This function is intended for NewGRFs that modify parts of other NewGRFs, e.g. the ECS extension for the DBSetXL.
 
If one wants to modify vehicles defined in another NewGRF it has to be stated explicitly by the <code style="color:darkgreen">engine_override</code> command that this is desired. If stated, all vehicles defined within the overriding NewGRF will try to override the vehicle with the same ID within the overridden NewGRF. This can be used to modify single properties of these only. This function is intended for NewGRFs that modify parts of other NewGRFs, e.g. the ECS extension for the DBSetXL.
   

Latest revision as of 16:35, 21 August 2011

Block Syntax

If one wants to modify vehicles defined in another NewGRF it has to be stated explicitly by the engine_override command that this is desired. If stated, all vehicles defined within the overriding NewGRF will try to override the vehicle with the same ID within the overridden NewGRF. This can be used to modify single properties of these only. This function is intended for NewGRFs that modify parts of other NewGRFs, e.g. the ECS extension for the DBSetXL.

The syntax is as follows:

engine_override(targetID);
engine_override(sourceID, targetID);

The targetID must be the grfID of the NewGRF whose vehicles are supposed to be changed via the engine override. The sourceID is the grfID of the NewGRF defining the overriding vehicles. If not set explicitly, the grfID of the NewGRF containing this statement is used. Both grfIDs are 4-byte strings.