Home Forums Dungeon Master – Support Dungeon Failing to Generate

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2075
    Grimshad
    Participant

    I only have 2 room. I just want it to generate a 2×2 dungeon by randomly attaching these 2 rooms in a square. they can be used multiple times.
    Only one connector type exists with 1 room connector. They spawn nothing, both rooms are setup so all connectors use this connector

    When I try to generate i get this:

    Entry Number: 1/29
    Entry Type  : DungeonEvent
    Entry Name  : NewMap
    Description :
    Begin Dungeon generation.
    
    Entry Number: 2/29
    Entry Type  : DungeonEvent
    Entry Name  : NewMap
    Description :
    Generation attempt #1.
    
    Entry Number: 3/29
    Entry Type  : LevelEvent
    Entry Name  : Main
    Description :
    Begin Level generation.
    
    Entry Number: 4/29
    Entry Type  : LevelEvent
    Entry Name  : Main
    Description :
    Generation attempt #1.
    
    Entry Number: 5/29
    Entry Type  : LevelEvent
    Entry Name  : Main
    Description :
    2 Room Candidates found.
    
    Entry Number: 6/29
    Entry Type  : LevelEvent
    Entry Name  : Main
    Description :
    Level is generated using All Random. Starting at random coordinate: [Point:1,0,0].
    
    Entry Number: 7/29
    Entry Type  : DetailCalculation
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    From coordinate [Point:1,0,0] toward direction Left a Any ConnectorType would do because there are no neighbors or level limit.
    
    Entry Number: 8/29
    Entry Type  : DetailCalculation
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    From coordinate [Point:1,0,0] toward direction Right a Wall ConnectorType is needed because coordinate is at level limit.
    
    Entry Number: 9/29
    Entry Type  : DetailCalculation
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    From coordinate [Point:1,0,0] toward direction Up a Any ConnectorType would do because there are no neighbors or level limit.
    
    Entry Number: 10/29
    Entry Type  : DetailCalculation
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    From coordinate [Point:1,0,0] toward direction Down a Wall ConnectorType is needed because coordinate is at level limit.
    
    Entry Number: 11/29
    Entry Type  : DetailCalculation
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    From coordinate [Point:1,0,0] toward direction Forward a Any ConnectorType would do because there are no neighbors or level limit.
    
    Entry Number: 12/29
    Entry Type  : DetailCalculation
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    From coordinate [Point:1,0,0] toward direction Backward a Wall ConnectorType is needed because coordinate is at level limit.
    
    Entry Number: 13/29
    Entry Type  : DetailResult
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    Calculated list of RequiredRoomConnector for Room at Coordinate [Point:1,0,0].
    
    Entry Number: 14/29
    Entry Type  : DetailResult
    Entry Name  : FindMatchingRoomCandidates
    Description :
    Calculated list of MatchingRoomCandidates.
    
    Entry Number: 15/29
    Entry Type  : DetailCalculation
    Entry Name  : FindMatchingRoomCandidates
    Description :
    Room "Floor1" was added to the list of MatchingRoomCandidates with a weight of 10 (this room does not decrease weight with usage).
    
    Entry Number: 16/29
    Entry Type  : DetailCalculation
    Entry Name  : FindMatchingRoomCandidates
    Description :
    Room "Floor2" was added to the list of MatchingRoomCandidates with a weight of 10 (this room does not decrease weight with usage).
    
    Entry Number: 17/29
    Entry Type  : DetailResult
    Entry Name  : Add Room
    Description :
    Room Floor1 was selected to be added in the level. This was room was selected randomly within the full room candidates list because even if the level Main has not reached its minimum room amount (0/4), there are no open room candidates to use.
    
    Entry Number: 18/29
    Entry Type  : DetailResult
    Entry Name  : AddRoom
    Description :
    Room Floor1 selected for AddRoom had rotation [PointRotation:0,0,0] selected randomly for its placement.
    
    Entry Number: 19/29
    Entry Type  : DetailResult
    Entry Name  : AddRoom
    Description :
    Room 1,0,0_Floor1 was instantiated in level Main with rotation [PointRotation:0,0,0].
    
    Entry Number: 20/29
    Entry Type  : LevelEvent
    Entry Name  : Main
    Description :
    Level had its first room(s) added successfully. Level will keep filling itself until it is valid.
    
    Entry Number: 21/29
    Entry Type  : DetailResult
    Entry Name  : ValidateAndFillRoomForDirection
    Description :
    Level Main succeeded to validate room 1,0,0_Floor1 for direction Left. Room is either only has a wall connector for this direction or is at the level limit and has a wall connector.
    
    Entry Number: 22/29
    Entry Type  : DetailResult
    Entry Name  : ValidateAndFillRoomForDirection
    Description :
    Level Main succeeded to validate room 1,0,0_Floor1 for direction Forward. Room is either only has a wall connector for this direction or is at the level limit and has a wall connector.
    
    Entry Number: 23/29
    Entry Type  : DetailResult
    Entry Name  : ValidateAndFillRoomForDirection
    Description :
    Level Main succeeded to validate room 1,0,0_Floor1 for direction Up. Room is either only has a wall connector for this direction or is at the level limit and has a wall connector.
    
    Entry Number: 24/29
    Entry Type  : DetailResult
    Entry Name  : ValidateAndFillRoomForDirection
    Description :
    Level Main succeeded to validate room 1,0,0_Floor1 for direction Right. Room is either only has a wall connector for this direction or is at the level limit and has a wall connector.
    
    Entry Number: 25/29
    Entry Type  : DetailResult
    Entry Name  : ValidateAndFillRoomForDirection
    Description :
    Level Main succeeded to validate room 1,0,0_Floor1 for direction Down. Room is either only has a wall connector for this direction or is at the level limit and has a wall connector.
    
    Entry Number: 26/29
    Entry Type  : DetailResult
    Entry Name  : ValidateAndFillRoomForDirection
    Description :
    Level Main succeeded to validate room 1,0,0_Floor1 for direction Backward. Room is either only has a wall connector for this direction or is at the level limit and has a wall connector.
    
    Entry Number: 27/29
    Entry Type  : DetailResult
    Entry Name  : Main
    Description :
    Level Main has all its required rooms and is closed. Level has 1 rooms and min required rooms is 4.
    
    Entry Number: 28/29
    Entry Type  : Issue
    Entry Name  : Main
    Description :
    Level Main generated failed for attempt #1.
    
    Entry Number: 29/29
    Entry Type  : DungeonEvent
    Entry Name  : NewMap
    Description :
    Dungeon finished generating with result False.
    
    
    #2076
    vchevaliervchevalier
    Keymaster

    Hi Grimshad!

    Thank you for providing the log file! That’s a huge help for debugging. 🙂

    From what I can read here, an entry in the log file seems very weird. This sentence makes no sense:
    (Suspicious Entry A): “Level Main has all its required rooms and is closed. Level has 1 rooms and min required rooms is 4.”

    Okay, so going back to previous entries, I can also see:
    (Suspicious Entry B): “Room Floor1 was selected to be added in the level. This was room was selected randomly within the full room candidates list because even if the level Main has not reached its minimum room amount (0/4), there are no open room candidates to use.”

    And if we go even further back, we can see that rooms “Floor1” and “Floor2” were added to the list. So, there are two rooms, just like you said.

    Okay, so quick context and explanation:
    Since the Dungeon Master randomly selects rooms to add and since you want a random Dungeon that meets your criteria, the DM tweaks randomization by giving certain priorities to its rooms. In this scenario, you want your level to have at least 4 rooms. So, for that purpose, the DM will give priorities to rooms that allow multiple “open connections” (aka: something else than walls). When a room has a wall in a direction, it is not considered “connected” to the neighboring room if there is any. So the DM prioritizes rooms that have other connectors than walls to ensure you have enough connected rooms. When the minimum room amount is reached, this “open connection” priority goes away, and eventually your level is closed off with walls everywhere.

    Back to your log file:
    If we look at suspicious entry B, we can see that the DM tried to apply this “open connection” priority, but it couldn’t find any room with open connections. And since it couldn’t find any prioritized room, it fell back on the full list of rooms, crossing its fingers and hoping for the best. Well, “the best” didn’t happen and the generation failed. 😉

    If I look back to what you told me:
    “Only one connector type exists with 1 room connector. They spawn nothing, both rooms are setup so all connectors use this connector”

    What I’m thinking right now (some things to verify on your end):
    I get the feeling that the connector you added to your rooms all have the same type than the “wall connector type” of the level. If you go to your level generation config, there should be a connector type assigned to a property called “wall connector type”. This means that this is the connector type that should be considered a wall for this level. Now look at the connector points on each of your two rooms. If the connectors configured on these points all have the “wall type” of the level, then the DM thinks that your rooms never actually connect to anything, there are always surrounded by impenetrable walls.

    Example of a working setup:
    Let’s say we are generating a 2D top-down level with 2 different rooms in a 2×2 grid. To make it work and allow any type of room placement, here is what you need (I’m skipping over what I think you did correctly based on the log file):
    1. 2 rooms with this connector setup: left-right-forward-backward room connector points have 2 possible connector configs: 1 is the wall connector, the other is something else (let’s say door). So you have 1 wall connector to allow the level to close itself and 1 other connector to allow rooms to connect to one another. The top and bottom connector points of your two rooms should only have the wall connector type. Since this is 2D, we don’t instantiate rooms over or under the first layer of room, so there are only walls on the Y axis. You rooms also both need a dungeon connector point, since we don’t know which rooms will appear, you need a starting point somewhere and all rooms should allow it. Your room generation config should allow for multiple copies of each room (at least 4 since this is the max amount of rooms in the level).
    2. Your level generation config needs a min room amount of 4 and a max size in rooms of 2,1,2 (2 rooms wide, 1 room high, 2 rooms deep).
    3. Your dungeon needs a dungeon connection (defined in the dungeon script panel), in your level.

    I think, that’s pretty much it.

    Please let me know how this turns out. If you get other errors, please let me know.

    Thanks!

    #2077
    Grimshad
    Participant

    I believe I understand the problem you’ve pointed out when it comes to wall connectors. The part I don’t understand is that I started out with multiple connector types, but ended up falling back to 1 for simplicity sake because it wasn’t working with multiple. The error I kept getting when I had 2 connector types was “A wall connector type is needed”.

    So i’ve added it back now and here’s the original failed result i was getting:

    Entry Number: 1/17
    Entry Type  : DungeonEvent
    Entry Name  : NewMap
    Description :
    Begin Dungeon generation.
    
    Entry Number: 2/17
    Entry Type  : DungeonEvent
    Entry Name  : NewMap
    Description :
    Generation attempt #1.
    
    Entry Number: 3/17
    Entry Type  : LevelEvent
    Entry Name  : Main
    Description :
    Begin Level generation.
    
    Entry Number: 4/17
    Entry Type  : LevelEvent
    Entry Name  : Main
    Description :
    Generation attempt #1.
    
    Entry Number: 5/17
    Entry Type  : LevelEvent
    Entry Name  : Main
    Description :
    2 Room Candidates found.
    
    Entry Number: 6/17
    Entry Type  : LevelEvent
    Entry Name  : Main
    Description :
    Level is generated using All Random. Starting at random coordinate: [Point:1,0,0].
    
    Entry Number: 7/17
    Entry Type  : DetailCalculation
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    From coordinate [Point:1,0,0] toward direction Left a Any ConnectorType would do because there are no neighbors or level limit.
    
    Entry Number: 8/17
    Entry Type  : DetailCalculation
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    From coordinate [Point:1,0,0] toward direction Right a Wall ConnectorType is needed because coordinate is at level limit.
    
    Entry Number: 9/17
    Entry Type  : DetailCalculation
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    From coordinate [Point:1,0,0] toward direction Up a Any ConnectorType would do because there are no neighbors or level limit.
    
    Entry Number: 10/17
    Entry Type  : DetailCalculation
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    From coordinate [Point:1,0,0] toward direction Down a Wall ConnectorType is needed because coordinate is at level limit.
    
    Entry Number: 11/17
    Entry Type  : DetailCalculation
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    From coordinate [Point:1,0,0] toward direction Forward a Any ConnectorType would do because there are no neighbors or level limit.
    
    Entry Number: 12/17
    Entry Type  : DetailCalculation
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    From coordinate [Point:1,0,0] toward direction Backward a Wall ConnectorType is needed because coordinate is at level limit.
    
    Entry Number: 13/17
    Entry Type  : DetailResult
    Entry Name  : CalculateRequiredRoomConnectors
    Description :
    Calculated list of RequiredRoomConnector for Room at Coordinate [Point:1,0,0].
    
    Entry Number: 14/17
    Entry Type  : DetailResult
    Entry Name  : FindMatchingRoomCandidates
    Description :
    Calculated list of MatchingRoomCandidates.
    
    Entry Number: 15/17
    Entry Type  : DetailResult
    Entry Name  : AddRoom
    Description :
    No room candidates available to add a Room.
    
    Entry Number: 16/17
    Entry Type  : Issue
    Entry Name  : GenerateLevel
    Description :
    Couldn't add a first Room to level Main.
    
    Entry Number: 17/17
    Entry Type  : DungeonEvent
    Entry Name  : NewMap
    Description :
    Dungeon finished generating with result False.
    
    

    Wall connector is of wall type and open room empty is of open room type

    View post on imgur.com

    View post on imgur.com

    • This reply was modified 2 years, 4 months ago by Grimshad.
    • This reply was modified 2 years, 4 months ago by Grimshad.
    • This reply was modified 2 years, 4 months ago by Grimshad.
    #2081
    Grimshad
    Participant

    It wouldn’t let me edit my previous post so here’s some extra information on what i’m trying to do. I’m sure I can accomplish all of it using connectors and regions with the exception of the mirror flip. Once half of the level is generated I need to copy, mirror, and flip it so the other half is exactly the same.

    Here’s the level design concept

    View post on imgur.com

    And here’s a mock up of the design

    View post on imgur.com

    #2082
    vchevaliervchevalier
    Keymaster

    Okay, so looking at the new log file, it seems the DM cannot find a room that allows for wall connectors toward the right, down and backward directions. You’ve shown me the level generation config with the specified wall type (thanks!) and a room’s left connector point (and it seems properly configured). Do your walls connectors have the same “wall connector type” than your level configuration or are there 2 wall connector types? (maybe one called “wall_type” and the other called “wall_connector_type”?) There is definitely something going on with your connectors / connector types. Can you give me more information / screenshots on your connectors, connectors types and connector points?

    If you can’t find anything wrong with your setup, can you send me a zipped version of your project? If it’s not too big. I can debug it in my lab environment and find the issue for you.

    For your level design concept, yes everything should be doable with regions, etc.

    As for the mirror flip… Wow, that’s a first! The DM cannot do that right now. But I’m currently working on modular level generation. Which means, you could create your own level generation algorithm to implement the duplicating part (leaving all the other level generation algorithm as-is). It should not be too difficult, as long as your rooms allow to be turned along the y-axis. I’m actively working on modular level generation (since the last months, it takes time because it’s a huge feature), but I’m making good progress and expect to finish it before winter. If you can’t wait until then, then I suppose you could add code after calling the dungeon generation to actually copy all the elements and rotate them, but you would also have to do it for the map, etc. That’s a lot of work too.

    Let me know what you find out about your connectors!

    • This reply was modified 2 years, 4 months ago by vchevaliervchevalier.
    #2084
    Grimshad
    Participant

    My project is too large to send. However, I am willing to present to you with teamviewer so you can show me exactly where i’m going wrong. If you have the time and patience. I have Emailed you my Teamviewer ID so you can connect.

    As for the mirror/flip. My current plan is exactly what you described. After generation I will most likely duplicate the half level and manually manipulate it into place. Luckily, I am only using Dungeon Master for level generation and some item spawning. I won’t be using the map features.

    • This reply was modified 2 years, 4 months ago by Grimshad.
    #2086
    vchevaliervchevalier
    Keymaster

    Just for the sake of logging what happened: I went on a live debug session with Grimshad and we fixed the issue. The issue was that the rooms didn’t have wall connectors defined on the up and down directions, that prevented the level from generating.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.