Dungeon Architect

Dear,

I hope you are well !

I’m trying to create procedural objects in a DA dungeon.
So i have created a c++ class inheriting from AActor and made a blueprint of it.
I use this blueprint as an asset in the DA Dungeon.

For my procedural generation i create a FRandomStream.
To ensure a completely deterministic process (I want the procedural objects to look the same every time i rebuild the dungeon), i tried to reset my FRandomstream before calling BuildDungeon().
But this doesn’t seem to work and objects (at the same location) are different at each rebuild.
I checked that my FRandomStream is correctly reset so i can only guess that objects in a DA Dungeons are not always created in the same order, so even if my FRS is reset, i don’t get the same sequence of random integers everytime.

So to ensure a deterministic process i’d like to use the dungeon’s own FRandomStream (GetBuilder()->random) but it is protected in DungeonBuilder.h.
Could you please make it public or create a getter for it ?

Thanks :slight_smile:
All the best,

EDIT: My bad ! I was using the FRandomStream as a global variable and for some reason it didn’t work despite reinitialization. As soon as i made it a local variable it worked as i wanted. Forget my request and sorry for the bother :slight_smile:

Hi,
Tool is amazing.
I have one problem. I want to random few layouts in loop and get statistics such us count of rooms. I made listener blueprint which You can see in screenshot below. Function Get Seed works corectly, but I can’t read length of “get rooms” for each random seed, because it show the same number for every iteration. I think it is count of rooms in first random layout, but I don’t know why it happens. I tried move “get rooms” into loop body, and make new variable for this value but nothing work. I tested more and it builds dungeon with using first seed. Do you have any idea to random layout in loop and read info about these layouts?

@TraceAnima We don’t have a way of doing that with the SnapMap builder

Hello @uced Welcome back!

Glad it worked out for you. I’ll add access to the Random stream in spawn logic so you can drop in a spawn logic blueprint in your actor theme nodes and initialize them when the actor spawns (e.g. grab a seed from the random stream and init your spawned actors)

Best regards

@Bajtek222 Thank you. After setting the seed, you’ll need to rebuild the dungeon (Build Dungeon node). In this case, you shouldn’t use a loop as this is a callback event. You can check your I value the next time it gets called

Progress on the Grid Flow Builder. It’s almost complete. Maybe another week and I’ll give you guys early access. Please join our Discord channel. We have a large DA community there. PM me there for an early build of this

Oh that some serious improvements.

Thanks for reply. Your method works fine in this case, but now I want to check my room count before dungeon start building. If I use modified blueprint which I’ll attach below, when I start game, my character can spawn few times, because blueprint of start point creates few time and destroy with whole dungeon. It is possible to safe check room count and when it will be in range min:it will build, else random again?

Thanks, great as always :slight_smile:
All the best

Using the infinity blade example in 4.23 and i just removed and reinstalled, the staticmesh actors do not have “Generate Overlap Events” set when I generate a dungeon.
I even opened DA_InifinityBlade_Grass_1 map, (where it does show the floor tiles having generate overlap events checked but it has the yellow revert arrow next to it). When I destroy and rebuild there, it also doesn’t have generate overlap events marked. However, if i look in the builder, it’s set marked.

Hello, I just started using this today for the first time and I’m running into some issues.
I get the feeling its related to the same issues the poster above has.

First, It seems some of the object properties of static objects don’t apply when you regenerate a dungeon on a map.
In particular, I’m testing this out with a supergrid prototype and I’m unable to create a mesh doorway I can pass through.
The collision seems to be stuck at default.

[EDIT] I found I can work around this by just using a blueprint that is just a static mesh inside. If this was supposed to be an interactive door, I would probably need a blueprint anyway.
the only thing thats odd is the static mesh must live under the scene root (it cannot be the scene root) or else you lose the transform you give it entirely. my cube thats been scaled to look like a door will show as a cube again. I dont know what having extra scene roots everywhere does for performance. [/edit]

I also tried to set some static lights into the scene and ran into some additional strange behavior.
In this screenshot. i deleted the generated dungeon and built it again. the light was in the wrong orientation.
it only worked when I clicked build 2x in a row.

[EDIT] also tried putting a static spotlight under a scene root in a blueprint and this fixes the issue. but again, also not sure what performance impact this has.
If the light is the scene root, you get the same orientation behavior as before. [/edit]

Overall, I love the potential of this plugin. I think its pretty . It seems this plugin has been around for a few years, so I Imagine these are new issues to the latest version or perhaps just UE4.24 which I’m using.

Also, I have a question about usage.
Below I made a simple manual dungeon with 2 volumes. and no matter what i do, it wants to connect them with a right angle.
Is there any way to have it generate a more diagonal like path?

