User:Niightblade/sandbox

= Draft Specification: Tiles Of Interest =


 * Feedback needed!


 * The main motivation behind this is to show the tile locations of various buildings' interaction points, especially where they are not obvious or are in a different location than expected from the game's animations.

Tile coordinates
This draft uses the following rules for specifying TOI tile locations, which I propose should be the standard if found to be acceptable:


 * Use numbers, not text. This is for clarity and consistency, and for template/module coding ease.
 * Point-of-origin (x1, y1) is the bottom-left tile. This is where the TOI is for most buildings, and is more or less consistent with left-to-right reading/numbering for most English-speaking locales.
 * Specifying the y axis (row) is optional if the TOI is on the first (bottom) row. This will be the location for most buildings.
 * If a building has multiple TOI and they are all at the same location, a single "catch-all" TOI may be specified. (not 100% sure about this, might complicate coding?)

Example #1, grid (with explicit numbering):

Based on the above rules, most buildings will have their TOI at tile coodinate 1.

Example #2, from an image:



In this case the Dupe TOI is 2. This image is also a good example of a misleading animation.

(more examples here)

Statistical summary
From this reddit post :

There are:
 * 8 one-tile-wide buildings with a TOI at position 1 that serves one or more functions
 * 16 two-tile-wide buildings with a TOI at position 1 that serves one or more functions
 * 5 three-tile-wide buildings with a TOI at position 2 that serves one or more functions
 * 9 four-tile-wide buildings with a TOI at position 2 that serves one or more functions


 * 3 buildings have multiple Dupe TOI.


 * 13 buildings do not fit into any of the categories above


 * 34 buildings have no data as yet


 * Most, but not all, TOI are rotated/flipped with their building as expected.

TOI types / functions
Preliminary type names & type ID numbers.

Annotations
(Not yet finalized)
 * Squares coloured by TOI type?
 * Just text maybe? Could use first character of each type name (D/I/O).  An asterisk could mean "all types". 
 * Probably helpful to superimpose a grid.

(mock-up some examples here)

Template/module considerations

 * Multiple superimposition layers.
 * Image, layer, and annotation scaling.
 * Handle tile-based coordinates.
 * Existing building images (from the GUI) are not scaled consistently.
 * Multiple, potentially overlapping, TOI annotations.
 * Some buildings can be flipped/rotated.
 * Some buildings are slightly bigger than their tile size would indicate.

Specific building Remarks

 * If the Polymer Press is flipped, its TOI does not mirror its position as expected, and is also outside the building's 3-tile footprint (TOI 1 becomes 4!). (needs verification in-game)
 * The Printing Pod's output TOI is between its middle two tiles (2 and 3). Probably best to handle it as a one-off?  Should note that pressure plates won't trigger.   (needs verification in-game)

Test cases
(WIP)