Seed

From CrawlWiki
Revision as of 17:50, 6 April 2019 by NormalPerson7 (talk | contribs) (Create article describing game seeds. This could probably be expanded, but this will do as a brief introduction to seeds.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Version 0.23: This article may not be up to date for the latest stable release of Crawl.

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.

Note that it is currently not possible to use a fixed seed or pregenerate the dungeon when playing on Webtiles.

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.

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.

History

  • Prior to 0.23.1 and 0.23.2, seeds were occasionally unstable across different devices and operating systems. Seed stability is still being worked on and further improvements will be included in 0.24.
  • Seeds, along with the ability to pregenerate the dungeon, were added in 0.23.