[Edit] Digging into this further, I think I need to write my own builder maybe with a different strategy. Thankfully the source for the grid builder seems to come with the plugin, so I can carefully study the 3000+ lines of code to learn how to best approach this. [/Edit]

[Edit 2] request for next release: Can you make UGridDungeonBuilder::GetDungeonOffset() a part of the base class and a public blueprintable function? This can be useful.
I was trying to find a way to get the dungeon object position out of the builder (after learning the hard way you need to cast it to a grid builder to get more stuff out of it) to create an Origin marker as a reference point. The function exists, but is inaccessible.

Many thanks for the plugin.
Looking forward to diving in deeper soon!

@brian.boettger I’ll fix this in the next update

@xdbxdbx Thank you for the feedback. I’ll check the lighting orientation issue. There’s an issue with the recent version’s static mesh collision settings. I’ll fix that in the next update

The grid builder connects two rooms with right angle, unless there are more rooms in the middle which it can connect through

New sample theme for the new grid flow builder

You can also preview the built dungeon in the grid flow editor’s 3D preview viewport

I’ve created another simpler theme to go with the grid flow builder. This theme will be applied by default to the grid flow editor’s 3D viewport. (you can change the preview theme from the settings). This theme also demos the elevation feature, where you can beautify the tiles around the dungeon layout

Added a few modular wall/door tile assets to go with the theme. I’ll also include the blender files in the quick start guide

The game sample includes an inventory. The keys you pick up get saved in the slots. A key-lock example shows one way of implementing locked doors which open only if the overlapping actor has an inventory with an appropriate key id

There’s also a minimap

Hello,

Do you think you could expose the RandomStream to the SimpleCity transform logic “GetNodeOffset” function ?


void GetNodeOffset(USimpleCityModel* Model, FTransform& Offset);

The one from the grid model is much richer, offering acces to the builder, config, query, random stream, etc:


void GetNodeOffset(UGridDungeonModel* Model, UGridDungeonConfig* Config, UGridDungeonBuilder* Builder, UGridDungeonQuery* Query, const FCell& Cell, const FRandomStream& RandomStream, int32 GridX, int32 GridY, const FTransform& MarkerTransform, FTransform& Offset);

I’m starting to have a serious look at floor and simple city models and i’d like to be able to turn 180° my assets in the simple city to allows more variety without altering the aspect ratio of the large custom blocks and i can’t create a transform logic blueprint that does that without GetNodeOffset letting me read the random stream.

Thank :slight_smile:

Hello,

Do you think it would be possible to differenciate the rooms in the standard dungeons (Grid and FloorPlan) ?
That would open a lot of variety.

It could take the form of exposing to the user the number of different types of rooms and their probabilities (pretty much the way CityBlockDimensions are handled in SimpleCity), so every room would be given a type and proba in the builders.
Then it would just take a simple selector to fill different rooms with different assets.

For example lets say we want to build an apparment and we need some bedrooms, a living room and a bathroom.
I could specify 3 types, with p(1)=0.8, p(2)=0.1 and p(3)=0.1.
Then using some selector (“type 1 room”, “type 2 room”, etc) i could choose the decoration depending on which type of room i’m in.

I know the snap feature is designed for this, but having this gadget directly in the Dungeon Theme UI would be much easier and we could directly use the Grid and FloorPlan layouts.

I guess it would be a lot of work but i’m sending the idea just in case.

Best regards :slight_smile:

this is so frustrating. i can only get like a 2d representation of a dungeon to show up in the viewport. can’t get it to let me do much more than that. and it keeps saying the various builder classes aren’t fully supported. And you desperately need to invest in a mic that will make your audio in your videos louder.

Thanks for the feedback, I’ll explore it

I’ve submitted a new update to the marketplace
Version 2.15.0

  • New: Grid Flow Builder, a powerful new feature to control the flow and design of your dungeon layouts
  • New: Browse samples and templates using the new LaunchPad window
  • New: Added a new DA button in the level editor’s toolbar to open the LaunchPad window
  • New: Updated Level Streaming framework to support multi-player
  • New: Snap Flow Editor’s backtracking in the Debug View shows a blue outline around the active module
  • New: The plugin contains all the samples content that can be accessed from the launchpad, and no longer requires a separate download from the quick start guide
  • New: Removed all starter content dependencies from the samples
  • New: Updated DA Logo in the editor mode’s window
  • New: Removed the HelpSystem module and merged it with the Editor Module
  • Fix: Fixed compile errors in Visual Studio 2019

The new update has a launcher for samples and theme templates so you can access everything from a central place. it also has a powerful new dungeon buidler called GridFlow

watch?v=bUopKyowfQg