Difference between revisions of "Seed"
m |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
* 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 <code>d</code> to use the current date as your seed, or <code>p</code> to paste a seed from the clipboard. | * 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 <code>d</code> to use the current date as your seed, or <code>p</code> 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 [[shaft]]s, or choosing a different order of [[branch]]es, 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. | + | 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 [[shaft]]s, or choosing a different order of [[branch]]es, 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. | Note that games generated on different versions of the game might have an entirely different Dungeon, even with the same seed. | ||
Line 14: | Line 14: | ||
==Dungeon pregeneration== | ==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 <code>pregen_dungeon = true</code>. This will generate the entire dungeon, rather than just the first floor, before the game is started, in a fixed order. | 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 <code>pregen_dungeon = true</code>. 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 [[gift]]s 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== | ==History== | ||
− | * Prior to [[0.23]].1 and [[0.23]].2, seeds were occasionally unstable across different devices and operating systems. | + | * 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]]. | * Seeds, along with the ability to pregenerate the dungeon, were added in [[0.23]]. |
Latest revision as of 13:45, 17 June 2022
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, orp
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.