Difference between revisions of "NML:Main"

From GRFSpecs
Jump to navigationJump to search
(Initial TOC)
 
 
(35 intermediate revisions by 11 users not shown)
Line 1: Line 1:
  +
<div style="float:right; padding-left:12px; background:none;">{{NMLNavMain}}</div>
;Preface
 
  +
;Getting started
 
  +
;[[NML:Preface |Preface]]
;Graphic files
 
  +
;[[NML:changes 0.3|Changes between NML 0.2 and head / 0.3]]
;Language structure
 
  +
;[[NML:changes 0.4|Changes between NML 0.3 and head / 0.4]]
*Blocks
 
  +
;[[NML:changes 0.5|Changes between NML 0.4 and head / 0.5]]
*Features
 
  +
;[[NML:Getting started|Getting started]]
;Block syntax
 
  +
;[[NML:Graphic files|Graphics files]]
*GRF
 
  +
**GRF parameters
 
  +
;[[NML:Block syntax|Language structure and block syntax]]
*Item
 
  +
*[[NML:GRF|GRF]] and its parameters
**Property
 
  +
*[[NML:Item|Item]] (Properties, graphics, livery overrides)
**Graphics
 
  +
**Livery override
 
  +
*;Defining sprites:
*Realsprites
 
  +
**[[NML:Realsprites|Realsprites]]
*Recolour sprites
 
*Template
+
**[[NML:Template|Template]]
  +
**[[NML:Base Graphics|Base Graphics]]
*Spriteset
 
  +
**[[NML:Spriteset|Spriteset]]
*Spritegroup
 
  +
**;Replacing sprites:
*Spritelayout
 
  +
***[[NML:Replace TTD sprites|Replace TTD sprites]]
*Tilelayout
 
  +
***[[NML:Replace new sprites|Replace new sprites]]
*Switch
 
  +
***[[NML:Add font glyphs|Add font glyphs]]
*Produce
 
  +
***[[NML:Alternative sprites|Alternative sprites]] (32bpp, zoom levels)
*Random switch
 
  +
**;Aranging and grouping sprites:
*Cargotable
 
  +
***[[NML:Spritegroup|Spritegroup]] (Vehicles, stations)
*Railtypetable
 
  +
***[[NML:Spritelayout|Spritelayout]] (Houses, industries, airports, objects, stations)
*If/else
 
  +
***[[NML:Recolour sprites|Recolour sprites]]
*While
 
  +
*Error
 
  +
*;Flow control
*Disable items
 
  +
**[[NML:Tilelayout|Tilelayout]]
*Deactivate other NewGRFs
 
  +
**[[NML:Switch|Switch]]
*Testing for other NewGRFs
 
  +
**[[NML:Produce|Produce]]
*Overriding vehicles in other NewGRFs
 
  +
**[[NML:Random switch|Random switch]]
*Sprite replacement
 
  +
**Replace TTD sprites
 
  +
*;Global scope
**Replace new sprites
 
  +
**[[NML:Cargotable|Cargotable]]
**Add font glpyhs
 
  +
**[[NML:Railtypetable|Railtypetable / Roadtypetable / Tramtypetable]]
*32bpp sprites
 
  +
**[[NML:Snow line|Snow line]]
*Town names
 
  +
**[[NML:Setting base costs|Setting base costs]]
**Town names parts
 
*Parameter assignment
+
**[[NML:Parameter assignment|Parameter assignment]]
  +
**[[NML:If|If/else]]
*Setting base costs
 
  +
**[[NML:While|While]]
;Units
 
  +
;Expressions
 
  +
*;Interaction with other grfs
*Elementary values
 
  +
**[[NML:Error|Error]]
*Builtin functions
 
  +
**[[NML:Disable items|Disable items]]
;Language files
 
  +
**[[NML:Deactivate other NewGRFs|Deactivate other NewGRFs]]
;Lists of variables and properties.
 
  +
**[[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:Sorting vehicles in the purchase list|Sorting vehicles in the purchase list]]
  +
  +
;[[NML:Units|Units]]
  +
;[[NML:Expressions|Expressions]]
  +
*[[NML:Elementary values|Elementary values]]
  +
*[[NML:Builtin functions|Builtin functions]]
  +
;[[NML:Language files|Language files]]
  +
