Difference between revisions of "NML:Main"

From GRFSpecs
Jump to navigationJump to search
(link to cargo page)
 
(26 intermediate revisions by 10 users not shown)
Line 1: Line 1:
  +
<div style="float:right; padding-left:12px; background:none;">{{NMLNavMain}}</div>
  +
 
;[[NML:Preface |Preface]]
 
;[[NML:Preface |Preface]]
  +
;[[NML:changes 0.3|Changes between NML 0.2 and head / 0.3]]
  +
;[[NML:changes 0.4|Changes between NML 0.3 and head / 0.4]]
  +
;[[NML:changes 0.5|Changes between NML 0.4 and head / 0.5]]
 
;[[NML:Getting started|Getting started]]
 
;[[NML:Getting started|Getting started]]
 
;[[NML:Graphic files|Graphics files]]
 
;[[NML:Graphic files|Graphics files]]
  +
;[[NML:Language structure|Language structure]]
+
;[[NML:Block syntax|Language structure and block syntax]]
*[[NML:Blocks|Blocks]]
 
*[[NML:Features|Features]]
+
*[[NML:GRF|GRF]] and its parameters
  +
*[[NML:Item|Item]] (Properties, graphics, livery overrides)
;[[NML:Block syntax|Block syntax]]
 
  +
*[[NML:GRF|GRF]]
 
  +
*;Defining sprites:
**[[NML:GRF parameters|GRF parameters]]
 
*[[NML:Item|Item]]
+
**[[NML:Realsprites|Realsprites]]
**[[NML:Property|Property]]
+
**[[NML:Template|Template]]
**[[NML:Graphics|Graphics]]
+
**[[NML:Base Graphics|Base Graphics]]
**[[NML:Livery override|Livery override]]
+
**[[NML:Spriteset|Spriteset]]
  +
**;Replacing sprites:
*[[NML:Realsprites|Realsprites]]
 
*[[NML:Recolour sprites|Recolour sprites]]
+
***[[NML:Replace TTD sprites|Replace TTD sprites]]
  +
***[[NML:Replace new sprites|Replace new sprites]]
*[[NML:Template|Template]]
 
*[[NML:Spriteset|Spriteset]]
+
***[[NML:Add font glyphs|Add font glyphs]]
  +
***[[NML:Alternative sprites|Alternative sprites]] (32bpp, zoom levels)
*[[NML:Spritegroup|Spritegroup]]
 
  +
**;Aranging and grouping sprites:
*[[NML:Spritelayout|Spritelayout]]
 
 
***[[NML:Spritegroup|Spritegroup]] (Vehicles, stations)
*[[NML:Tilelayout|Tilelayout]]
 
  +
***[[NML:Spritelayout|Spritelayout]] (Houses, industries, airports, objects, stations)
*[[NML:Switch|Switch]]
 
*[[NML:Produce|Produce]]
+
***[[NML:Recolour sprites|Recolour sprites]]
  +
*[[NML:Random switch|Random switch]]
 
  +
*;Flow control
*[[NML:Cargotable|Cargotable]]
 
*[[NML:Railtypetable|Railtypetable]]
+
**[[NML:Tilelayout|Tilelayout]]
*[[NML:If|If/else]]
+
**[[NML:Switch|Switch]]
*[[NML:While|While]]
+
**[[NML:Produce|Produce]]
*[[NML:Error|Error]]
+
**[[NML:Random switch|Random switch]]
  +
*[[NML:Disable items|Disable items]]
 
  +
*;Global scope
*[[NML:Deactivate other NewGRFs|Deactivate other NewGRFs]]
 
 
**[[NML:Cargotable|Cargotable]]
*[[NML:Testing for other NewGRFs|Testing for other NewGRFs]]
 
  +
**[[NML:Railtypetable|Railtypetable / Roadtypetable / Tramtypetable]]
*[[NML:Overriding vehicles in other NewGRFs|Overriding vehicles in other NewGRFs]]
 
