Living Tree

From Terraria Wiki
Jump to navigation Jump to search
BiomeBannerLivingTree.png
Map view of three Living Trees, two of which are interconnected with tunnels.

Living Trees are large tree-shaped Forest structures. Unlike regular trees, Living Trees are constructed from solid Living Wood and Leaf Blocks, rather than being background objects that characters can pass through. Living Trees often have a tunnel that leads down to a treasure room containing Living Tree-themed furniture and a Living Wood Chest.

On the Desktop version Desktop version, Console version Console version, and Mobile version Mobile version, Living Trees have larger and rounder tops and can generate in groups, having horizontal tunnels that connect to other trees or lead outside of them. Chests can be generated inside these tunnels. The treasure room will be located underneath one of the trees, and contain a Living Loom instead of a Living Wood Table. The entrances to their internal tunnels are enclosed, requiring a pickaxe to enter them. Gnomes can also be found more often within Living Trees.

Contents

Characters
Common:
  • GnomeGnome(Desktop, Console and Mobile versions)
Unique Drops
From terrain:
Unique Treasures
From Chests:

Notes

Generation

Desktop versionConsole versionMobile version
Desktop/Console/Mobile-Only Content: This section's information applies only to the Desktop, Console, and Mobile versions of Terraria.

Below are details about the creation of Living Trees during world generation.[2]

Living Trees are generated in groups. Small worlds can have a maximum of 2 groups, medium worlds a maximum of 3 groups, and large worlds a maximum of 4 groups. In drunk worlds, Celebrationmk10 worlds, and Don't dig up worlds, more groups of Living Trees can be generated.

Each group of Living Trees has a "main" tree, with possible "secondary" Living Trees generated beside it. Main trees will have the treasure room, while secondary trees only generate horizontal tunnels. Each main tree can have 3 secondary trees on each side at most, so the maximum total number of Living Trees in a group is 7. In drunk worlds, Celebrationmk10 worlds, and Don't dig up worlds, more secondary Living Trees can be generated.

Technical details

When generating the world, the game will first determine the number of generation attempts of Living Tree groups; this number depends on world size and secret world seeds. The game will first set the default amount; if the default amount is 0, there is a 1/2 (50%) chance for it to be increased by 1. Then the game checks for activated secret world seeds, and increases the attempt number based on world size.

World size Attempts
Default Secret world seeds activated[a]
Drunk world Celebrationmk10 Don't dig up
Small 0–2 +2 +3 +2
Medium 0–3 +3 +4 +3
Large 0–4 +4 +6 +4
  • Examples of generation attempt amounts:
    • A small world can have 0–2 attempts.
    • A large Celebrationmk10 world can have 6–10 attempts.
    • A large Get fixed boi world can have 4–8 attempts.

Then, the game will pick a location for each Living Tree. The horizontal coordinate is randomly chosen but will never be in either of the Ocean biomes.

  • In Celebrationmk10 worlds, the horizontal coordinate is randomly chosen from the central 70% of the world. In other words, no Living Tree will be generated in the outer 15% on each side.
    • If this horizontal coordinate is less than 200 tiles from the center of the world, the attempt is consumed without generating Living Trees.

To determine the vertical coordinates of each Living Tree, the game starts at the top true world border at a tree's horizontal coordinate and moves down, ending at the surface layer.

  • After reaching the first Dirt Block within this range, the tile above the Dirt Block is selected as the coordinate of generation.
    • If this chosen tile meets any of the conditions below, the attempt is consumed without generating Living Trees:
      • The tile is less than 150 tiles away from the top true world border.
      • The tile is less than 50 tiles away from Mountain Caves.
      • There are any of the following tiles within a 100×100-tile square centered on the tile:[b]

Afterwards, the game will generate a Living Tree (the "main" Living Tree of a group) at this coordinate, and attempt to generate some "secondary" Living Trees beside it. The number of attempts on each side can be altered by activated secret world seeds.

Attempts
Default Secret world seeds activated[a]
Drunk world Celebrationmk10 Don't dig up
0–3 + (2–4) + (2–4) + (1–5)
  • Examples of "secondary" Living Tree generation attempt numbers:
    • 0–3 attempts on each side by default, resulting in 7 Living Trees in a group at most (1 + 3 + 3).
    • A Don't dig up world can have 0–8 attempts on each side, resulting in 17 Living Trees in a group at most (1 + 8 + 8).
    • A Get fixed boi world can have 0–7 attempts on each side, resulting in 15 Living Trees in a group at most (1 + 7 + 7).
  • Note that the numbers of attempts on each side are not necessarily equal. For example, it is possible for 2 attempts to be performed on the left side and 1 attempt to be performed on the right side.

Secondary trees to the left of the main tree are generated first, then trees to the right of the main tree. On each side, secondary trees are generated from near to far. Similar to the main Living Tree, the generation of secondary Living Trees also use coordinates.

  • The initial horizontal coordinate of the first secondary tree to be generated on each side start at the horizontal coordinate of the main tree.
  • Then, for each secondary tree on the side, perform the following actions:
    • Get the horizontal coordinate of the tree by subtracting/adding (determined by which side of the main tree the generation is performing at) a random value between 13 and 30 to the current horizontal coordinate.
      • If this horizontal coordinate is less than 200 tiles from the center of the world, the attempt is consumed without generating Living Trees.
    • Set the vertical coordinate to the vertical coordinate of the main tree. If the new coordinate is a solid tile, move upwards until an unoccupied tile is found; if the new coordinate is unoccupied, move downwards until a solid tile is found, then set the coordinate to the tile above the solid tile. This is the final tile the secondary Living Tree is generated at.
      • Similar to the main Living Tree, if there are any of the following tiles within a 100×100-tile square centered on the tile,[b] the attempt is consumed without generating Living Trees:

Tips

  • (Old-gen console and 3DS versions) The treasure rooms in Living Trees can be used for NPC housing by simply adding a light source.
  • During Hardmode, Living Trees act as natural barriers against the evil biomes' and Hallow's increased rate of spreading, provided that the area beneath the tree is cleared.
  • Living Trees can serve as high ground when fighting The Destroyer.

Trivia

Gallery

History

  • Desktop 1.4.0.1:
    • Can now generate in groups of 2–7, with horizontal tunnels that can connect the trees of a group.
      • Some trees can still stand alone like before.
    • Gnomes now occasionally spawn in Living Trees.
    • Living Trees' interior entrances are blocked off with Living Wood.
    • The tops of Living Trees are rounder.
    • The walls of the rooms in Living Trees are no longer considered valid for NPC housing.
    • The treasure room now contains a placed Living Loom rather than a Living Wood Table.
  • Desktop 1.3.0.1: Living Trees now spawn with Living Wood Platforms instead of Wood Platforms.

References

  1. https://forums.terraria.org/index.php?threads/tool-the-terraria-seed-project.69351/
  2. Information taken from the Desktop version Desktop 1.4.4.9 source code, method GenerateWorld() in Terraria.WorldGen.cs. The related generation pass is Living Trees.
  1. 1.0 1.1 Get fixed boi worlds are considered as activating the drunk world seed.
  2. 2.0 2.1 Range in all directions from the tile: 50 tiles up, 50 tiles to the left, 49 tiles down, 49 tiles to the right.