Seed

From CrawlWiki
Jump to: navigation, search
Version 0.28: This article is up to date for the latest stable release of Dungeon Crawl Stone Soup.

A seed is a 64-bit binary number (equivalent to a decimal number of up to 20 digits) that can be used to repeatedly generate the same dungeon with the same items, monsters, features and vaults, across different games. Every game, whether online or offline, is allocated a game seed which the game uses to generate the start of the Dungeon, and then every subsequent floor the player enters---this game seed is printed at the top of the morgue file. When combined with dungeon pregeneration, a given seed will generate the exact same dungeon for everyone, with the exception of the Abyss and Pandemonium.

Setting a game seed

There are currently two ways to set a game seed before starting a game:

  • Setting the game_seed option in your options file (init.txt), which will cause all games started through the "New Game" button on the main menu to be generated using this seed; and
  • Using the "Choose game seed" button on the main menu, which will bring up a menu allowing you to manually enter a seed. Alternatively, you can press d to use the current date as your seed, or p to paste a seed from the clipboard.

Setting a game seed on its own will ensure that the first floor of the Dungeon is always the same, and likely also most of the rest of the early Dungeon, but, if you visit floors in a different order, whether through shafts, or choosing a different order of branches, the game may diverge rapidly from other games using the same seed. This is because each floor of the dungeon generates only when you first enter that floor.

Note that games generated on different versions of the game might have an entirely different Dungeon, even with the same seed.

Dungeon pregeneration

To ensure the dungeon layout is the same for the entire game, it is necessary to pregenerate the dungeon. This can be done directly from the "Choose game seed" option on the main menu, or through the options file setting pregen_dungeon = true. This will generate the entire dungeon, rather than just the first floor, before the game is started, in a fixed order.

Randomness outside of the game, such as a scroll of acquirement, a god's gifts or the entirety of Xom, is never pre-set. One of them generating an unrand could have potentially minor, but lasting effects on a non-pregenerated Dungeon as a whole.

History

  • Prior to 0.23.1 and 0.23.2, seeds were occasionally unstable across different devices and operating systems. Further improvements to seed stability were included in future versions.
  • Seeds, along with the ability to pregenerate the dungeon, were added in 0.23.