*[[NML:Sprite replacement|Sprite replacement]]
+
**[[NML:Snow line|Snow line]]
**[[NML:Replace TTD sprites|Replace TTD sprites]]
+
**[[NML:Setting base costs|Setting base costs]]
**[[NML:Replace new sprites|Replace new sprites]]
+
**[[NML:Parameter assignment|Parameter assignment]]
**[[NML:Add font glpyhs|Add font glpyhs]]
+
**[[NML:If|If/else]]
*[[NML:32bpp sprites|32bpp sprites]]
+
**[[NML:While|While]]
  +
*[[NML:Town names|Town names]]
 
  +
*;Interaction with other grfs
 
**[[NML:Error|Error]]
 
**[[NML:Disable items|Disable items]]
 
**[[NML:Deactivate other NewGRFs|Deactivate other NewGRFs]]
 
**[[NML:Testing for other NewGRFs|Testing for other NewGRFs]]
 
**[[NML:Overriding vehicles in other NewGRFs|Overriding vehicles in other NewGRFs]]
  +
  +
*;Misc
 
**[[NML:Town names|Town names]]
 
**[[NML:Town names parts|Town names parts]]
 
**[[NML:Town names parts|Town names parts]]
  +
**[[NML:Sorting vehicles in the purchase list|Sorting vehicles in the purchase list]]
*[[NML:Parameter assignment|Parameter assignment]]
 
  +
*[[NML:Setting base costs|Setting base costs]]
 
 
;[[NML:Units|Units]]
 
;[[NML:Units|Units]]
 
;[[NML:Expressions|Expressions]]
 
;[[NML:Expressions|Expressions]]
Line 45: Line 59:
 
*[[NML:Builtin functions|Builtin functions]]
 
*[[NML:Builtin functions|Builtin functions]]
 
;[[NML:Language files|Language files]]
 
;[[NML:Language files|Language files]]
  +