* [[NML:Language files#String codes|String Codes]]
  +
* [[NML:Language files#LanguageIDs|LanguageIDs]]
  +
;[[NML:Properties and variables and callbacks|Lists of properties, variables and callbacks]]
  +
 
{|
 
{|
  +
!Type
|Vehicles || common properties || variables || callbacks
 
  +
!Properties
  +
!Variables
  +
!Callbacks
  +
!Feature
 
|-
 
|-
  +
|[[NML:General|General]] || || [[NML:General#General variables|variables]] || || FEAT_GLOBALVARS
| || train properties
 
 
|-
 
|-
  +
|[[NML:Vehicles|Vehicles]] || [[NML:Vehicles#Properties common to all vehicle types|common properties]] || [[NML:Vehicles#Vehicle variables|variables]] || [[NML:Vehicles#Vehicle callbacks|callbacks]] ||
| || road vehicle properties
 
 
|-
 
|-
| || ship properties
+
| || [[NML:Vehicles#Train properties|train properties]] || || || FEAT_TRAINS
 
|-
 
|-
  +
| || [[NML:Vehicles#Road vehicle properties|road vehicle properties]] || || || FEAT_ROADVEHS
| || aircraft properties
 
 
|-
 
|-
|Stations|| properties || variables || callbacks
+
| || [[NML:Vehicles#Ship properties|ship properties]] || || || FEAT_SHIPS
 
|-
 
|-
|Canals || properties || variables || callbacks
+
| || [[NML:Vehicles#Aircraft properties|aircraft properties]] || || || FEAT_AIRCRAFT
 
|-
 
|-
|Bridges || properties || variables || 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
|Towns||
 
 
|-
 
|-
|Houses|| properties || variables || callbacks
+
|[[NML:Bridges|Bridges]] || [[NML:Bridges#Bridge properties|properties]] || [[NML:Bridges#Bridge variables|variables]] || [[NML:Bridges#Bridge callbacks|callbacks]] || FEAT_BRIDGES
 
|-
 
|-
  +
|[[NML:Towns|Towns]] || || || ||
|Industries|| properties || common variables || callbacks
 
 
|-
 
|-
  +
|[[NML:Houses|Houses]] || [[NML:Houses#House properties|properties]] || [[NML:Houses#House variables|variables]] || [[NML:Houses#House callbacks|callbacks]] || FEAT_HOUSES
| || || variables ||
 
 
|-
 
|-
  +
|[[NML:Industries|Industries]]|| || [[NML:Industries#Common variables|common variables]] || ||
| || tile properties || tile variables || tile callbacks
 
 
|-
 
|-
  +
| || [[NML:Industries#Industry properties|industry properties]] || [[NML:Industries#Industry variables|industry variables]] || [[NML:Industries#Industry callbacks|industry callbacks]] || FEAT_INDUSTRIES
|Cargos||properties || variables || callbacks
 
 
|-
 
|-
  +
| || [[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
 
|}
 
|}
  +
;Warnings
 
  +
;Additional references
 
  +
;[[NML:Warnings|Compiler Warnings]]
*Animation speed
 
  +
;[[NML:Additional references|Additional references]]
*Default industries
 
  +
*[[NML:Animation speed|Animation speed]]
*Default industry tiles
 
  +
*[[NML:Default industries|Default industries]]
*Base cost table
 
  +
*[[NML:Default industry tiles|Default industry tiles]]
*List of sound effects
 
  +
*[[NML:Base cost table|Base cost table]]
*List of default vehicle IDs
 
  +
*[[NML:List of sound effects|List of sound effects]]
*List of default house properties
 
  +
*[[NML:List of default vehicle IDs|List of default vehicle IDs]]
*List of town zones
 
  +
*[[NML:List of default house properties|List of default house properties]]
*List of tile classes
 
*List of default colour translation palettes
+
*[[NML:List of town zones|List of town zones]]
  +
*[[NML:List of tile classes|List of tile classes]]
*List of direction constants
 
  +
*[[NML:List of default colour translation palettes|List of default colour translation palettes]]
*List of tile slopes
 
  +
*[[NML:List of direction constants|List of direction constants]]
*Default TTD strings
 
  +
*[[NML:List of tile slopes|List of tile slopes]]
;NewGRF compatibility
 
  +
*[[NML:List of tiles|List of tiles]]
;Old-style callbacks
 
  +
*[[NML:Default TTD strings|Default TTD strings]]
  +
*[[NML:Deprecated syntax|Deprecated syntax]]
  +
;[[NML:NewGRF compatibility|NewGRF compatibility]]
  +
;[[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