Search results

From GRFSpecs
Jump to navigationJump to search
  • ...ly possible return values are 00, 02, 04 and 06. Their meaning is the same as in prop. 0E. ...ould contain. For the same reason, it uses the same cargo type in action 3 as the construction menu does (i.e., type FF if defined or else the default).
    884 bytes (151 words) - 18:57, 16 June 2011
  • ...d refit cost factor, cost base depends on the vehicle type and is the same as for the refit cost property. Negative cost factors allow refit revenue. ...llowed as an auto-refit as long as bit 4 of the miscellaneous flags is set as well.
    1 KB (201 words) - 20:15, 22 September 2013
  • ...ormal gameplay, that means exactly four times). Can return the same values as callback 1B. Variable 40 contains the new stage. You can return FF for stag ...llbacks, if the high byte of the result is nonzero, it will be interpreted as a sound effect number, and the corresponding sound effect will be played at
    521 bytes (82 words) - 18:57, 16 June 2011
  • |00..FE|| Display error message using D0xx (D000..D0FE) text as second line. |100..1FE|| Display error message using D0xx (D100..D1FE) text as second line.
    1 KB (205 words) - 13:29, 1 April 2012
  • ...s, which made pure white images with sprites common in NewGRF development. As such the pure white pixel test is also a way to detect so cases where the p ...iven in the source (image or sound file) does not match the capitalization as found in the file system.
    1 KB (224 words) - 22:28, 20 February 2021
  • ...frame should last. The value of the delay should be given in the same way as for property 1B/10/17. Decreasing the return value speeds the animation up Note: This is one of the most time consuming callbacks as it is called for every animated tile every ≈30 milliseconds. For better p
    788 bytes (127 words) - 18:57, 16 June 2011
  • The above example will remap colour 0xC6 as 0x28, 0xC7 as 0xF5 and the range 0xC8 to 0xCD to the colours 0x0A..0x0F. This is one of t
    878 bytes (146 words) - 13:22, 18 December 2013
  • ...ic action 3 must be used. It must be processed by a VarAction2 feature 0E, as indicated in the following link: [[VarAction2NewSignals]].
    252 bytes (37 words) - 16:33, 19 June 2011
  • ...re identical to that of <code style="color:darkgreen">railtypetable</code> as described below ...ype. If the railtype SHNY is not available then trains using RT_SHINY_RAIL as track type will fallback to RAIL.
    2 KB (265 words) - 19:35, 27 February 2020
  • Works exactly the same way as [[Callbacks#Random production change (29) |callback 29]], except that it's
    235 bytes (28 words) - 18:58, 16 June 2011
  • ...to upgrade the current vehicle to and the vehicle variables are available as usual to decide which IDs would be appropriate to upgrade to. ...t that is available to the player and has the required minimum reliability as set by the autoreplace switch, and abort the callback sequence at this poin
    2 KB (288 words) - 22:12, 30 August 2022
  • |FE||continue with next frame as usual. You can return this for stages where you don't want to do anything s ...llbacks, if the high byte of the result is nonzero, it will be interpreted as a sound effect number, and the corresponding sound effect will be played at
    908 bytes (142 words) - 07:13, 11 January 2013
  • The format is as follows. Optional parts are placed between parentheses: ...ted below, all parameters are numbers. They can be any expression, as long as they evaluate to a compile-time constant.
    5 KB (807 words) - 14:12, 6 June 2020
  • ...anslation on every player. However, GRFs with only action 13 can be loaded as [[OpenTTD static NewGRF]]. {{grfFrom|8}} GRF version 8 alleviates this prob The data looks as follows:
    2 KB (254 words) - 23:25, 27 January 2022
  • ...imum value is 2 (=4 ticks). The ingame length as well real length is given as rounded values for reference only, assuming normal game speed.
    924 bytes (110 words) - 16:45, 21 August 2011
  • The following values can be used as return values for the <code style="color:darkgreen">location_check</code> c | Item can't be built, show the string as error message.
    2 KB (249 words) - 20:59, 30 August 2022
  • If this callback is in use, additional vehicles will be added as long as the callback says so. ...n the first vehicle contains cargo, the callback must work in the buy menu as well. This means that it will be called with cargo type FF in the action 3.
    2 KB (291 words) - 12:21, 18 April 2015
  • With this statement, you can deactivate other NewGRFs. As parameters, you can supply any number of grfids (4-byte strings) to deactiv
    409 bytes (59 words) - 16:34, 21 August 2011
  • * Statistics on the NewGRF on used IDs for vehicles, houses, etc as well as available switches, parameters etc
    2 KB (227 words) - 13:21, 19 February 2015
  • ...of the returned value is different in GRF version 7; it works the same way as [[Callbacks#Industry location permissibility (28) |callback 28]]. {{ottdp| are the same as the lowest byte of variable 18 of callback 28.
    2 KB (290 words) - 13:28, 1 April 2012
  • ...ist_of_tiles|the tile list]] for a list of terrain sprites). The syntax is as follows: .../script.php?feature=spritesbyfile&q= OpenGFX author overview] can be used as a reference to look up these sprite numbers.
    2 KB (359 words) - 06:35, 28 February 2013
  • ...cles ({{ottd|1.1|r21238}} Since OpenTTD r21238 for road vehicles and ships as well). ...used instead. &nbsp;For possible return values, refer to these properties as well.
    1 KB (200 words) - 23:16, 3 August 2011
  • ...elicopter rotors, and in the future, the look of train visual effects such as steam and diesel smoke. The format of a wagon override is the same as a regular action 3 entry, with the following special considerations:
    3 KB (527 words) - 22:30, 27 August 2011
  • This callback is intended for limiting your type as a whole, so you can't access any industry-specific variables, just the glob |0001..00FF|| Allow construction, and use the returned value as probability for appearance on the map. (Instead of using [[Action0/Industri
    2 KB (229 words) - 13:25, 1 April 2012
  • ...e entries for palette cycling to do some colour-animation, don't use these as regular colours. These entries are often called "action colours". ...web.archive.org/web/20121115112036/https://dev.openttdcoop.org/documents/1 as .zip.
    5 KB (818 words) - 12:30, 22 March 2024
  • The data looks as follows: The set of <num-sprites> and <first-sprite> is repeated as often as <num-sets> specifies.
    4 KB (556 words) - 09:34, 29 December 2023
  • ...r it can be selected in the station construction window. &nbsp;Returning 1 as callback return indicates the station can be built, and a return code of 0
    416 bytes (62 words) - 13:35, 1 April 2012
  • |Height above ground, top parts of locks have the same height as the lower parts. Note: this returns height in increments of 1 (and not 8) |Random byte for plain canals and river tiles, otherwise zero (under bridges as example, or old savegames)||
    1 KB (161 words) - 21:46, 6 May 2013
  • {{grfTill|7}} For GRF version 7 and below the return values are the same as for [[Callbacks#Industry_location_permissibility_.2828.29|callback 28]], bu {{grfFrom|8}} For GRF version 8 and above the return values are the same as for [[Callbacks#Industry_location_permissibility_.2828.29|callback 28]]. Re
    1 KB (190 words) - 13:18, 1 April 2012
  • ...perty 16. Return 0 to do nothing, or 1 to remove the building from the map as if the town decided to destroy it. You can use this for example to remove a
    446 bytes (67 words) - 13:24, 1 April 2012
  • <b>NOTE: As of OpenTTD 13, this feature is considered deprecated for most uses. Use var ...allback says to stop. &nbsp;All the returned variations are then displayed as refitting options, with all options that have the same cargo type and callb
    1 KB (229 words) - 09:59, 10 May 2024
  • ...is no longer true, Action 6 will be applied both at initialization as well as activation. You can therefore use either action 7 or 9 to skip it, whicheve The data looks as follows:
    5 KB (871 words) - 22:02, 30 August 2022
  • ...llbacks, if the high byte of the result is nonzero, it will be interpreted as a sound effect number, and the corresponding sound effect will be played at
    1 KB (241 words) - 22:39, 31 October 2011
  • ...ype of the value depends on the property, some properties require a string as value and some an expression. For some properties you can optionally specif ...tem-block. It allows to define the graphics for a particular item, as well as various callbacks. Callbacks are used to define various things at run time,
    4 KB (689 words) - 14:05, 5 November 2014
  • ...ter (i.e. those usually set as options in the newgrf(w).cfg file), as well as do math on them. The data looks as follows:
    5 KB (746 words) - 16:56, 18 March 2015
  • ...ly an integer from 1 up to and including 365, so you may also define a day as a number. The values can be any value between 0 and 255. 255 means 'no snow ...le="color:darkgreen">equal</code> mode, the height of the snow is the same as the day before, unless the day is listed in the <code style="color:darkgree
    2 KB (313 words) - 17:57, 11 May 2014
  • ...u can specify some parameter settings that the user will be able to change as part of the newgrf configuration. These can for example be used to disable This gives the parameter name as shown in the parameter configuration dialogue of OpenTTD.
    3 KB (469 words) - 07:18, 11 April 2015
  • ...via action3) that isn't defined, your request is ignored, but not reported as an error, either. This means that if you want to conditionally define an ID |10||W||{{ottdp|1.1|no|ottdrev=r19459}}||TextID to be used as airport name
    3 KB (537 words) - 13:09, 5 December 2011
  • ...note, though, that the text handler will see it as an array of bytes, not as an array of DWORDs, so you will have to pack two words into a register when
    2 KB (288 words) - 13:30, 1 April 2012
  • ...ed in two ways, as generator of (partial) town names for another block, or as top-level town names block, a starting point of town names in the grf file.
    2 KB (311 words) - 22:07, 1 February 2014
  • ...callback. A returned expression may contain variables (with the same scope as the switch block itself), parameter accesses and everything else that a nor ...style="color:darkgreen">return;</code> returns the computed value directly as a callback result. Note that the maximum value for callback results is 3251
    5 KB (880 words) - 21:31, 30 August 2022
  • The data looks as follows: ...ing the action 12 must be the real sprites for all glyphs, as many sprites as all <num-char> added up.
    3 KB (514 words) - 11:57, 20 November 2011
  • The data for Action 0 looks as follows: ...OpenTTD since r13482, extended IDs (up to 65535) can be used for vehicles as well. However there is currently a caveat that articulated parts must be be
    5 KB (763 words) - 09:45, 11 June 2023
  • * For vehicles, the same as above is possible. However, to facilitate the common case of having multipl * Features not mentioned here have no use for sprite sets, as such they are not supported by NML.
    2 KB (321 words) - 15:04, 1 November 2014
  • ...feature this action 3 associates graphics with. There must be as many IDs as &lt;n-id&gt; specifies ...he following ones are for sloped rivers where slopes follow the same order as for id5 (river slopes).
    3 KB (434 words) - 22:04, 2 December 2011
  • .... (A failed callback terminates the list, too.) The same limitations apply as for callback 14A: industry tiles aren't yet placed, and some industry varia In both cases return FFh as the last element to terminate the lists.
    2 KB (269 words) - 12:09, 4 November 2018
  • # To keep the numbers more manageable, the classes are as generic as possible. |STRU||Structures||Multitile engineered objects that don't quite fit in as industries, houses or stations - dams etc.
    4 KB (615 words) - 20:42, 11 August 2020
  • ...lable resources, check whether certain IDs are available, and/or mark them as reserved. Then, an action 6 will enter the actual values in the appropriate ...vated and be shown with an orange colour in the GRF Status Window, as well as a message indicating the type of resource that was not available. Note that
    7 KB (1,069 words) - 13:45, 13 February 2012
  • |41||B||{{ottdp|0.6|2.5}}||Ground type, the same as variable 81 for [[VarAction2Canals|canals]] ...|0.6|2.5}}||The tile is an industry tile, and belongs to the same industry as the current one
    5 KB (864 words) - 13:10, 1 April 2012
  • ...valid palette. You can chose either the default (DOS) palette (recommended as it contains a few more colours) or the legacy (windows) palette.
    980 bytes (139 words) - 15:12, 16 October 2015
  • The data looks as follows: ...The first fatal message during each activation is shown as a red popup box as well.
    5 KB (827 words) - 13:13, 13 November 2020
  • |&lt;xofs&gt;||B||x-offset from northern tile corner (as a signed byte) |&lt;yofs&gt;||B||y-offset from northern tile corner (as a signed byte)
    5 KB (865 words) - 20:24, 30 November 2023
  • The data looks as follows:
    803 bytes (115 words) - 14:48, 15 June 2011
  • #Pad with zeroes from the left until you have twice as many digits as you need bytes (i.e. 4 digits for W, 8 digits for D) Strings are written as individual characters in hex codes, with a final 00 to indicate the end of
    5 KB (817 words) - 10:59, 18 June 2011
  • ...l changes to existing behaviour, among others: changing vehicleIDs as well as some of their properties, changing industry layouts, railtype compatibility
    3 KB (427 words) - 14:22, 27 May 2013
  • ...e's a special parameter, 254: That reports back the version of that NewGRF as set in its grf definition (e.g. via the version property in the [[NML:GRF|
    702 bytes (109 words) - 09:48, 2 February 2013
  • ...ill|7}} For GRF version 7 or earlier, setting property 09 sets property 1B as well.</ref>--> ...y 1B ''after'' setting property 09, as property 09 sets the rail type name as well for backwards compatibility.</ref>-->
    8 KB (1,356 words) - 19:47, 20 May 2020
  • ...ill|7}} For GRF version 7 or earlier, setting property 09 sets property 1B as well.</ref>--> ...y 1B ''after'' setting property 09, as property 09 sets the rail type name as well for backwards compatibility.</ref>-->
    8 KB (1,345 words) - 19:47, 20 May 2020
  • An advanced VarAction2 looks as follows: ...riable> and <varadjust> pair. &nbsp;This sequence may be repeated as often as necessary, by setting the appropriate bit in the previous <varadjust> (see
    9 KB (1,376 words) - 19:06, 22 August 2011
  • ...in the NewGRF specs wiki should try to follow a common style. Headings are as follows: Note: section headings are indicated by == otherwise they have the same size as the page title
    2 KB (286 words) - 22:11, 22 July 2011
  • ...can make the selection depend on source and destination industries as well as service distance among other things. |40||D||xxxxxxTT, TT=cargo slot from cargo translation table or same as var.81 if no table, available since r1167/2.5b9
    4 KB (593 words) - 13:22, 1 April 2012
  • The data looks as follows: The meaning of this byte depends on the GRF version of the .grf file as set in [[Action8#version|action 8]].
    9 KB (1,484 words) - 15:58, 11 February 2023
  • ...ion goes below the quarter of the default, the industry is closed instead, as if you returned 03.|| |04||{{ottdp| | }}||Do the standard random production change as if this industry was a primary one.||
    3 KB (527 words) - 17:15, 28 April 2012
  • ...rmat of ss0t where t is the terrain type which the tile is on, same values as [[VarAction2Canals|canal var81]]. As of TTDPatch r2088, ss contains the slope data of the tile, same format as for [[VarAction2IndustryTiles#Land info of nearby tiles (60)|industrytile v
    6 KB (878 words) - 23:00, 7 February 2014
  • |00..FC||Disallow attaching and use the D0xx (D000..D0FC) text ID as second line of an error message, |00..3FF||Disallow attaching and use the D0xx (D000..D3FF) text ID as second line of an error message,
    2 KB (376 words) - 13:54, 19 January 2014
  • The syntax is as follows:
    911 bytes (148 words) - 16:35, 21 August 2011
  • ...ime, several features have been added to OpenTTD that require new sprites. As these sprites are not present in the original base graphics and only found <!-- This is not usable anyway, as NML 0.3 is grf v8
    3 KB (483 words) - 21:18, 27 June 2023
  • The data looks as follows: Here you give the list of GRFIDs, in the same format as in [[Action8]], which should be deactivated.
    5 KB (716 words) - 05:11, 8 October 2011
  • ...e new style callbacks. Thus all callback_flag properties have been removed as have the callback flag constants *CBF*. For a complete list of affected con ...more and different zoom level arguments and a type argument has been added as 8bpp sprites are now also permissible. See the description of the [[NML:Alt
    4 KB (538 words) - 13:04, 13 November 2020
  • {{grfTill|7}} For GRF version 7 and below the return values are the same as for [[Callbacks#Industry_location_permissibility_.2828.29|callback 28]], bu {{grfFrom|8}} For GRF version 8 and above the return values are the same as for [[Callbacks#Industry_location_permissibility_.2828.29|callback 28]]. Re
    2 KB (364 words) - 13:33, 1 April 2012
  • ...versed sprites in the vehicle's varaction 2 chain, but this is inefficient as it typically causes sprites to be duplicated in the grf.
    934 bytes (135 words) - 20:54, 30 November 2023
  • This callback is called for all vehicles and as generic callback for bridges, for various events that support playing sound |10||Bridge sound, called as generic feature 06 callback every time a consist moves on a bridge. Variabl
    2 KB (386 words) - 12:24, 18 April 2015
  • The data looks as follows: ...red, it is valid to use the value "80" for the ID of the American language as well, but putting it first in the list is the preferred way of defining it.
    8 KB (1,371 words) - 17:33, 15 June 2011
  • ...red in a byte, 0 meaning 0% and 255 meaning 100%. The rating is calculated as the sum of the following components: ...orry about calculated callback results yielding a negative result, as long as you stay in the range -16384..16383). During the callback, variable 18 has
    5 KB (782 words) - 21:34, 21 June 2011
  • Action 01 is used to define sets of real sprites (as opposed to pseudo-sprites). It can be put anywhere in the .nfo file after [ This behaviour of Action1 applies to both the basic as well as the extended format.
    6 KB (953 words) - 09:51, 11 June 2023
  • Note: that these are the same bits as would be used to order action5 block type 4. |8-15||Low half of L3 of tile, bits 4-7 bitmask of which signals present as shown below, bits 0-3: track type
    5 KB (793 words) - 19:12, 19 June 2011
  • The date is specified as number of days since 1920 where TTD counts 365,25 days in a year. It will h ...new game, a random amount between 31 months and 17 years is added to this as well.
    6 KB (926 words) - 14:27, 24 June 2014
  • | Same as above, but tests whether the grf will become active instead of whether it's | Same as above, but tests whether current grf will become active in the order behind
    8 KB (1,304 words) - 21:26, 27 June 2023
  • |<operation>||B||As for ActionD, but only assignment is valid. All map sizes will be substracted by 6, as to keep the size 64 the smallest one, thus zero based
    4 KB (558 words) - 13:20, 13 March 2022
  • ...of the aircraft you have to use varaction2 type 82/86/8A (related object), as most variables are not valid for the mail compartment.
    975 bytes (152 words) - 13:19, 1 April 2012
  • ...the industry starts with after construction. Accessible via RandomAction2 as well. This callback must return a 15-bit value, which is interpreted as follows:
    4 KB (609 words) - 13:26, 1 April 2012
  • You may note that this is the same as the action2 entry for vehicles, but with num_loadtypes=1 and num_loadingtyp ...o the most recent action1 set. For example, action1 set 3 would be encoded as 03 00. Note the additional 00 which is needed because it must be a word val
    3 KB (437 words) - 12:31, 28 December 2019
  • ...ill|7}} For GRF version 7 or earlier, setting property 09 sets property 1B as well.</ref> ...y 1B ''after'' setting property 09, as property 09 sets the rail type name as well for backwards compatibility.</ref>
    12 KB (1,924 words) - 15:21, 9 December 2023
  • The data looks as follows: This defines the number of this action 2. &nbsp;The ID can then be used as target in an action 3 or another variational/random action 2.
    14 KB (2,101 words) - 19:58, 16 January 2024
  • ...than passengers on trains and planes, instead the capacity is used exactly as returned by the callback. See also the summary page about [[VehicleRefittin
    1 KB (172 words) - 18:56, 2 February 2012
  • ...the pre-compiled binary file), you should install these libraries as well as NML itself using <code style="color:darkgreen">python setup.py install</cod macOS users have two choices: install the dependencies manually as described in the Linux section above, for use with the python version that
    9 KB (1,227 words) - 10:44, 25 February 2022
  • In a VarAction2, the variable value has been computed as <value>, and <adjusted> will be used after shift/and/add/mod/div adjustment |other||1324 (4900) Note: this includes all features not listed below as well as GRM sprite allocations
    5 KB (749 words) - 06:46, 8 July 2011
  • |&lt;xofs&gt;||B||x-offset from northern tile corner (as a signed byte) |&lt;yofs&gt;||B||y-offset from northern tile corner (as a signed byte)
    10 KB (1,525 words) - 20:24, 30 November 2023
  • ...r higher. It is recommended to set the 'number'-property to the same value as the item ID. | String to use as cargo type name. Example: "Passengers". The list of [[NML:Default_TTD_strin
    13 KB (2,057 words) - 13:57, 3 February 2024
  • ...nly: they are used to pass extra data to some 4x and 6x variables, as well as for returning extra data from callbacks.
    4 KB (552 words) - 19:50, 2 September 2018
  • | ||empty tag, written as {} is used to create a newline || ...t'd be seen as the start of a tag and the rest of the string would be read as name of the tag. ||
    12 KB (1,617 words) - 07:21, 10 September 2023
  • ...feature this action 3 associates graphics with. There must be as many IDs as &lt;n-id&gt; specifies ...counted from the first of their class, i.e. the first road vehicle has 00, as does the first plane, the first ship, and the first train vehicle.
    7 KB (1,073 words) - 14:17, 24 December 2023
  • | 1 if this town is marked as a "city", 0 if it's not.
    2 KB (218 words) - 21:07, 30 August 2022
  • If you always return 1 from this callback, you achieve the same effect as turning on bit 1 of property 19. When this callback is enabled, bit 1 of pr
    1 KB (198 words) - 18:58, 16 June 2011
  • ...tyle="color:darkgreen">produce_cargo</code> are cargolabels (unescaped/not as a string) for a cargo that will be consumed/produced from the industry duri * Amount of GIFT produced is the same as amount of TOYS and SWTR consumed.
    9 KB (1,308 words) - 21:01, 8 May 2019
  • The return value has the same values as [[VariationalAction2/Objects#Tile information (41)|object var41]]. The return value has the same values as [[VariationalAction2/Vehicles#Player info (43)|vehicle var43]].
    6 KB (856 words) - 19:45, 3 May 2024
  • ...ing them before the first building sprite, they will have no bounding box, as if they would use the 'bounding box' of the ground tile. Multiple childspri ...ruction_state);</code> to use the construction state to select the sprite (as is the default). If the spriteset has labels defined, you can use these lab
    14 KB (2,107 words) - 18:27, 2 October 2023
  • | Industry as a whole | Industry (same as above)
    10 KB (1,494 words) - 07:30, 10 September 2023
  • The data looks as follows: The size of <varadjust> depends on <type> as well as the adjustments to be performed and must always provide an AND mask. For <t
    13 KB (1,919 words) - 17:57, 10 September 2023
  • The data looks as follows:
    1 KB (178 words) - 18:15, 6 August 2011

View (previous 100 | next 100) (20 | 50 | 100 | 250 | 500)