Pyramid
The Pyramid is a Desert structure composed of Sandstone Bricks. The bulk of it is buried underground, with its tip sometimes visible from the Desert surface. It contains a single zigzagging tunnel leading downwards, with a treasure room in its center. The room contains unique loot and is furnished with unique decorative banners and a variety of Pots and Coin Stashes.
Pyramids are rare structures and will not appear in every world. They are slightly more common in drunk worlds. Celebrationmk10 and Get fixed boi worlds always feature a Pyramid as the entrance to the Underground Desert.
Contents
Notes
- The Pots that generate in Pyramids have the highest chance to spawn a Coin Portal out of every other Pot in the game, with a 1/125 (0.8%) chance of spawning one.
- The lowest possible altitude of the tip of a Pyramid is 4' (on the Depth Meter).
- The tip of a Pyramid is normally buried 13–19 blocks in the sand, although it can be lower or higher than that if the main Desert with the Underground Desert or an Oasis happens to be generated in the vicinity of a Pyramid. In certain cases, it is even possible for the Pyramid to slightly protrude from the sand.
Generation
Below are the details about the creation of Pyramids during world generation.[1]
Pyramids can only be generated in Dunes biomes, smaller patches of Desert that do not feature the Underground Desert. The chance that a Pyramid generation attempt occurs in a Dunes biome is 4/5 (80%), but since the attempt may fail (see below), the actual chance of a Dunes biome containing a Pyramid is lower. Only one Pyramid can be generated in a Dunes biome at most, and as the number of Dunes in a world is limited (depending on world size), the maximum possible number of Pyramids is limited accordingly:
| World size | Dunes | Pyramids (max.) |
|---|---|---|
| Small | 1–2 | 2 |
| Medium | 1–3 | 3 |
| Large | 2–4 | 4 |
The main Desert (with the Underground Desert) is generated after the Dunes biomes but before the Pyramids. As a result, it is possible that the main Desert and Underground Desert are placed in the same location as an existing Dunes biome ("overwriting" it), in which case a Pyramid may be generated in the main Desert and possibly the Underground Desert. The same applies to Oases, which are generated after the Pyramids.
Secret world seeds
In drunk worlds, the generation chance per Dunes biome is increased to 100%. Again, this does not mean that every Dunes biome is guaranteed to contain a Pyramid, as the generation attempt may fail.
In Celebrationmk10 and Get fixed boi worlds, an additional Pyramid will always be generated in the main Desert, acting as the entrance to the Underground Desert. This Pyramid does not count into the maximum numbers above.
Technical details
While a Dunes biome is being generated, a potential location for the basis for the tip of a Pyramid is being determined (provided the 4/5 (80%) roll succeeds). The horizontal coordinate of the location is randomly chosen within 200 tiles of the center of the Dunes biome, and the vertical coordinate is 20 tiles below the topmost solid block at the selected horizontal coordinate (checking from the top true world border to the bottom of the world).
After the Dunes biomes and the main Desert have been generated, the previously determined locations are evaluated for the validity of a Pyramid placement.
Each determined potential location must meet the criteria below. Otherwise, the Pyramid will not be generated there.
- It must be more than 300 tiles away from the left or right true world borders.
- This area is normally occupied by the Ocean, where Dunes biomes cannot be generated anyway.
- It must not be located in the short stretch between the Dungeon and the Ocean (i.e., between the Dungeon and the Ocean that is on the same side of the world as the Dungeon), and also has to be at least 630 (small worlds) / 960 (medium) / 1260 (large) tiles horizontally away from the Dungeon.
- For example, if the Dungeon is on the left side of the world, Pyramids can only generate at the right side of the Dungeon, and have to be at least 630 / 960 / 1260 tiles away.
- In Celebrationmk10 and Get fixed boi worlds, the location must not intersect with the Underground Desert.
- It must be at least 220 tiles (110 tiles in drunk worlds) horizontally away from any Pyramids that have been generated before, i.e. this restriction does not apply to the first Pyramid that is generated in the world.
- It must be above the surface line.
If the tile at the potential location is open air, then the spot is moved downward to the first solid block. As before, this block must be above the surface line, and it must also be a pure Sand Block. If so, the tip of the Pyramid will be one to seven tiles above this Sand Block and the rest of it will be generated going down from there. Otherwise, the Pyramid will not be generated.
It can be seen that the constraints of this process make Pyramids significantly rarer than the seemingly high rate of 80% of Dunes biomes. The initially selected random location oftentimes does not fulfill the criteria, causing the generation attempt to fail, and there are no re-rolls for repeated attempts.
Tips
- Since Pyramids are made out of Sandstone Bricks which cannot be corrupted, they can be helpful in blocking the spread of evil biomes or the Hallow.
Trivia
- While the Pyramids' real-life counterparts are located in Egypt, the Cactus plants that grow in the nearby Desert are based on the saguaro, a species native to the Sonoran Desert, a desert spanning large areas of Mexico and the United States of America.
- An experiment generating one hundred small worlds in 1.2.0.3.1 showed an 83% chance of having no Pyramids, a 15% chance of having one Pyramid, and a 2% chance of having two Pyramids.[2] Another experiment generating one hundred small, medium, and large worlds in 1.3.5 showed a 16% chance in small worlds, 42% chance in medium worlds, and 39% chance in large worlds of having one or multiple Pyramids.[3]
- Since then, Pyramids were made more common.
Gallery
- Map view of a large world with four Pyramids in 1.4.4.9.
- A Pyramid generated in the Underground Desert in 1.3.5.3.
History
- Desktop 1.4.4: Pharaoh's set is now less common from Chests, increasing relative frequency of the other drops.
- Desktop 1.4.1: Made 50% more common.
- Desktop 1.4.0.1: World generation overhauled, reducing the maximum amount of Pyramids that can be generated in all world sizes to 2/3/4.
- Desktop 1.2.3: Made slightly more common.
- Desktop 1.2: Introduced.
- Console 1.06: Made slightly more common.
- Console 1.02: Introduced.
- Switch 1.0.711.6: Introduced with changes from Desktop 1.2.3.
- Mobile 1.2.11212: Made slightly more common.
- Mobile 1.2.6508: Introduced.
- 3DS-Release: Introduced.
References
- ↑ Information taken from the
Desktop 1.4.4.9 source code, method GenerateWorld()inTerraria.WorldGen.cs. The related generation passes areDunesandPyramids. Related generation parameters are stored inTerraria.GameContent.WorldBuilding.Configuration.json. - ↑ Terraria world generator statistics - Pastebin.com (archived from the original on 05 Jan 2024, 11:29:59 UTC)
- ↑ Terraria World Generation Experiment (archived from the original on 21 Nov 2025, 22:37:09 UTC)
