@ I’m not at my office today. I’ll have one by tomorrow
No rush, thanks :o
Btw, have you tried using LPV (Light Propagation Volumes) with DA ?
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):
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 !
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.
Sounds . Could you run me through the process in a bit more detail if you have the time?
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.
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 !
, All dungeon spawned actors have a tag starting with “Dungeon-”
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
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 with Visual C++? If not, you should
@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
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
Thanks again, super fast and useful answer !
I’ll definitely check Visual Assist, it’s the not first time i hear about it^^
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’s settled it. Buying on payday.
woaw, that’s realy a great news. I’m looking forward to play with this
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
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 Probably this is what you want (Spawn same sub-level more than once.)