-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Anyway to predict if a room can be successfully placed/ know if it is actually placed when Choose Next Room? #29
Comments
Greeting! I am using this amazing plugin and trying to write a cool logic for spawning the room. I am wondering when I choose a room in the Choose Next Room function, are the room guaranteed to be placed? What will happen if, like the room is too big and cannot be placed? Let's say in the example in the plugin description, I want to spawn a secret room once and only once in my dungeon, what is going on in the plugin if that secret room did not successfully spawned? In that case there will be no secret room at all or the generate is aborted? |
And well some times the generator only spawn a single start room and no other rooms at all. Could this be caused by a similar issue? Thanks! |
Hi @EiZi233
No, the room you return in the
When the dungeon generator has finished to generate (either by door exhaustion or by You can see the flowchart in the wiki to visualize the path taken by the dungeon generator. So you should keep in mind that randomizing the room choice is very important. If you only have one room data of your secret room, then you should not have the same code path to return the secret room each time the
I don't know what your code is, but you are right, it could be caused by:
Make sure your rooms have enough door. A room with only one room will stop naturally the generation for this dungeon "branch", since the only door will be used to connect to previous room. I think I will add some warning or error messages for those cases. Hope I answered your questions. Bests. |
No description provided.
The text was updated successfully, but these errors were encountered: