Difference between revisions of "Main Page"

From GRFSpecs
Jump to navigationJump to search
m (Action3 works on more features than just vehicles)
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
== Sprite types ==
 
== Sprite types ==
;[[Action0]] - Defines new graphics feature properties
+
;[[Action0]] - Defines new properties for anything added or changed by the NewGRF
 
:{| |-
 
:{| |-
  +
|rowspan="4" align="center" style="width:3em"|'''0'''
 
| [[Action0/Vehicles | Vehicles]]
 
| [[Action0/Vehicles | Vehicles]]
 
| [[Action0/Vehicles/Trains | Trains]]
 
| [[Action0/Vehicles/Trains | Trains]]
Line 12: Line 13:
 
| [[Action0/Bridges | Bridges]]
 
| [[Action0/Bridges | Bridges]]
 
| [[Action0/Houses | Houses]]
 
| [[Action0/Houses | Houses]]
| [[Action0/Global Variables | Global Variables]]
+
| [[Action0/Global Settings | Global Settings]]
 
|-
 
|-
 
| [[Action0/Industry Tiles | Industry Tiles]]
 
| [[Action0/Industry Tiles | Industry Tiles]]
Line 26: Line 27:
 
| ''Towns''
 
| ''Towns''
 
|}
 
|}
;[[Action1]] - Defines a set of real sprites
+
;[[Action1]] - Defines one or more graphics sets
 
;[[Action2]] - Defines graphics set IDs
 
;[[Action2]] - Defines graphics set IDs
 
* Basic Action2
 
* Basic Action2
 
:{| |-
 
:{| |-
  +
|rowspan="4" align="center" style="width:3em"|'''2'''
 
|colspan=5| [[Action2/Vehicles | Vehicles]]
 
|colspan=5| [[Action2/Vehicles | Vehicles]]
 
|-
 
|-
Line 36: Line 38:
 
| ''Bridges''
 
| ''Bridges''
 
| [[Action2/Sprite Layout | Houses]]
 
| [[Action2/Sprite Layout | Houses]]
| ''Global Variables''
+
| ''Global Settings''
 
|-
 
|-
 
| [[Action2/Sprite Layout | Industry Tiles]]
 
| [[Action2/Sprite Layout | Industry Tiles]]
Line 50: Line 52:
 
| ''Towns''
 
| ''Towns''
 
|}
 
|}
* [[VariationalAction2]] - Variational Action 2
+
* [[VariationalAction2]] - A conditional switch that determines a [[Callbacks|callback]] result or chains to another Action 2
 
: [[VarAction2Advanced]] - Advanced features of Variational Action 2
 
: [[VarAction2Advanced]] - Advanced features of Variational Action 2
  +
: [[GlobalVariables | Global Variables]]
 
:{| |-
 
:{| |-
  +
|rowspan="4" align="center" style="width:3em"|'''VA2'''
 
|colspan=5| [[VariationalAction2/Vehicles | Vehicles]]
 
|colspan=5| [[VariationalAction2/Vehicles | Vehicles]]
 
|-
 
|-
Line 59: Line 63:
 
| [[VariationalAction2/Bridges | Bridges]]
 
| [[VariationalAction2/Bridges | Bridges]]
 
| [[VariationalAction2/Houses | Houses]]
 
| [[VariationalAction2/Houses | Houses]]
| ''Global Variables''
+
| ''Global Settings''
 
|-
 
|-
 
| [[VariationalAction2/Industry Tiles | Industry Tiles]]
 
| [[VariationalAction2/Industry Tiles | Industry Tiles]]
Line 73: Line 77:
 
| [[VariationalAction2/Towns | Towns]]
 
| [[VariationalAction2/Towns | Towns]]
 
|}
 
|}
* [[RandomAction2]] - Randomized Action 2
+
* [[RandomAction2]] - A randomized Variational Action 2
 
