Add NewGRF object properties to set viewport map mode/smallmap tile type
This commit is contained in:
@@ -1895,6 +1895,7 @@
|
||||
<li>m7: animation counter</li>
|
||||
<li style="color: blue">m4 bits 7..5: update counter (for objects using land ground sprites), incremented on every periodic processing.<BR>
|
||||
For snow and desert, these bits are not used, tile is updated on every periodic processing.</li>
|
||||
<li style="color: blue">m4 bit 4: object type has viewport map colour/type override.</li>
|
||||
<li style="color: blue">m4 bits 3..2: ground type (for objects using land ground sprites):
|
||||
<table style="color: blue">
|
||||
<tr>
|
||||
|
@@ -329,7 +329,7 @@ the array so you can quickly see what is used and what is not.
|
||||
<td class="bits"><span class="free">O</span><span class="used" title="Water class">XX</span> <span class="used" title="Owner">XXXXX</span></td>
|
||||
<td class="bits"><span class="pool" title="Object index on pool (m2 + m5)">XXXX XXXX XXXX XXXX</span></td>
|
||||
<td class="bits"><span class="used" title="Random bits">XXXX XXXX</span></td>
|
||||
<td class="bits"><span class="patch" title="Ground update counter">PPP</span><span class="free">O</span> <span class="patch" title="Ground type: grass/bare, snow/desert, shore">PP</span> <span class="patch" title="Ground density">PP</span></td>
|
||||
<td class="bits"><span class="patch" title="Ground update counter">PPP</span> <span class="patch" title="Viewport map override">P</span> <span class="patch" title="Ground type: grass/bare, snow/desert, shore">PP</span> <span class="patch" title="Ground density">PP</span></td>
|
||||
<td class="bits"><span class="pool" title="Object index on pool (m2 + m5)">XXXX XXXX</span></td>
|
||||
<td class="bits"><span class="free">OOOO OO</span><span class="patch" title="Foundation type">PP</span> </td>
|
||||
<td class="bits"><span class="used" title="Animation counter">XXXX XXXX</span></td>
|
||||
|
@@ -161,6 +161,55 @@
|
||||
Flood resistance is always enabled for objects which can be built on water.<br />
|
||||
This property can be used to enable flood resistance without enabling the object to be built on water.
|
||||
</td></tr>
|
||||
<tr><td>map_tile_type</td><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_XXX</td><td>
|
||||
Set tile type used for display in viewport map mode and the small-map window.<br />
|
||||
The value should be one of:
|
||||
<table>
|
||||
<tr><th>Value</th><th>Meaning</th><th>Notes</th></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_DEFAULT</td><td>Default object</td><td></td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_CLEAR</td><td>Clear/bare dirt</td><td>If use_land_ground is enabled, the underlying ground type will be used instead</td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_GRASS</td><td>Grass</td><td></td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_ROUGH</td><td>Rough ground</td><td></td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_ROCKS</td><td>Rocky ground</td><td></td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_FIELDS</td><td>Farm fields</td><td>The specific type of field can be set using map_tile_subtype</td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_SNOW</td><td>Snow</td><td></td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_DESERT</td><td>Desert</td><td></td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_TREES</td><td>Trees</td><td>The specific tree count and ground type/density can be set using map_tile_subtype</td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_HOUSE</td><td>House</td><td></td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_WATER</td><td>Water</td><td></td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td>map_tile_subtype</td><td>0 .. 65535</td><td>
|
||||
<p>This can be used to further refine the type set in map_tile_type.</p>
|
||||
<p>Farm fields:
|
||||
<table>
|
||||
<tr><th>Bit</th><th>Meaning</th></tr>
|
||||
<tr><td>0 - 2</td><td>
|
||||
Which field type to use
|
||||
</td></tr>
|
||||
</table></p>
|
||||
<p>Trees:
|
||||
<table>
|
||||
<tr><th>Bit</th><th>Meaning</th></tr>
|
||||
<tr><td>0 - 3</td><td>
|
||||
Tree ground type
|
||||
<table>
|
||||
<tr><th>Value</th><th>Meaning</th></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_TREE_GROUND_GRASS</td><td>Grass</td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_TREE_GROUND_ROUGH</td><td>Rough ground</td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_TREE_GROUND_SNOW_DESERT</td><td>Snow/desert</td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_TREE_GROUND_SHORE</td><td>Shore</td></tr>
|
||||
<tr><td>OBJECT_VIEWPORT_MAP_TILE_TYPE_TREE_GROUND_ROUGH_SNOW</td><td>Rough snow</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td>4 - 7</td><td>
|
||||
Tree ground density (clamped to: 0 - 3)
|
||||
</td></tr>
|
||||
<tr><td>8 - 11</td><td>
|
||||
Number of trees on the tile (clamped to: 1 - 4)
|
||||
</td></tr>
|
||||
</table></p>
|
||||
</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>
|
||||
|
@@ -413,6 +413,56 @@
|
||||
This property can be used to enable flood resistance without enabling the object to be built on water.<br />
|
||||
The property length is 1 byte. 0 is disabled (default). 1 is enabled.</p>
|
||||
<p>This is indicated by the feature name: <font face="monospace">action0_object_flood_resistant</font>, version 1</p>
|
||||
<h4 id="object_viewport_map_tile_type">Set tile type used for display in viewport map mode and the small-map window (mappable property: object_viewport_map_tile_type)</h4>
|
||||
<p>This property sets how object tiles are displayed in viewport map mode and the small-map window.<br />
|
||||
The property length is 1 byte.</p>
|
||||
<table>
|
||||
<tr><th>Value</th><th>Meaning</th><th>Notes</th></tr>
|
||||
<tr><td>00</td><td>Default object</td><td></td></tr>
|
||||
<tr><td>01</td><td>Clear/bare dirt</td><td>If object_use_land_ground is enabled, the underlying ground type will be used instead</td></tr>
|
||||
<tr><td>02</td><td>Grass</td><td></td></tr>
|
||||
<tr><td>03</td><td>Rough ground</td><td></td></tr>
|
||||
<tr><td>04</td><td>Rocky ground</td><td></td></tr>
|
||||
<tr><td>05</td><td>Farm fields</td><td>The specific type of field can be set using object_viewport_map_tile_subtype</td></tr>
|
||||
<tr><td>06</td><td>Snow</td><td></td></tr>
|
||||
<tr><td>07</td><td>Desert</td><td></td></tr>
|
||||
<tr><td>08</td><td>Trees</td><td>The specific tree count and ground type/density can be set using object_viewport_map_tile_subtype</td></tr>
|
||||
<tr><td>09</td><td>House</td><td></td></tr>
|
||||
<tr><td>0A</td><td>Water</td><td></td></tr>
|
||||
</table></p>
|
||||
<p>This is indicated by the feature name: <font face="monospace">action0_object_viewport_map_tile_type</font>, version 1</p>
|
||||
<h4 id="object_viewport_map_tile_subtype">Set tile sub-type used for display in viewport map mode and the small-map window (mappable property: object_viewport_map_tile_subtype)</h4>
|
||||
<p>This property can be used to further refine the type set in object_viewport_map_tile_type.<br />
|
||||
The property length is 2 bytes.</p>
|
||||
<p>Farm fields:
|
||||
<table>
|
||||
<tr><th>Bit</th><th>Value</th><th>Meaning</th></tr>
|
||||
<tr><td>0 - 2</td><td>0 - 7</td><td>
|
||||
Which field type to use
|
||||
</td></tr>
|
||||
</table></p>
|
||||
<p>Trees:
|
||||
<table>
|
||||
<tr><th>Bit</th><th>Meaning</th></tr>
|
||||
<tr><td>0 - 3</td><td>
|
||||
Tree ground type
|
||||
<table>
|
||||
<tr><th>Value</th><th>Meaning</th></tr>
|
||||
<tr><td>0</td><td>Grass</td></tr>
|
||||
<tr><td>1</td><td>Rough ground</td></tr>
|
||||
<tr><td>2</td><td>Snow/desert</td></tr>
|
||||
<tr><td>3</td><td>Shore</td></tr>
|
||||
<tr><td>4</td><td>Rough snow</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td>4 - 7</td><td>
|
||||
Tree ground density (clamped to: 0 - 3)
|
||||
</td></tr>
|
||||
<tr><td>8 - 11</td><td>
|
||||
Number of trees on the tile (clamped to: 1 - 4)
|
||||
</td></tr>
|
||||
</table></p>
|
||||
<p>This is indicated by the feature name: <font face="monospace">action0_object_viewport_map_tile_type</font>, version 1</p>
|
||||
<br />
|
||||
<h3 id="variable-mapping">Action 14 - Variable Mapping for Variational Action 2</h3>
|
||||
<p>See <a href="https://newgrf-specs.tt-wiki.net/wiki/Action14">Action 14 Specification</a> and <a href="https://newgrf-specs.tt-wiki.net/wiki/VariationalAction2">Variational Action 2 Specification</a> for background information.</p>
|
||||
|
Reference in New Issue
Block a user