Dungeon IDs

From Starbounder - Starbound Wiki
Jump to: navigation, search

In Starbound, every world is made up of a two-dimensional grid of blocks. Each block has a background that may be empty or contain a background tile, and a foreground that may be empty or contain a foreground tile or platform. Unless a block is subject to tile protection, the player may break a tile that exists in the block (subject to tile strength) or place a tile in an empty foreground or background block.

If a tile exists in a block (either foreground or background) it may be decorated by a material mod, sometimes called a matmod, such as grass, flowery grass, tilled dirt, sand, ash, etc. In (unmodded) Starbound, the player is only capable of placing grass, flowery grass, and tilled dirt matmods, but may break any matmod on a non-tile protected block (subject to matmod strength). When damage is applied to a block, the damage is applied first to the matmod, if any exists, and next to the actual tile.

Each block in each world has a dungeonid. Dungeon IDs are integers between 0 and 65535 inclusive. Dungeon IDs are used by the Starbound game engine to control many aspects of game play. Tile protection (whether tiles are shielded) and breathability (whether there is air at a given empty block) are toggled on or off based on dungeon ID. The strength of gravity is altered based on dungeon ID.

Finding Dungeon IDs

Dungeon IDs can be discovered by activating the Admin Command and then activating the debug command. Point the mouse at any block, and the debug display will include the dungeonid for that block.

Dungeon IDs in Starbound

The following table documents the use of dungeon IDs in vanilla Starbound.

Dungeon ID Notes
65535 The default dungeon ID assigned to blocks in a world in the absence of any overriding dungeon ID.
65533 The dungeon ID assigned to every microdungeon that spawns into a world during terrain generation.
65531,65532 The dungeon IDs assigned to any blocks in which any player has added or removed tiles, or added or removed matmods. On personal space stations, the default dungeon (65535, space) and first major dungeon (0, the space station pieces) are tile protected. The interior spaces that players are allowed to edit are set to 65531 and 65532.
65525 Special dungeon ID featuring 0-gravity.
65524 Special dungeon ID featuring 0-gravity and tile protection.
65520 A dungeon ID labeled "FirstMetaDungeonId" in the source code. It's not clear if any dungeons in vanilla actually use this ID, or if it's only used as a flag value against which to test other dungeon IDs.
64519-65519 Dungeon IDs assigned to bounty microdungeons spawned into worlds by the bounty system. These generally spawn with tile protection, but that protection may be disabled when the bounty quest is completed. (Note: Nothing in the code actually enforces the lower bound of 64519 for bounty dungeons, although in practice you will never get close to it.)
0-2 Dungeon IDs assigned to major dungeons spawned into worlds. If the dungeon is Hylotl Underwater City it will spawn with tile protection. All dungeons placed using the placedungeon admin command are assigned the dungeon ID 1.

Dungeon IDs and Monster Spawning

Ground-based monsters will only spawn on top of blocks marked as the default dungeon (65535). Likewise, flying monsters will only spawn into empty air marked as the default dungeon (65535). This is why the only monsters that spawn into microdungeons and major dungeons are the monsters that were explicitly programmed to be in those dungeons. It's also why monsters don't spawn into player-constructed buildings, and why ground-based monsters don't spawn onto tilled ground or other player-modified ground. Note: monsters can still spawn into parts of the default dungeon (65535) next to other dungeons, and then wander into those dungeons.