Difference between revisions of "NML:Item"

From GRFSpecs
Jump to navigationJump to search
(content of nml r1625)
 
(add nav template)
Line 1: Line 1:
  +
{{NMLNavBlocksyntax}}
  +
 
item (<expression> [, <ID> [, <expression>]]) {
 
item (<expression> [, <ID> [, <expression>]]) {
 
(<property-block>|<graphics-block>|<livery_override-block>)+
 
(<property-block>|<graphics-block>|<livery_override-block>)+

Revision as of 15:50, 21 August 2011

Block Syntax
item (<expression> [, <ID> [, <expression>]]) {
	(<property-block>|<graphics-block>|<livery_override-block>)+
}

The first argument is the feature of the item, the second (optional) argument is the name used to identify the object throughout the NML file and the third (optional) argument is the numerical id you want to use for this item. Example:

 item (FEAT_ROADVEHS, hereford_tram) {
 	property {
 		name:               string(STR_NAME_HEREFORD_TRAM);
 		climates_available: ALL_CLIMATES;
 		introduction_date:  date(1940,1,1);
 		speed:              60 km/h;
 	}
 }