# 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:** 50

<div class="post-metadata">

**Author:** ![RedSaturnSix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RedSaturnSix](https://forums.unrealengine.com/u/RedSaturnSix)\
**Post date:** [September 23, 2016, 9:58pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/997 "2016-09-23T21:58:47Z")

</div>

Hi,

Firstly I wanted to say how amazing the work you’re doing is. Truly exceptional.

Secondly, I’d very much be interested in purchasing your work for one of my projects but first I wanted to ask if you had considered adding functionality so you could create prefab rooms that would be used in dungeon generation.

It’s very important for me to be able to build very specific rooms and have them show up in the generation.

Many thanks.

---

<div class="post-metadata">

**Author:** ![Bioblaze](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bioblaze](https://forums.unrealengine.com/u/Bioblaze)\
**Post date:** [September 23, 2016, 10:11pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/998 "2016-09-23T22:11:54Z")

</div>

> [@RedSaturnSix;599329](#):
>
> Hi,
> 
> Firstly I wanted to say how amazing the work you’re doing is. Truly exceptional.
> 
> Secondly, I’d very much be interested in purchasing your work for one of my projects but first I wanted to ask if you had considered adding functionality so you could create prefab rooms that would be used in dungeon generation.
> 
> It’s very important for me to be able to build very specific rooms and have them show up in the generation.
> 
> Many thanks.

I`m doing that now actually. All you do is build the Rooms with the Build Volume, have it connected too the Generator. Then Have it Spawn all the Rooms in your Array which you save, and then run the Generator via Blueprints to reseed, and generate your roooms stay the same, but everything connects too it.

---

<div class="post-metadata">

**Author:** ![RedSaturnSix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RedSaturnSix](https://forums.unrealengine.com/u/RedSaturnSix)\
**Post date:** [September 23, 2016, 10:28pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/999 "2016-09-23T22:28:28Z")

</div>

Sounds . Could you run me through the process in a bit more detail if you have the time? 🙂

---

<div class="post-metadata">

**Author:** ![calmasacow](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/calmasacow/32/577257_2.png) [@calmasacow](https://forums.unrealengine.com/u/calmasacow)\
**Post date:** [September 24, 2016, 12:05am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1000 "2016-09-24T00:05:59Z")

</div>

what you are refering to is the snap builder and it is already in there. you basically build you rooms as levels then insert the snap door nodes and a Snap info node and set the parameters a then in the main level you set what levels you want to use and then it builds them on in an array.

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [September 24, 2016, 6:14am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1001 "2016-09-24T06:14:58Z")

</div>

> [@uced;599322](#):
>
> Hello,
> 
> I can now spawn, modify and delete DA dungeons at will in my game during runtime (and it’s super fun^^).
> 
> However, when trying my game in client-server configuration it seems that things work only on the server.
> 
> I tried the very code you gave in a server function and the dungeon is spawned only on the server, it doesn’t appear on the clients.  
> I tried to have it replicate with Dungeon-\>SetReplicates(true) but with no success.
> 
> I’m afraid the replication has to be set on every UInstancedStaticMeshComponents (at least it’s what i do on my self made dungeons).
> 
> So is there a way to access all the instanced meshes in a ADungeon so i can make them replicate ?
> 
> If possible, i would also like to set them other properties like being clickable, etc.  
> As an example, is how i treat my own UInstancedStaticMeshComponent (this is from the constructor of my own dungeon class):
> 
> ```auto
> 
> Mesh0Component = ObjectInitializer.CreateDefaultSubobject<UInstancedStaticMeshComponent>(this, TEXT("mesh 0 component"));
> Mesh0Component->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);
> Mesh0Component->SetNetAddressable();
> Mesh0Component->SetIsReplicated(true);
> Mesh0Component->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
> Mesh0Component->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Block);
> Mesh0Component->SetCollisionObjectType(ECollisionChannel::ECC_WorldDynamic);
> Mesh0Component->OnClicked.AddDynamic(this, &AYagActor::YagActorClicked);
> Mesh0Component->OnReleased.AddDynamic(this, &AYagActor::YagActorReleased);
> 
> ```
> 
> My intellisense doesn’t want to work with the DA plugin so i am kind of blind and it’s quite a pain to parse every DA header file when looking for something.
> 
> Is there a way to do similar things on the DA dungeons meshes ?
> 
> If not, is there some simpler way to replicate the dungeons ?
> 
> Thanks !

All right just a quick update to spare you any work or answer.

After a good night sleep i found a solution !

The trick is to assign all the dungeon attributes (theme, gridconfig…) on each client (not only on server).

So my DA Actor is replicated but all the cooking happens also on the clients.

I did this using an OnRep function.

I’ll continue my testing and will post a full working howto with code when it’s mature enough.

Cheers !

---

<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:** [September 24, 2016, 8:23am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1002 "2016-09-24T08:23:51Z")

</div>

> [@uced;599322](#):
>
> Hello,
> 
> I can now spawn, modify and delete DA dungeons at will in my game during runtime (and it’s super fun^^).
> 
> However, when trying my game in client-server configuration it seems that things work only on the server.
> 
> I tried the very code you gave in a server function and the dungeon is spawned only on the server, it doesn’t appear on the clients.  
> I tried to have it replicate with Dungeon-\>SetReplicates(true) but with no success.
> 
> I’m afraid the replication has to be set on every UInstancedStaticMeshComponents (at least it’s what i do on my self made dungeons).
> 
> So is there a way to access all the instanced meshes in a ADungeon so i can make them replicate ?
> 
> If possible, i would also like to set them other properties like being clickable, etc.  
> As an example, is how i treat my own UInstancedStaticMeshComponent (this is from the constructor of my own dungeon class):
> 
> ```auto
> 
> Mesh0Component = ObjectInitializer.CreateDefaultSubobject<UInstancedStaticMeshComponent>(this, TEXT("mesh 0 component"));
> Mesh0Component->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);
> Mesh0Component->SetNetAddressable();
> Mesh0Component->SetIsReplicated(true);
> Mesh0Component->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
> Mesh0Component->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Block);
> Mesh0Component->SetCollisionObjectType(ECollisionChannel::ECC_WorldDynamic);
> Mesh0Component->OnClicked.AddDynamic(this, &AYagActor::YagActorClicked);
> Mesh0Component->OnReleased.AddDynamic(this, &AYagActor::YagActorReleased);
> 
> ```
> 
> My intellisense doesn’t want to work with the DA plugin so i am kind of blind and it’s quite a pain to parse every DA header file when looking for something.
> 
> Is there a way to do similar things on the DA dungeons meshes ?
> 
> If not, is there some simpler way to replicate the dungeons ?
> 
> Thanks !

, All dungeon spawned actors have a tag starting with “Dungeon-”

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/8/b58fda48d50d6b77d0bb9ea72e9eb73d5c725e70.png) ](https://i.imgur.com/1juPVBW.png)

So you can grab your ISMs by iterating over all the actors in the world and checking if the Actor::Tags has your dungeon tag

```auto

        const FName DungeonTag = UDungeonModelHelper::GetDungeonIdTag(Dungeon);
	for (TActorIterator<AActor*> ActorItr(GetWorld()); ActorItr; ++ActorItr) {
		AActor* Actor = *ActorItr;
		if (Actor->Tags.Contains(DungeonTag)) {
			// This actor was spawned by the above dungeon actor
		}
	}

