Documentation: NFO/NML docs on object additions

pull/363/head
Jonathan G Rennison 2 years ago
parent 15955bc279
commit 22e72b1ecd

@ -24,6 +24,8 @@
<p>All of the non-standard features listed below will automatically emit suitable feature tests, conditionals, etc. such that NewGRFs which use these features will work correctly
on OpenTTD versions which do not support these features, including standard trunk OpenTTD and older/other patchpack versions.</p>
<p>All of the non-standard variables listed below will return 0 on OpenTTD versions which do not support these features/variables, including standard trunk OpenTTD and older/other patchpack versions.</p>
<h3><a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Builtin_functions">Builtin functions</a></h3>
<p>
@ -151,6 +153,7 @@
<tr><th>Value</th><th>Meaning</th></tr>
<tr><td>OBJECT_EF_FLAG_ADJUST_Z</td><td>Change z-position for the building sprite to the height of the edge</td></tr>
<tr><td>OBJECT_EF_FLAG_FOUNDATION_LOWER</td><td>If the height of the edge is lower than the maximum height of the tile, build a foundation</td></tr>
<tr><td>OBJECT_EF_FLAG_INCLINE_FOUNDATION</td><td>Use inclined instead of a flat foundations where possible. (Slopes with one corner raised where the height of the edge is at the maximum height of the tile).</td></tr>
</table>
</td></tr>
<tr><td>flood_resistant</td><td>0 or 1</td><td>
@ -159,6 +162,19 @@
This property can be used to enable flood resistance without enabling the object to be built on water.
</td></tr>
</table>
<h3><a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Objects#Object_variables">Object variables</a></h3>
<p>Variables in the table below which are not supported by the version of OpenTTD being used return a value of 0.</p>
<table>
<tr><th>Variable</th><th>Value range</th><th>Comment</th></tr>
<tr><td>foundation_tile_slope</td><td><a href="https://newgrf-specs.tt-wiki.net/wiki/NML:List_of_tile_slopes">SLOPE_XXX</a></td><td>
Slope of the tile after any foundation has been applied.
</td></tr>
<tr><td>foundation_change_tile_slope</td><td><a href="https://newgrf-specs.tt-wiki.net/wiki/NML:List_of_tile_slopes">SLOPE_XXX</a></td><td>
Slope of the tile after any foundation has been applied xor the slope of the underlying tile.<br />
If this variable is non-zero a foundation is present.<br />
This is useful for xoring with the tile_slope variable, because if this variable is unavailable then the result is still the underlying tile slope.
</td></tr>
</table>
<h3><a href="https://newgrf-specs.tt-wiki.net/wiki/NML:Replace_new_sprites">Replace new sprites</a></h3>
<table>
<tr><th>Type</th><th>Number of sprites </th><th>Comment</th></tr>

@ -392,6 +392,8 @@
</td></tr>
<tr><td>2</td><td>4</td><td>Change z-position for the building sprite to the height of the edge</td></tr>
<tr><td>3</td><td>8</td><td>If the height of the edge is lower than the maximum height of the tile, build a foundation</td></tr>
<tr><td>4</td><td>10</td><td>Use inclined instead of a flat foundations where possible. (Slopes with one corner raised where the height of the edge is at the maximum height of the tile).<br />
Support for this bit is indicated by the feature name: <font face="monospace">action0_object_flood_resistant</font>, version 2.</td></tr>
</table>
</p>
<p>This is indicated by the feature name: <font face="monospace">action0_object_edge_foundation_mode</font>, version 1</p>
@ -465,6 +467,16 @@
<h4 id="varaction2_station_var42">Track type in purchase list (42)</h4>
<p>This is indicated by the feature name: <font face="monospace">varaction2_station_var42</font>, version 1</p>
<br />
<h3 id="varaction2_object"><a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2/Objects">Variational Action 2 - Objects</a></h3>
<h4 id="object_foundation_tile_slope">Tile slope after foundation applied (mappable variable: object_foundation_tile_slope)</h4>
<p>This has the same format as bits 8-12 of object variable 41.</p>
<p>This is indicated by the feature name: <font face="monospace">action0_object_edge_foundation_mode</font>, version 2</p>
<h4 id="object_foundation_change_tile_slope">Tile slope after foundation applied xor underlying tile slope (mappable variable: object_foundation_change_tile_slope)</h4>
<p>This has the same format as bits 8-12 of object variable 41, but has bits set only where the foundation slope differs from the underlying tile slope.<br />
If this variable is non-zero a foundation is present.<br />
This is useful for xoring with bits 8-12 of variable 41, because if this variable is unavailable then the result is still the underlying tile slope.</p>
<p>This is indicated by the feature name: <font face="monospace">action0_object_edge_foundation_mode</font>, version 2</p>
<br />
<br />
<h3 id="a3signals"><a href="https://newgrf-specs.tt-wiki.net/wiki/Action3">Action 3 - Signals (Feature 0E)</a></h3>
<p>Note that Action 3 feature 0E is not supported (does nothing) in standard OpenTTD.</p>

Loading…
Cancel
Save