Your comments

It has worked pretty well since applying that bit of code for the stairs and I have recently been using BSP mapping for a more dungeon look.


I think some future options to "force" ladders or stairs to be in the map would be great as right now it's hit and miss for the stairs and in my game I would prefer it to always have stairs.


Lastly, I couldn't figure out a "nicer" way to fix the ladders blocking doorways issue. I decided to create a collision checker on start and remove all/any doors next to the Ladder in all 4 directions. Ideally, you would do this in your code ;)

I think I found a bug in the MapInterpreter.cs file where you place the Stairs. It seems that the code is looking at the currentMap twice for both floors when it should look at the belowMap instead?


around line 700:

if (!allowStairsCloseToDoors && (currentMap.HasAdjacentDoor(cell_here.location) || currentMap.HasAdjacentDoor(cell_next.location))) continue;


should be:

if (!allowStairsCloseToDoors && (belowMap.HasAdjacentDoor(cell_here.location) || belowMap.HasAdjacentDoor(cell_next.location))) continue;


It seems to have fixed the problem about Stairs sometimes placed in the way of doors but you will know better (i'm not really a coder) :)

Thanks, hope you can find out the problem.


Here is another seed with slightly closer settings to what i use in my own maps to help.


I used the sci fi prefab (turned off rocks and perimeter) to demonstrate it.



This is the extreme case but does show that the ladder can appear in the wrong place. The disconnected maps is another thing but wasn't causing my own maps any problems yet :)


Hope this helps

That is correct, there is no tile above the ladder variation 1 or a door. It tends to happen when sparseness is used.

I managed to reduce (eliminate?) the stair problem by making the stairs shorter. I haven't had this bug yet!


However, related to this same issue, the Ladder variation 1 that uses one square at times will place the ladder in an area where the upper floor has no map generated. I think it may be related to sparseness setting?


Also, the ladder at times will generate in front of a door making it a problem (I can only think of putting the stair in the middle of the square it uses but this is not ideal).


Any pointers?


Thanks

Small update that it eventually did the same with 5x5 room sizes. I was using 5 rooms max and 3 minimum when it happened.


You will notice at the top (yellow) the stairs (sci fi prefab) going out of bounds so you cannot go up these stairs

Hi

I have tried it on both Recursive and Hunt and Kill with Digging Virtual Map. Happens on both if room size is set to 5x4 and under. So far have not seen it happen when set to 5x5 yet.