Auto-Tiling

From wiki
Revision as of 05:02, 27 August 2017 by DeamonHunter (Talk | contribs) (Initial commit.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page is not complete. This is only here in order to store "autoTileInfo" for now. Will be written later.


AutoTileInfo is always a list of blobs. These blobs contain information about what block to override or what block to look for in what place. Each blob in the list is constructed like so:

"autoTileInfo" : [
  {
    "lookFromOverride" : "",
    "DirectionsToLookIn" : [
      {
        "direction" : "",
        "secondDirection" : "",
        "tilesToLookFor" : [],
        "tileCategoriesToLookFor" : [],
        "rotationToLookFor": 0
      }
    ],
    "results" : [
      {
        "tileToPlace" : "",
        "direction" : "",
        "secondDirection" : "",
        "rotation" : ""
      }
    ],
    "onTileRemoval" : false
}


"Common Terms"

"direction"

Valid options (String): up, down, front, back, left, right, none

Forces the object to go look in this direction. So giving this up, makes the tile look one tile upwards.


"secondDirection"

Valid options (String): up, down, front, back, left, right, none

Forces the object to go look in this direction after heading in "direction". So giving this up, makes the tile look one tile upwards. Therefore if both "direction" and "secondDirection" is up, then it will look for two tiles upwards.


"lookFromOverride"

Valid options (String): up, down, front, back, left, right, none

Sets the initial spot to be in the specified direction, rather than the tile itself.


"onTileRemoval"

Valid options (Bool): Either true or false

Updates the tiles on removing the tile?


"directionsToLookIn"

This is a list of directions that will be looked in to see if objects are in certain blocks first. Uses direction and secondDirection to navigate to the tile.


"tilesToLookFor"

Valid options (String): Any valid code that points towards a tile or tileObject.

This is a list of tiles it will look for. If it contains any of these then it will succeed and cause "results" to run.


"tileCategoriesToLookFor"

Valid options (String): Any valid string that points that is a category in tile or tileObject.

This is a list of categories inside of the tile's categories that it will look for. If it contains any of these then it will succeed and cause "results" to run.


"rotation"

Valid options (Int): A number between 0-3 representing rotation

If it finds the right tile, then it will then search for what direction it is in, if this is present. This is relative to the tile that is being placed. If this succeeds after it has found a tile, then results will run. If it fails, results won't run.


"results"

This is a list of resulting objects that will be placed if it succeeds in looking for tiles. This uses direction and secondDirection in order to specify where the tile is placed.

"tileToPlace"

Valid options (String): Any valid string that points that is a category in tile or tileObject.

This points to the specific tile or tileObject to be placed when succeeding.

"rotation"

Valid options (Int): A number between 0-3 representing rotation

This is the rotation that the tile will be placed in. This is relative to the tile being placed.