We are currently performing an upgrade to our software. This upgrade will bring MediaWiki from version 1.31 to 1.33. While the upgrade is being performed on your wiki it will be in read-only mode. For more information check here.

Talk:Eternia Crystal Stand

From Terraria Wiki
Jump to: navigation, search

Reverse engineering the Eternia Crystal Stand checks[edit source]

From a look at the decompiled code, the following algorithm is used to place the portals. The algorithm starts at the base of the crystal stand, horizontally level with the point clicked (not necessarily the centre of the crystal stand) and runs once in each horizontal direction: east and west.

It should be noted that platforms, open doors or trap doors and inactive blocks do not count as solid. Ice blocks created by the Ice Rod do count as solid, and will disappear as normal after the event starts.

  1. Step down up to 4 tiles, or until a tile with solid ground below it is reached.
  2. Repeat the following up to 120 times:
    1. If the current tile is solid, step up at most three tiles until we reach a non-solid tile.
    2. If the tile below the current tile is non-solid, step down one tile.
    3. If the tile below the current tile is still non-solid, and there is no solid tile up to 6 tiles below it, end the loop.
    4. If the current tile is solid or there is a solid tile within 9 tiles above the current tile, end the loop.
    5. Step across one tile.
  3. When the loop ends, if it was stopped by tiles in the way or a too-deep drop, the current tile will be horizontally level with the obstruction or above the drop, so step back one tile.

The algorithm is run in the east and west directions, and the point clicked is a valid starting point if at least 60 complete iterations of the loop were made in each direction. Each portal can be created at least 60 tiles, but less than 120 tiles horizontally away from the starting point.

I would like other opinions on whether this description is clear and understandable enough to add to the page.

Screenshots[edit source]

The screenshots in this section were created by enabling debug code that is present in the game, but never normally run.

  • The large blue dot shows the starting point of the loop.
  • Red dots appear when the game determines that the current tile is free of obstructions and the loop can continue. They show the current tile and the 10-tile volume checked for obstructions.
  • Blue dots indicate drops checked by step 2.3.
  • Green dots indicate the current tile after each iteration of the loop.
  • White dots indicate the two end points where the portals would appear.

- Andrio Celos (talk) 05:44, 17 January 2017 (UTC)