I have set up a
fork on github, branch "seeded_crawl".
I tried to implement seeding using path of least resistance. Also, I have done minimal testing. Here's what I've done so far.
(a) Increase number of RNGs to 100000.
(b) Each floor uses a separate RNG. Index is you.where_are_you * 100 + you.depth. I added a flag generating_level and modified get_uint32 and get_uint64 to return numbers from the indexed RNG if the flag is true.
(c) Pregenerated floors at the start of the game (only partially done). I did this by using the wizmode function _wizard_go_to_level and running it for D:2, D:3 and so on. If it broke some things, I simply special cased them. It kind of works.
Here's what seems to work (again, I have done minimal testing):
Items, shops, uniques, portal vaults are fixed at the start of the game. Boris is a special case which I'm ignoring.
Issues:
(a) Since portal vaults depend on the order in which you visit the floors, there should be a "canonical ordering" of visits. I plan to use the following (only partially implemented):
D -> Lair -> D -> Orc -> D15 -> 2 lair branches one after another -> vaults 1-4 -> Depths 1-5 -> Elf -> vaults 5 -> slime -> crypt -> tomb -> Zot.
(b) Portal timers (like ice cave) probably start when one generates the level, which means the start of the game. This means they will probably be unreachable in time. If someone can tell me which files I should be looking at to fix this issue, it will be great.
(c) Dungeon overview/travel shows empty floors which have been already pre-generated, but not visited yet. I'll probably add a flag "visited" to each floor to make it clear that the player hasn't actually seen the level yet. Again, someone who knows the code can probably tell me which files I should be looking at.
(d) Haven't decided how to handle Pan, Abyss and Hell, but probably shouldn't be too different.