NML:Testing for other NewGRFs: Difference between revisions

From GRFSpecs
Jump to navigation Jump to search
Content deleted Content added
FooBar (talk | contribs)
content of nml r1625
 
FooBar (talk | contribs)
add nav template
Line 1: Line 1:
{{NMLNavBlocksyntax}}

See the [[NML:Builtin functions|builtin functions]] for the functions grf_XXX. Additionally - when the presence of a NewGRF is established - their parameters can be of interest and queried. The general syntax is
See the [[NML:Builtin functions|builtin functions]] for the functions grf_XXX. Additionally - when the presence of a NewGRF is established - their parameters can be of interest and queried. The general syntax is


identifier = param[<grfID>, <param#>]
identifier = param[<grfID>, <param#>]



For example
For example

Revision as of 16:35, 21 August 2011

Block Syntax

See the builtin functions for the functions grf_XXX. Additionally - when the presence of a NewGRF is established - their parameters can be of interest and queried. The general syntax is

identifier = param[<grfID>, <param#>]


For example

 other_newgrfs_param0 = param["NML\01", 0];
 other_newgrf_no_high_cost = param["NML\01", 1] < 5;

reads parameter 1 (the first one, counting starts at 0) from the NewGRF with the grfID "NML\01".