```

As for intellisense, I’ll have a look. Are you using using [Visual Assist X](http://.wholetomato.com/) with Visual C++? If not, you should 😉

---

<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:** [September 24, 2016, 8:26am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1003 "2016-09-24T08:26:24Z")

</div>

> [@RedSaturnSix;599329](#):
>
> Hi,
> 
> Firstly I wanted to say how amazing the work you’re doing is. Truly exceptional.
> 
> Secondly, I’d very much be interested in purchasing your work for one of my projects but first I wanted to ask if you had considered adding functionality so you could create prefab rooms that would be used in dungeon generation.
> 
> It’s very important for me to be able to build very specific rooms and have them show up in the generation.
> 
> Many thanks.

@RedSaturnSix Thank you! Like others have pointed out, this can be done with the snap builder. However it is still a work in progress and will take a little more while to finalize. I’ll update the status in the forums

---

<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:** [September 24, 2016, 8:36am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1004 "2016-09-24T08:36:19Z")

</div>

I’ve got world composition supported in the snap builder

However there’s a limitation. The engine doesn’t allow me to stream the same level multiple times. One level can be stream only once at a particular location. This doesn’t work as we might need to spawn a module (like corridor/room) multiple times across the map

As a workaround, I’ll create a folder in the same location as the base map, then make a copy of each module map into that folder and stream that in, this way each modules copy is unique

Foliage works properly with the new world composition system

I added grass on the spawn module. It shows up properly on the generated map

[![](https://i.imgur.com/RAHOvEH.jpg) ](https://i.imgur.com/RAHOvEH.jpg)

---

<div class="post-metadata">

**Author:** ![uced](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@uced](https://forums.unrealengine.com/u/uced)\
**Post date:** [September 24, 2016, 8:37am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1005 "2016-09-24T08:37:33Z")

</div>

Thanks again, super fast and useful answer !

I’ll definitely check Visual Assist, it’s the not first time i hear about it^^

---

<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:** [September 24, 2016, 9:44am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1006 "2016-09-24T09:44:07Z")

</div>

I made a simple city builder for the unity version a while ago. It is a basic grid based rectangular road network with proper markers to setup roads (T junctions, X junctions, etc), buildings facing streets, parks in the middle

I’ll bring it to UE4 soon

[![](https://i.imgur.com/2ici2t0h.jpg) ](https://i.imgur.com/2ici2t0h.jpg)

[![](https://i.imgur.com/VO7Q5kCh.jpg) ](https://i.imgur.com/VO7Q5kCh.jpg)

[![](https://i.imgur.com/D4RvozDh.jpg) ](https://i.imgur.com/D4RvozDh.jpg)

---

<div class="post-metadata">

**Author:** ![RedSaturnSix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RedSaturnSix](https://forums.unrealengine.com/u/RedSaturnSix)\
**Post date:** [September 24, 2016, 10:41am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1007 "2016-09-24T10:41:06Z")

</div>

That’s settled it. Buying on payday. 🙂

---

<div class="post-metadata">

**Author:** ![sylvain\_l](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sylvain\_l](https://forums.unrealengine.com/u/sylvain_l)\
**Post date:** [September 24, 2016, 10:43am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1008 "2016-09-24T10:43:39Z")

</div>

> [@;599491](#):
>
> I made a simple city builder for the unity version a while ago. It is a basic grid based rectangular road network with proper markers to setup roads (T junctions, X junctions, etc), buildings facing streets, parks in the middle
> 
> I’ll bring it to UE4 soon

woaw, that’s realy a great news. I’m looking forward to play with this 🙂

---

<div class="post-metadata">

**Author:** ![Sitrec](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sitrec](https://forums.unrealengine.com/u/Sitrec)\
**Post date:** [September 24, 2016, 11:11am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1009 "2016-09-24T11:11:52Z")

</div>

> [@;599491](#):
>
> I made a simple city builder for the unity version a while ago. It is a basic grid based rectangular road network with proper markers to setup roads (T junctions, X junctions, etc), buildings facing streets, parks in the middle
> 
> I’ll bring it to UE4 soon

That looks really interesting. Will this replace City Architect or do you still plan on finishing it?

---

<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:** [September 24, 2016, 11:31am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1010 "2016-09-24T11:31:36Z")

</div>

> [@Sitrec;599523](#):
>
> That looks really interesting. Will this replace City Architect or do you still plan on finishing it?

I plan on finishing it with OpenStreetMap. I was looking at the OSM Overpass API and the protocol specs recently

---

<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:** [September 24, 2016, 12:24pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1011 "2016-09-24T12:24:27Z")

</div>

The world composition method is too restrictive. The workaround would make it work only in the editor (as cloning of worlds is part of the editor API). I’m looking at fixing the original spawn code

---

<div class="post-metadata">

**Author:** ![MSTF](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MSTF](https://forums.unrealengine.com/u/MSTF)\
**Post date:** [September 24, 2016, 8:13pm UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1012 "2016-09-24T20:13:51Z")

</div>

> [@;599535](#):
>
> The world composition method is too restrictive. The workaround would make it work only in the editor (as cloning of worlds is part of the editor API). I’m looking at fixing the original spawn code

Hi (Merhaba) ,

I’m just not sure but please look at [https://forums.unrealengine.com/showthread.php?2712-Streaming-levels-with-an-offset&p=18007&viewfull=1#post18007](https://forums.unrealengine.com/showthread.php?2712-Streaming-levels-with-an-offset&p=18007&viewfull=1#post18007) Probably this is what you want (Spawn same sub-level more than once.)

---

<div class="post-metadata">

**Author:** ![Mr\_SquarePeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr\_SquarePeg](https://forums.unrealengine.com/u/Mr_SquarePeg)\
**Post date:** [September 25, 2016, 1:06am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1013 "2016-09-25T01:06:02Z")

</div>

> [@;599491](#):
>
> I made a simple city builder for the unity version a while ago. It is a basic grid based rectangular road network with proper markers to setup roads (T junctions, X junctions, etc), buildings facing streets, parks in the middle
> 
> I’ll bring it to UE4 soon
> 
> [http://i.imgur.com/2ici2t0h.jpg](http://i.imgur.com/2ici2t0h.jpg)
> 
> [http://i.imgur.com/VO7Q5kCh.jpg](http://i.imgur.com/VO7Q5kCh.jpg)
> 
> [http://i.imgur.com/D4RvozDh.jpg](http://i.imgur.com/D4RvozDh.jpg)

I was wondering when this would come to unreal engine. 🙂

Will we be able to use theme files like normal with the city builder? If so…

 ![e606b1549a048039f7283e131ddffa59a348a901.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/6/0/e606b1549a048039f7283e131ddffa59a348a901.jpeg)

---

<div class="post-metadata">

**Author:** ![Bioblaze](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bioblaze](https://forums.unrealengine.com/u/Bioblaze)\
**Post date:** [September 25, 2016, 2:12am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1014 "2016-09-25T02:12:38Z")

</div>

> [@;599491](#):
>
> I made a simple city builder for the unity version a while ago. It is a basic grid based rectangular road network with proper markers to setup roads (T junctions, X junctions, etc), buildings facing streets, parks in the middle
> 
> I’ll bring it to UE4 soon
> 
> [http://i.imgur.com/2ici2t0h.jpg](http://i.imgur.com/2ici2t0h.jpg)
> 
> [http://i.imgur.com/VO7Q5kCh.jpg](http://i.imgur.com/VO7Q5kCh.jpg)
> 
> [http://i.imgur.com/D4RvozDh.jpg](http://i.imgur.com/D4RvozDh.jpg)

o.o Your … I spent 3 Years developing a Procedurally generated game in unity, City, Building, @.@ and had to Switch to unreal engine :X I cant wait to buy this. Lolz

---

<div class="post-metadata">

**Author:** ![Mr\_SquarePeg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mr\_SquarePeg](https://forums.unrealengine.com/u/Mr_SquarePeg)\
**Post date:** [September 25, 2016, 2:46am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1015 "2016-09-25T02:46:53Z")

</div>

So - Just got looking at the tutorial videos on YouTube for Dungeon Architect. Looks like I would have to define a Base City theme and then define a bunch of sub themes and overwrite the various bits of city that I want with them override volumes. 🙂

That said - The ability to connect multiple dungeons (or in my case Cities) together would be great. Would that be possible? I think that would be a great way to circumvent the problem you are facing with World Composition. So basically make the City Builder have an entrance or Exit which an artist can make it connect to another level manually. 🙂

Either way just a thought.

- HeadClot

---

<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:** [September 25, 2016, 7:42am UTC](https://forums.unrealengine.com/t/dungeon-architect/28094/1016 "2016-09-25T07:42:00Z")

</div>

> [@HeadClot;599744](#):
>
> So - Just got looking at the tutorial videos on YouTube for Dungeon Architect. Looks like I would have to define a Base City theme and then define a bunch of sub themes and overwrite the various bits of city that I want with them override volumes. 🙂
> 
> That said - The ability to connect multiple dungeons (or in my case Cities) together would be great. Would that be possible? I think that would be a great way to circumvent the problem you are facing with World Composition. So basically make the City Builder have an entrance or Exit which an artist can make it connect to another level manually. 🙂
> 
> Either way just a thought.
> 
> - HeadClot

@HeadClot that should be possible. I’ll have a demo of this soon and I’m open to suggestions

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

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