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 "matmod" such as grass, flowery grass, tilled dirt, sand, ash, etc. In vanilla 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).
Each block in each world has its own dungeonid. Dungeon IDs are unsigned short 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 in Vanilla Starbound
The following table documents the use of dungeon IDs in vanilla Starbound.
|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 all microdungeons that spawn into a world.|
|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 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.|
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-built 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.