* [[NML:Language files#String codes|String Codes]]
;Lists of variables and properties
 
  +
* [[NML:Language files#LanguageIDs|LanguageIDs]]
  +
;[[NML:Properties and variables and callbacks|Lists of properties, variables and callbacks]]
  +
 
{|
 
{|
  +
!Type
|[[NML:Vehicles|Vehicles]] || [[NML:Vehicles#Properties common to all vehicle types|common properties]] || [[NML:Vehicles#Vehicle variables|variables]] || [[NML:Vehicles#Vehicle callbacks|callbacks]]
 
  +
!Properties
  +
!Variables
  +
!Callbacks
  +
!Feature
 
|-
 
|-
| || [[NML:Vehicles#Train properties|train properties]] || ||
+
|[[NML:General|General]] || || [[NML:General#General variables|variables]] || || FEAT_GLOBALVARS
 
|-
 
|-
| || [[NML:Vehicles#Road vehicle properties|road vehicle properties]] || ||
+
|[[NML:Vehicles|Vehicles]] || [[NML:Vehicles#Properties common to all vehicle types|common properties]] || [[NML:Vehicles#Vehicle variables|variables]] || [[NML:Vehicles#Vehicle callbacks|callbacks]] ||
 
|-
 
|-
| || [[NML:Vehicles#Ship properties|ship properties]] || ||
+
| || [[NML:Vehicles#Train properties|train properties]] || || || FEAT_TRAINS
 
|-
 
|-
| || [[NML:Vehicles#Plane properties|aircraft properties]] || ||
+
| || [[NML:Vehicles#Road vehicle properties|road vehicle properties]] || || || FEAT_ROADVEHS
 
|-
 
|-
|[[NML:Stations|Stations]] || [[NML:Stations#Station properties|properties]] || [[NML:Stations#Station variables|variables]] || [[NML:Stations#Station callbacks|callbacks]]
+
| || [[NML:Vehicles#Ship properties|ship properties]] || || || FEAT_SHIPS
 
|-
 
|-
|[[NML:Canals|Canals]] || [[NML:Canals#Canal properties|properties]] || [[NML:Canals#Canal variables|variables]] || [[NML:Canals#Canal callbacks|callbacks]]
+
| || [[NML:Vehicles#Aircraft properties|aircraft properties]] || || || FEAT_AIRCRAFT
 
|-
 
|-
|[[NML:Bridges|Bridges]] || [[NML:Bridges#Bridge properties|properties]] || [[NML:Bridges#Bridge variables|variables]] || [[NML:Bridges#Bridge callbacks|callbacks]]
+
|[[NML:Stations|Stations]] || [[NML:Stations#Station properties|properties]] || [[NML:Stations#Station variables|variables]] || [[NML:Stations#Station callbacks|callbacks]] || FEAT_STATIONS
 
|-
 
|-
 
|[[NML:Canals|Canals]] || [[NML:Canals#Canal properties|properties]] || [[NML:Canals#Canal variables|variables]] || [[NML:Canals#Canal callbacks|callbacks]] || FEAT_CANALS
|[[NML:Towns|Towns]] || || ||
 
 
|-
 
|-
|[[NML:Houses|Houses]] || [[NML:Houses#House properties|properties]] || [[NML:Houses#House variables|variables]] || [[NML:Houses#House callbacks|callbacks]]
+
|[[NML:Bridges|Bridges]] || [[NML:Bridges#Bridge properties|properties]] || [[NML:Bridges#Bridge variables|variables]] || [[NML:Bridges#Bridge callbacks|callbacks]] || FEAT_BRIDGES
 
|-
 
|-
|[[NML:Industries|Industries]]|| || [[NML:Industries#Common variables|common variables]] ||
+
|[[NML:Towns|Towns]] || || || ||
 
|-
 
|-
| || [[NML:Industries#Industry properties|industry properties]] || [[NML:Industries#Industry variables|industry variables]] || [[NML:Industries#Industry callbacks|industry callbacks]]
+
|[[NML:Houses|Houses]] || [[NML:Houses#House properties|properties]] || [[NML:Houses#House variables|variables]] || [[NML:Houses#House callbacks|callbacks]] || FEAT_HOUSES
 
|-
 
|-
| || [[NML:Industries#Industry tile properties|tile properties]] || [[NML:Industries#Industry tile variables|tile variables]] || [[NML:Industries#Industry tile callbacks|tile callbacks]]
+
|[[NML:Industries|Industries]]|| || [[NML:Industries#Common variables|common variables]] || ||
 
|-
 
|-
|[[NML:Cargos|Cargos]] || [[NML:Cargos#Cargo properties|properties]] || [[NML:Cargos#Cargo variables|variables]] || [[NML:Cargos#Cargo callbacks|callbacks]]
+
| || [[NML:Industries#Industry properties|industry properties]] || [[NML:Industries#Industry variables|industry variables]] || [[NML:Industries#Industry callbacks|industry callbacks]] || FEAT_INDUSTRIES
 
|-
 
|-
  +
| || [[NML:IndustryTiles#Industry tile properties|tile properties]] || [[NML:IndustryTiles#Industry tile variables|tile variables]] || [[NML:IndustryTiles#Industry tile callbacks|tile callbacks]] || FEAT_INDUSTRYTILES
|Airports||properties ||variables||callbacks
 
 
|-
 
|-
| ||tile properties ||tile variables||tile callbacks
+
|[[NML:Cargos|Cargos]] || [[NML:Cargos#Cargo properties|properties]] || [[NML:Cargos#Cargo variables|variables]] || [[NML:Cargos#Cargo callbacks|callbacks]] || FEAT_CARGOS
 
|-
 
|-
|Objects || properties || variables || callbacks
+
|[[NML:Airports|Airports]] || [[NML:Airports#Airport properties|properties]] || [[NML:Airports#Airport variables|variables]] || [[NML:Airports#Airport callbacks|callbacks]] || FEAT_AIRPORTS
 
|-
 
|-
  +
| || [[NML:Airports#Airport tile properties|tile properties]] || [[NML:Airports#Airport tile variables|tile variables]] || [[NML:Airports#Airport tile callbacks|tile callbacks]] || FEAT_AIRPORTTILES
|Railtypes || properties || variables || callbacks
 
  +
|-
  +
|[[NML:Objects|Objects]] || [[NML:Objects#Object properties|properties]] || [[NML:Objects#Object variables|variables]] || [[NML:Objects#Object callbacks|callbacks]] || FEAT_OBJECTS
  +
|-
  +
|[[NML:Railtypes|Railtypes]] || [[NML:Railtypes#Railtype properties|properties]] || [[NML:Railtypes#Railtype variables|variables]] || [[NML:Railtypes#Railtype callbacks|callbacks]] || FEAT_RAILTYPES
  +
|-
  +
|[[NML:Roadtypes|Roadtypes]] || [[NML:Roadtypes#Roadtype properties|properties]] || [[NML:Roadtypes#Roadtype variables|variables]] || [[NML:Roadtypes#Roadtype callbacks|callbacks]] || FEAT_ROADTYPES
  +
|-
  +
|[[NML:Tramtypes|Tramtypes]] || [[NML:Tramtypes#Tramtype properties|properties]] || [[NML:Tramtypes#Tramtype variables|variables]] || [[NML:Tramtypes#Tramtype callbacks|callbacks]] || FEAT_TRAMTYPES
  +
|-
  +
|[[NML:Roadstops|Roadstops]] || [[NML:Roadstops#Roadstop properties|properties]] || [[NML:Roadstops#Roadstop variables|variables]] || [[NML:Roadstops#Roadstop callbacks|callbacks]] || FEAT_ROADSTOPS
  +
|-
  +
|Signals|| || || || FEAT_SIGNALS
 
|}
 
|}
  +
;[[NML:Warnings|Warnings]]
 
  +
 
;[[NML:Warnings|Compiler Warnings]]
 
;[[NML:Additional references|Additional references]]
 
;[[NML:Additional references|Additional references]]
 
*[[NML:Animation speed|Animation speed]]
 
*[[NML:Animation speed|Animation speed]]
Line 97: Line 132:
 
*[[NML:List of direction constants|List of direction constants]]
 
*[[NML:List of direction constants|List of direction constants]]
 
*[[NML:List of tile slopes|List of tile slopes]]
 
*[[NML:List of tile slopes|List of tile slopes]]
  +
*[[NML:List of tiles|List of tiles]]
 
*[[NML:Default TTD strings|Default TTD strings]]
 
*[[NML:Default TTD strings|Default TTD strings]]
 
*[[NML:Deprecated syntax|Deprecated syntax]]
 
;[[NML:NewGRF compatibility|NewGRF compatibility]]
 
;[[NML:NewGRF compatibility|NewGRF compatibility]]
 
;[[NML:Old style callbacks|Old-style callbacks]]
 
;[[NML:Old style callbacks|Old-style callbacks]]
  +
  +
  +
[[NML:Manual of style|Manual of style]]

Latest revision as of 07:26, 10 September 2023

Preface
Changes between NML 0.2 and head / 0.3
Changes between NML 0.3 and head / 0.4
Changes between NML 0.4 and head / 0.5
Getting started
Graphics files
Language structure and block syntax
  • GRF and its parameters
  • Item (Properties, graphics, livery overrides)
Units
Expressions
Language files
Lists of properties, variables and callbacks
Type Properties Variables Callbacks Feature
General variables FEAT_GLOBALVARS
Vehicles common properties variables callbacks
train properties FEAT_TRAINS
road vehicle properties FEAT_ROADVEHS
ship properties FEAT_SHIPS
aircraft properties FEAT_AIRCRAFT
Stations properties variables callbacks FEAT_STATIONS
Canals properties variables callbacks FEAT_CANALS
Bridges properties variables callbacks FEAT_BRIDGES
Towns
Houses properties variables callbacks FEAT_HOUSES
Industries common variables
industry properties industry variables industry callbacks FEAT_INDUSTRIES
tile properties tile variables tile callbacks FEAT_INDUSTRYTILES
Cargos properties variables callbacks FEAT_CARGOS
Airports properties variables callbacks FEAT_AIRPORTS
tile properties tile variables tile callbacks FEAT_AIRPORTTILES
Objects properties variables callbacks FEAT_OBJECTS
Railtypes properties variables callbacks FEAT_RAILTYPES
Roadtypes properties variables callbacks FEAT_ROADTYPES
Tramtypes properties variables callbacks FEAT_TRAMTYPES
Roadstops properties variables callbacks FEAT_ROADSTOPS
Signals FEAT_SIGNALS


Compiler Warnings
Additional references
NewGRF compatibility
Old-style callbacks


Manual of style