# Dungeon Architect

**URL:** <https://forums.unrealengine.com/t/dungeon-architect/28094>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [April 22, 2015, 12:27pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094 "2015-04-22T12:27:43Z")\
**Posts on this page:** 20\
**Page:** 81

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [April 8, 2017, 1:08pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1621 "2017-04-08T13:08:58Z")

</div>

> [@Wisdom-;688725](#):
>
> I’ve done like below:
> 
> Identify who is the player 1 (generally, the host) and player 2.  
> You make player 1 build the dungeon and then share the dungeon seed with replication or API call (in case you are using a Cloud Service like us) to another player.  
> Then, he will build the dungeon himself.
> 
> In this way, both players will play in the same dungeon.
> 
> Another way of doing this, if you can use cloud code, is to make server generate the seed for both players and send it via message to them.

I’ve tried something similar to @Wisdom-'s approach. Replicate the dungeon configuration and everyone sets that config and builds the dungeon locally. If anyone has a better approach, please let me know

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [April 8, 2017, 1:11pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1622 "2017-04-08T13:11:17Z")

</div>

> [@AngeIV;690014](#):
>
> I have terrible problem with selector logic and corner detection. Seems “isPillarOnCorner” is not working properly as it detects only sharp angle corners. I could use spartial constrait for floor to pick up all corners and place walls of certain type there, but I would have to use the flood tiles for that not the wall/pillar tiles - and that still puts me in a position where I must remove corner pillars. somehow.  
> Maybe I’m doing the corner detection wrong? Could You help me out a bit mate?

@AngeIV Have you tried the 2x2 spatial constraint? I’ll make a demo tomorrow

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [April 8, 2017, 1:43pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1623 "2017-04-08T13:43:00Z")

</div>

> [@CyberKatana;691899](#):
>
> How in Isaac template remove second door between rooms?

@CyberKatana I created a event listener BP to remove duplicate nearby markers but something broke in 4.15 and the marker list modifications are not being reflected (got a blue NOTE bar). There are some open issues on this. I’ll implement it in C++ in the next build

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/d/c/9dc39cc678c39d2683168ccbe55d5322476dc272.png)

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [April 8, 2017, 2:30pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1624 "2017-04-08T14:30:04Z")

</div>

> [@;692463](#):
>
> @n00854180t it would break the grid layout, since it works on modular assets. Are you using assets for your road tiles or is this placed on a landscape?

Landscape - I was planning on just using a textured spline-plane for roads, or painting onto the terrain.

---

<div class="post-metadata">

**Author:** ![AngeIV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AngeIV](https://forums.unrealengine.com/u/AngeIV)\
**Post date:** [April 8, 2017, 4:56pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1625 "2017-04-08T16:56:48Z")

</div>

Got fence corner detection working by using spartial constraint 2x2 for 2 objects. first goes:  
empty empty  
empty ocupied  
second goes:  
ocupied ocupied  
ocupied empty

first one detects sharp angles, second wide angles. works like a charm. anyway - that was a problem with badprops that had “corner” fence as a 90 degree railing piece. horror.

 ![fenceworking.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/c/4/c4f9243d6826206f175802605bc169144b645bf0.jpeg)

Digging into the documentation. Cant wait the FloorPlan Builder 😃 Hopefully it will allow making floor not having the same floor plan. As I am using DA for multi story building creating via grid layered on top of each other.

For multiplayer - In one project I am using replicated blueprints that are child to static mesh blueprint (stiull can have normal actor logic). They can be replcaterd. I fured it out because I needed wall pieces that can be replicated and swaped for destructible wall piece of same looks runtime. As destructible have terrible geometry and are gpu killers if not used properly.

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [April 10, 2017, 8:55am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1627 "2017-04-10T08:55:35Z")

</div>

Updated the quick start guide for 2.6

- Landscape Transformer
- Multi Dungeon Custom Layout Example
- Custom Grid Builder Example
- Query Nearby Markers
- Snap Modules Demo

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [April 10, 2017, 11:28am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1628 "2017-04-10T11:28:17Z")

</div>

Uploaded 2.6.0 to the website (Windows). I’ll test on mac and publish to the Marketplace. The [User Guide](http://coderespawn.github.io/dungeon-architect-user-guide-ue4) and [Quick Start Guide](http://coderespawn.github.io/dungeon-architect-quick-start-ue4) have been updated for 2.6

**Version 2.6.0**

- Landscape Transformation: Landscapes can now be automatically modified (height and paint data) when the dungeon is built. Since the engine supports only landscape modification from within the editor, this works only at design time and not runtime
- Added a content browser to the theme editor window
- Theme asset files now show a thumbnail, captured from the preview viewport.
- Added drag drop support on the theme editor. You can now drag and drop meshes, blueprints, particle systems etc to the theme editor and a node will automatically be created
- Added more parameters to the Grid Transform Logic, similar to the parameters in the Grid Selector Logic
- City Builder: Added spatial constraint on the simple city builder
- Selectors can now query nearby markers. These are great for not spawning blocking items near doors and stairways
- Custom Builder: Added a custom grid builder that makes it easier to create your own dungeon layouts using high level blueprint functions
- Snap Builder: Fixed Snap door state issues on level reload
- Increased the default value of grid config’s Door Proximity Steps from 2 to 6 for better quality door removal by default on dungeons
- Added a new snap demo level in the quick start guide

---

<div class="post-metadata">

**Author:** ![SimppleGames](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SimppleGames](https://forums.unrealengine.com/u/SimppleGames)\
**Post date:** [April 10, 2017, 12:53pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1629 "2017-04-10T12:53:44Z")

</div>

In the floor plan, the direction toward the building wall is only in the 0 direction and the y direction and 90 degrees in both directions.  
How do I get it to be made in 4 directions?

Current (0,90) Wall direction you want to change (0,90,180, -360)

---

<div class="post-metadata">

**Author:** ![u4yk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@u4yk](https://forums.unrealengine.com/u/u4yk)\
**Post date:** [April 10, 2017, 4:31pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1630 "2017-04-10T16:31:27Z")

</div>

Simple question: how do you properly typecast to FloorPlanConfig? Every time I cast my dungeon’s config, it fails. I’ve wasted a weekend on looking for this, but the documentation doesn’t describe it. Also, I would have searched on for the answer, but search within this forum is worthless.

---

<div class="post-metadata">

**Author:** ![AngeIV](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AngeIV](https://forums.unrealengine.com/u/AngeIV)\
**Post date:** [April 11, 2017, 10:22am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1631 "2017-04-11T10:22:34Z")

</div>

waiting for marketplace update… ☹

---

<div class="post-metadata">

**Author:** ![Konflict](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/konflict/32/906588_2.png) [@Konflict](https://forums.unrealengine.com/u/Konflict)\
**Post date:** [April 11, 2017, 6:59pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1632 "2017-04-11T18:59:01Z")

</div>

> [@Ratamorph;662153](#):
>
> [MENTION=28980][/MENTION] when I rebuilt the dungeon the collision flags for my walls have the default settings.

In Runtime/SceneProviderCommand.cpp at line 59 (before the SetMeshComponentAttributes call) just put this setting, which will enable for the non-instanced meshes to copy and use the collision settings from the Theme editor:

```auto

 MeshComponent->bUseDefaultCollision = false;

```

This actually is a pretty cool feature, however the Instanced meshes will not follow this unfortunately. In the Runtime/DungeonInstancedMeshActor.cpp at around the line 58 (just after the SetStaticMesh() call) you can put these lines:

```auto

 Component->bUseDefaultCollision = false;
 UEngine::CopyPropertiesForUnrelatedObjects(Mesh->Template, Component);

```

This will enable for the instanced mesh components, that the collision profile (along with the rest of the mesh settings) to be inherited from the Template asset.

One note tho, that these mesh template settings you set up in the dungeon theme will not gets populated until you open up the theme asset in the editor before spawning the dungeon. This apparently is because the Runtime/DungeonMesh.cpp will initialize a default StaticMeshComponent for the Template property, and that will erase these settings. This only happens until you open the Theme Asset in the editor, when the proper Template settings gets populated, and from that point it will be accessible for the Dungeon to build the mesh with the chosen properties.

To overcome this issue; i have removed the initializations from the Runtime/DungeonMesh.cpp (just empty the constructor block). I have yet to found any problems with this modification. It makes me wonder why was the initialization neccessary for the DungeonMesh to create a new StaticMeshComponent in the first place?

---

<div class="post-metadata">

**Author:** ![MasterCheif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MasterCheif](https://forums.unrealengine.com/u/MasterCheif)\
**Post date:** [April 12, 2017, 3:55am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1633 "2017-04-12T03:55:42Z")

</div>

Hi Mr. ! Firstly, your creation is incredible. It has inspired me very much! However, I have a question. How did you manage to create the Theme Editor for your project? You don’t have to tell me the exact secrets, I’m just looking for somewhere to start. Thank you!

---

<div class="post-metadata">

**Author:** ![Konflict](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/konflict/32/906588_2.png) [@Konflict](https://forums.unrealengine.com/u/Konflict)\
**Post date:** [April 12, 2017, 6:19pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1634 "2017-04-12T18:19:52Z")

</div>

> [@MasterCheif;694142](#):
>
> I’m just looking for somewhere to start

You can have more than that, since you are a customer of the entire source code that you are allowed to read, (and modify for your own use) which should reveal much about the answers. The DungeonArchitectEditor/ folder will hold everything that is editor ui related, but obviously the runtime folder will also contain the classes for the individual asset types. The Graph editor (Ed Graph) related classes can be found in the Core/ folder.

Dungeon Architect is not the only plugin that utilize the editor ui in unique ways, the Able plugin is also a very interesting addition. The rest you should be able to figure out by learning the [engine source code](https://github.com/EpicGames/UnrealEngine/tree/release/Engine/Source/Editor) which is filled with examples to all sorts of ui panels (that is the editor is currently using).

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [April 13, 2017, 4:31am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1635 "2017-04-13T04:31:32Z")

</div>

> [@simpple;693246](#):
>
> In the floor plan, the direction toward the building wall is only in the 0 direction and the y direction and 90 degrees in both directions.  
> How do I get it to be made in 4 directions?
> 
> Current (0,90) Wall direction you want to change (0,90,180, -360)

@simpple, I just checked, it emits only on 0, 90. It requires changes to the C++ builder code. I’ll added proper wall orientations in the future update

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [April 13, 2017, 4:49am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1636 "2017-04-13T04:49:11Z")

</div>

> [@u4yk;693332](#):
>
> Simple question: how do you properly typecast to FloorPlanConfig? Every time I cast my dungeon’s config, it fails. I’ve wasted a weekend on looking for this, but the documentation doesn’t describe it. Also, I would have searched on for the answer, but search within this forum is worthless.

@u4yk it will typecast correctly if your dungeon actor uses the Floor Plan builder

 ![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/7/1/3713abd8d61a716cd847f19e922ae5653efce217.png)

![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/8/1/181bb6be34a6406f7b9d5f09e8aeaac2083a55d0.png)

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [April 13, 2017, 4:49am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1637 "2017-04-13T04:49:47Z")

</div>

> [@AngeIV;693709](#):
>
> waiting for marketplace update… ☹

@AngeIV I’ve submitted to Epic yesterday. I’ll keep you posted on the status

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [April 13, 2017, 4:50am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1638 "2017-04-13T04:50:56Z")

</div>

> [@Konflict;693942](#):
>
> In Runtime/SceneProviderCommand.cpp at line 59 (before the SetMeshComponentAttributes call) just put this setting, which will enable for the non-instanced meshes to copy and use the collision settings from the Theme editor:
> 
> ```auto
> 
> MeshComponent->bUseDefaultCollision = false;
> 
> ```
> 
> This actually is a pretty cool feature, however the Instanced meshes will not follow this unfortunately. In the Runtime/DungeonInstancedMeshActor.cpp at around the line 58 (just after the SetStaticMesh() call) you can put these lines:
> 
> ```auto
> 
> Component->bUseDefaultCollision = false;
> UEngine::CopyPropertiesForUnrelatedObjects(Mesh->Template, Component);
> 
> ```
> 
> This will enable for the instanced mesh components, that the collision profile (along with the rest of the mesh settings) to be inherited from the Template asset.
> 
> One note tho, that these mesh template settings you set up in the dungeon theme will not gets populated until you open up the theme asset in the editor before spawning the dungeon. This apparently is because the Runtime/DungeonMesh.cpp will initialize a default StaticMeshComponent for the Template property, and that will erase these settings. This only happens until you open the Theme Asset in the editor, when the proper Template settings gets populated, and from that point it will be accessible for the Dungeon to build the mesh with the chosen properties.
> 
> To overcome this issue; i have removed the initializations from the Runtime/DungeonMesh.cpp (just empty the constructor block). I have yet to found any problems with this modification. It makes me wonder why was the initialization neccessary for the DungeonMesh to create a new StaticMeshComponent in the first place?

@Konflict Thank you for the tips. I’ll have a closer look at the collision flags

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [April 13, 2017, 5:06am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1639 "2017-04-13T05:06:03Z")

</div>

> [@anonymous\_user\_92c0852berCheif;694142](#):
>
> Hi Mr. ! Firstly, your creation is incredible. It has inspired me very much! However, I have a question. How did you manage to create the Theme Editor for your project? You don’t have to tell me the exact secrets, I’m just looking for somewhere to start. Thank you!

@MasterCheif Thank you for using DA! Like @Konflict said, you can use DA’s source code as a learning resource for your own plugins

If you want to create a new window, you’ll need to subclass from FAssetEditorToolkit (DungeonArchitectEditor\Private\Core\ThemeEditor\DungeonArchitectThemeEditor.h). You can spawn your own tabs inside this window from the RegisterTabSpawners function.

You’ll probably need some asset that you save in the content browser (like the theme file). This asset data will be a UObject (e.g. DungeonArchitectRuntime/Public/DungeonThemeAsset.h) in your runtime module. Then create two classes in the editor module so you can save this data in the content browser as an asset (DungeonArchitectEditor\Private\Core\ThemeEditor\DungeonThemeDataFactory & DungeonThemeAssetTypeActions)

The Factory class links your UObject data class with the asset. The Asset Type Action lets you customize the asset (color, name etc). you will also link the editor window with the asset so your window can be opened when double clicked

When I started DA two years ago, there wasn’t much documentation on editor plugins except for this gem: [Extending the Editor](https://docs.unrealengine.com/latest/INT/Videos/PLZlv_N0_O1ga0aV9jVqJgog0VWz1cLL5f/zg_VstBxDi8/)

I highly recommend the video if you are doing any editor programming. Then there is always the engine source code 😉

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [April 13, 2017, 3:44pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1640 "2017-04-13T15:44:20Z")

</div>

The latest version **2.6.0** is available in the marketplace

---

<div class="post-metadata">

**Author:** ![Konflict](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/konflict/32/906588_2.png) [@Konflict](https://forums.unrealengine.com/u/Konflict)\
**Post date:** [April 13, 2017, 5:34pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1641 "2017-04-13T17:34:26Z")

</div>

> [@;694588](#):
>
> Thank you for the tips. I’ll have a closer look at the collision flags

You’re welcome. Can you please reply to the issue with the constructor of DungeonMesh? Why the initialization of the static mesh component was required in there? I don’t see any issues by removing that constructor code block, also fix the issue i mentioned previously (the mesh’ custom properties wont be applied unless you open up manually the theme asset in editor first).

[Previous page](https://forums.unrealengine.com/t/dungeon-architect/28094.md?page=80)

[Next page](https://forums.unrealengine.com/t/dungeon-architect/28094.md?page=82)
