Topic category: Help with MCreator software
In mods such as Roguelike Dungeons, there are structures which would spawn on the surface and have a staircase somewhere in them which would lead down to a dungeon, how could I go about doing this? I've followed tutorials and learned the basics of creating / spawning in structures for dungeons but I'm just wondering how I could make it so there would be a structure on the ground surface (i.e a house or a tower or something) which would be able to lead to a dungeon in the underground.
Also, I'd like to know how to make dungeons themselves connected, I want to have rooms that are empty, some have a mob spawner, and some have a chest. How would I go about implementing this so that way there is a mix of empty rooms and rooms w/ things in them? (aka a normal dungeon in basically any game) Thanks for your time.
Structure "structure room1" has a 0.31*100 = 31% chance.
Structure "room2" has a (0.62-0.31)*100 = 31% chance.
Structure "room3" has a (0.93-0.62)*100 = 31% chance.
Structure "chestroom1" has a (1-0.93)*100 = 7% chance.
So as you can see, because you already checked everything below 0.93, that leaves the remaining 0.07*100 = 7% chance for the last room.
For every separate room, you need to add an else if statement.
"Why is it that in your original dungeon procedure, you have one structure attached to the if statement "Get Local Rand < 0.33" yet you have two set to else if "Get Local Rand < 0.67"?"
I don't. I have room1 attached to the if Get Local Rand < 0.33. Room2 attached to if Get Local Rand < 0.67 and the Else statement attached to room3.
So the 'else' statement just uses the rest of the % that hasn't been used yet?
Like if i had
if Get Local Rand < 0.31 (room1)
else if Get Local Rand < 0.62 (room2)
else if Get Local Rand < 0.93 (room3)
else (chestroom) then chestroom would have 7% chance of spawning?
Also is there any way to define the placement of rooms i.e is there anyway to make it so that one 'room' would function as a connecting hallway which would branch off to several other rooms, or do i have to leave it to be just completely random?
If you want to create hallway-like structures you'll have to manually alter the behaviour of the procedure to fit that need.
"So the 'else' statement just uses the rest of the % that hasn't been used yet?"
"else (chestroom) then chestroom would have 7% chance of spawning?"
Yes.
Alright i'm not sure how to make the hallway like structures or create a vertical entrance to the dungeons so I guess i'll just stick with simple rooms for now, but thanks so much for your help!