Opened 13 years ago

Closed 13 years ago

Last modified 11 years ago

#271 closed bug (fixed (in master))

Stairs rarely generated under player

Reported by: takkaria Owned by:
Milestone: 3.0.8 Keywords: dungeon


The new dungeon generation code doesn't always generate connected stairs even when the 'don't generate connected stairs' option is off. It seems to be random, with some bias towards no stairs or /down/ stairs at your square when you go downstairs from, e.g., town.

Attachments (1)

crud (45.6 KB) - added by anonymous 13 years ago.

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by anonymous

comment:1 follow-up: Changed 13 years ago by ChodTheWacko

attached sample save, just after going down the stair.

This bug may be getting worse - with the 8-5-2007 build,
i've gone down 5 sets of stairs, and only once has there been an connected up-stair!

comment:2 in reply to: ↑ 1 Changed 13 years ago by Big Al

Replying to ChodTheWacko:

This bug may be getting worse - with the 8-5-2007 build,
i've gone down 5 sets of stairs, and only once has there been an connected up-stair!

I'm getting similar statistics - it seems at most one quarter of the time (when going down) a stair appears.

Also, for the past three out of four times when I recalled (?WoR) down into the dungeon, I appeared on a stair. Could be a really bad case of the RNG, but it's not very likely. Looks like it's not generating stairs when it should be and generating stairs when it shouldn't be, with random variation.

comment:3 Changed 13 years ago by ziz

  • Resolution set to fixed
  • Status changed from new to closed

Two distinct bugs were acting here (assuming generate connected stairs is on):

First, the dungeon generation code would only guarantee stairs if it could place you on pre-existing stairs, subject to stringent three-adjacent-walls requirements. If it could not, you would always end up on a blank tile.

Second, going up to town then going down would guarantee you were placed on DOWN stairs if you were placed on stairs at all. This is because the create_down_stair flag is set when going up and cleared when placing the player on stairs, but town is a special case which does not call new_player_spot.

Closed by [e89ed91] (SVN r457).

comment:4 Changed 13 years ago by ziz

Brief addendum, with [01f59b9] (SVN r458) -

As per Big Al's comment, WoR and other level teleportation effects were frequently ending up on staircases, particularly up staircases. This behavior has been removed from the dungeon generation, as it was a side effect. If a level teleportation effect wants to provide the option of stairs, it now needs to request them in the same way that going up or down stairs currently do (at the moment, setting create_up_stair or create_down_stair in the pobject).

comment:5 Changed 11 years ago by magnate

  • Keywords dungeon added
  • Milestone changed from 3.2.0 to 3.0.8
Note: See TracTickets for help on using tickets.