:{| |-
 
:{| |-
  +
|rowspan="4" align="center" style="width:3em"|'''R'''
 
|colspan=5| [[RandomAction2#Vehicles | Vehicles]]
 
|colspan=5| [[RandomAction2#Vehicles | Vehicles]]
 
|-
 
|-
Line 81: Line 86:
 
| ''Bridges''
 
| ''Bridges''
 
| [[RandomAction2#Town_building_triggers | Houses]]
 
| [[RandomAction2#Town_building_triggers | Houses]]
| ''Global Variables''
+
| ''Global Settings''
 
|-
 
|-
 
| [[RandomAction2#Industry_tile_triggers | Industry Tiles]]
 
| [[RandomAction2#Industry_tile_triggers | Industry Tiles]]
Line 97: Line 102:
   
 
* [[Callbacks]] - List of available callbacks
 
* [[Callbacks]] - List of available callbacks
  +
;[[Action3]] - Associates features (Action0 IDs) with graphics set IDs
+
;[[Action3]] - Associates Action 2s with an Action 0
  +
:{| |-
  +
|rowspan="4" align="center" style="width:3em"|'''3'''
  +
|colspan=5| [[Action3 | Vehicles]]
  +
|-
  +
| [[Action3 | Stations]]
  +
| [[Action3/Canals | Canals & Rivers]]
  +
| ''Bridges''
  +
| [[Action3 | Houses]]
  +
| ''Global Settings''
  +
|-
  +
| [[Action3 | Industry Tiles]]
  +
| [[Action3 | Industries]]
  +
| [[Action3 | Cargos]]
  +
| [[Action3 | Sound Effects]]
  +
| [[Action3 | Airports]]
  +
|-
  +
| [[Action3 | Signals]]
  +
| [[Action3 | Objects]]
  +
| [[Action3/Railtypes | Railtypes]]
  +
| [[Action3 | Airport Tiles]]
  +
| ''Towns''
  +
|}
 
: [[Action3LiveryOverride]] - Change wagon livery to match the engine
 
: [[Action3LiveryOverride]] - Change wagon livery to match the engine
 
;[[Action4]] - Defines text strings
 
;[[Action4]] - Defines text strings
;[[Action5]] - Defines specific base graphics sets
+
;[[Action5]] - Replaces base set sprites not present in the original TTD.
 
;[[Action6]] - Modifies the contents of the following sprite
 
;[[Action6]] - Modifies the contents of the following sprite
 
;[[Action7]] - Conditionally skips sprites or jumps to a label
 
;[[Action7]] - Conditionally skips sprites or jumps to a label
Line 108: Line 136:
 
;[[ActionA]] - Replaces TTD base set sprites
 
;[[ActionA]] - Replaces TTD base set sprites
 
;[[ActionB]] - Generates an error message
 
;[[ActionB]] - Generates an error message
;[[ActionC]] - Does nothing.
+
;[[ActionC]] - Does nothing (can be used to embed comments)
 
;[[ActionD]] - Assigns parameters and calculates results
 
;[[ActionD]] - Assigns parameters and calculates results
 
* [[ReadingOtherGRFParameters]] - Reading another GRF file's parameters
 
* [[ReadingOtherGRFParameters]] - Reading another GRF file's parameters
Line 115: Line 143:
 
;[[ActionE]] - Deactivates a NewGRF file
 
;[[ActionE]] - Deactivates a NewGRF file
 
;[[ActionF]] - Defines new town name styles
 
;[[ActionF]] - Defines new town name styles
;[[Action10]] - Defines GOTO label for action 7/9
+
;[[Action10]] - Defines a label for action 7/9
;[[Action11]] - Defines new sound data
+
;[[Action11]] - Defines new sounds
;[[Action12]] - Load font glyphs
+
;[[Action12]] - Adds Unicode font glyphs
 
;[[Action13]] - Translates GRF-specific strings
 
;[[Action13]] - Translates GRF-specific strings
;[[Action14]] - Static NewGRF Information (OpenTTD only)
+
;[[Action14]] - Static NewGRF information (OpenTTD only)
;[[RealSprites]] - Sprites that actually get drawn on the screen
+
;[[RealSprites]] - Sprites that actually are drawn on the screen
;[[RecolorSprites]] - Changing how other sprites are drawn
+
;[[RecolorSprites]] - Changing other sprites' colors
   
 
== Graphics properties ==
 
== Graphics properties ==
Line 131: Line 159:
 
* [[IndustryTileDefaultProps]] - Default property values for TTD's industry tiles
 
* [[IndustryTileDefaultProps]] - Default property values for TTD's industry tiles
 
* [[IndustryDefaultProps]] - Default properties values for TTD's industries
 
* [[IndustryDefaultProps]] - Default properties values for TTD's industries
* [[IndustryTypes]] - Industry IDs
 
 
* [[CargoDefaultProps]] - Default property values for TTD's cargo types
 
* [[CargoDefaultProps]] - Default property values for TTD's cargo types
 
* [[VehicleIDs]] - Default vehicle IDs
 
* [[VehicleIDs]] - Default vehicle IDs
  +
* [[NML:Default_Vehicle_Properties]] - Default Vehicle Properties (NML)
 
* [[AirportTypes]] - Default Airport IDs
 
* [[AirportTypes]] - Default Airport IDs
  +
* [[AirportTileDefaultProps]] - Default airport tile properties
   
 
== NewGRF commons ==
 
== NewGRF commons ==
Line 152: Line 181:
 
* [[TextIDs | Text IDs (TTD + TTDPatch + NewGRF defined)]]
 
* [[TextIDs | Text IDs (TTD + TTDPatch + NewGRF defined)]]
 
* [[GRFActionsDetailed | Syntax details]]
 
* [[GRFActionsDetailed | Syntax details]]
  +
* [[Version numbers | Types of version numbers used throughout the specs]]
 
* [[DebuggingGRFCode | Debugging NewGRFs]]
 
* [[DebuggingGRFCode | Debugging NewGRFs]]
 
* [[SpriteErrors | TTDPatch error codes on loading NewGRFs]]
 
* [[SpriteErrors | TTDPatch error codes on loading NewGRFs]]

Revision as of 01:36, 6 November 2012

Sprite types

Action0 - Defines new properties for anything added or changed by the NewGRF
0 Vehicles Trains RoadVehicles Ships Aircraft
Stations Canals & Rivers Bridges Houses Global Settings
Industry Tiles Industries Cargos Sound Effects Airports
Signals Objects Railtypes Airport Tiles Towns
Action1 - Defines one or more graphics sets
Action2 - Defines graphics set IDs
  • Basic Action2
2 Vehicles
Stations Canals & Rivers Bridges Houses Global Settings
Industry Tiles Industries Cargos Sound Effects Airports
Signals Objects Railtypes Airport Tiles Towns
VarAction2Advanced - Advanced features of Variational Action 2
Global Variables
VA2 Vehicles
Stations Canals & Rivers Bridges Houses Global Settings
Industry Tiles Industries Cargos Sound Effects Airports
Signals Objects Railtypes Airport Tiles Towns
R Vehicles
Stations Canals & Rivers Bridges Houses Global Settings
Industry Tiles Industries Cargos Sound Effects Airports
Signals Objects Railtypes Airport Tiles Towns
Action3 - Associates Action 2s with an Action 0
3 Vehicles
Stations Canals & Rivers Bridges Houses Global Settings
Industry Tiles Industries Cargos Sound Effects Airports
Signals Objects Railtypes Airport Tiles Towns
Action3LiveryOverride - Change wagon livery to match the engine
Action4 - Defines text strings
Action5 - Replaces base set sprites not present in the original TTD.
Action6 - Modifies the contents of the following sprite
Action7 - Conditionally skips sprites or jumps to a label
GameConfigFlags - Configuration flags for Action 7/9 Variable 85
Action8 - Defines GRFID, Name and Description
Action9 - (see action 7 above)
ActionA - Replaces TTD base set sprites
ActionB - Generates an error message
ActionC - Does nothing (can be used to embed comments)
ActionD - Assigns parameters and calculates results
ActionE - Deactivates a NewGRF file
ActionF - Defines new town name styles
Action10 - Defines a label for action 7/9
Action11 - Defines new sounds
Action12 - Adds Unicode font glyphs
Action13 - Translates GRF-specific strings
Action14 - Static NewGRF information (OpenTTD only)
RealSprites - Sprites that actually are drawn on the screen
RecolorSprites - Changing other sprites' colors

Graphics properties

TTD defaults

NewGRF commons

Misc

Game mechanics