Announcement

Collapse
No announcement yet.

Dungeon Architect

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    I have a bug fix/proposal:

    In the theme editor the dungeon is actually not fully rebuild, only markers seem to be re-emitted but in case of more complex custom markers this causes an annoying error since the rebuild in the theme editor does NOT equal the dungeon in the "real world" (scene).

    So it seems that some old data remains which causes the theme editor preview to be wrong/different then when making a full dungeon rebuild by pressing "Build Dungeon" on the Dungeon actor in the world level.

    This is very annoying since you cannot be sure that the new custom Selector you enabled actually worked as intented.

    The hacky solution is to close the theme editor and re-open it.


    Better solution: add this code to the top of the function SDungeonEditorViewport::PerformMeshRebuild:

    Code:
      
     DungeonBuilder->GetModel()->Reset();
    
        if (DungeonBuilder->SupportsTheming())
        {
            DungeonBuilder->BuildDungeon(DungeonModel, ObjectToEdit->PreviewViewportProperties->DungeonConfig, DungeonQuery, GetWorld());
        }
    Edit: forgot this also:

    And at the very bottom of the function SDungeonEditorViewport::PerformMeshRebuild I also added this so that it better matched the code in the build task:

    Code:
      
        DungeonBuilder->ProcessMarkerReplacementVolumes();

    Comment


      Having a problem when trying to package any project with DA i get this
      Module.DungeonArchitectRuntime.cpp.obj : error LNK2001: unresolved external symbol __libm_sse2_sincosf_
      any ideas whats going on?

      Comment


        Dear Ali,

        I managed to paint cells from my code.

        From this:
        Click image for larger version

Name:	ManualDungeonTestCode.jpg
Views:	1
Size:	30.5 KB
ID:	1599848

        I got this:
        Click image for larger version

Name:	ManualDungeonTest.jpg
Views:	1
Size:	40.6 KB
ID:	1599849

        Which is great.
        The rest is just a matter of using arrays, looping, making a UI and so on.

        By the way, there is a small bug in the GameState BP of the DA starter pack, surely due to using old code. The AddPaintedCell and RemovePaintedCell don't take a location as an input, instead they take a CellData which has to be built from the location like this:
        Click image for larger version

Name:	CorrectionGS.jpg
Views:	1
Size:	83.7 KB
ID:	1599850

        So after fixing this i just had to find the static AddPaintCell and everything was all right, i'm going to have to save and replicate the PaintedCells array.

        Now i have a last question.
        The UGridDungeonToolData also contains 2 others arrays that are used in the Editor Paint Mode: Rectangles and Borders.
        But i don't see any way to use them in the UGridDungeonModelHelper.
        Did you put any AddPaintedRectangle, RemovePaintedRectangle, AddPaintedBorder and RemovePaintedBorder functions somewhere else, or do i have to write my own functions and loop over the rectangles/borders to call the AddPaintedCell/RemovePaintedCell for each cell in the rectangle/border ?

        Thanks and regards
        Cedric

        Comment


          Hi,

          I got everything working fine, UI, replication, saving and all and i'm very happy with it :-) For the moment i only use the PaintedCells array, Rectangles and Borders are not necessary at the moment.

          I still have one problem though. Marker Emitters don't seem to work identically on painted cells and on "regular cells" (generated randomly).

          Here, on the left is a room generated randomly and on the right a manually painted room.

          Click image for larger version

Name:	PbCornerCenterEmitters.jpg
Views:	1
Size:	201.9 KB
ID:	1600829

          Both use the same CornerEmitter and RoomCenterEmitter, but as you can see, on the left the objects are correctly grounded while on the right the objects are levitating.

          The table at the center is exactly 1/2 GridCellSize above the ground, and the objects are corners are 1 GriCellSize above the ground.

          It might be a problem in my code, i'll continue to search/test, but apart from that my painted cells are perfectly placed horizontally and vertically.
          If you have any idea...

          Thanks !
          Cedric

          Comment


            Hey Ali,

            I finally used some ugly workaround in my various emitters, like flooring the Z value of the cell rectangle if the cell is used defined. Not pretty but it works well given that i don't understand where is the difference between generated and painted cells.

            So now my players can create/delete room and corridors cells (using the CellType EGridPaintToolCellType::Room or EGridPaintToolCellType::Corridor). Great ! The more i use DA the more i'm amazed by what can be done with it !

            Now i'd like to give the possibility to forbid the filling of a cell (like in negation volumes) at runtime.

            I saw there is an enum EGridSpatialCellOccupation which proposes exactly that.
            But it's not part of the PaintedCells properties, is it possible to use it at runtime anyway ?
            It would be nice to have a third Cell property in FGridToolPaintStrokeData, something like CellOccupation with this EGridSpatialCellOccupation enum.

            Or maybe at least add EGridPaintToolCellType::Empty to the EGridPaintToolCellType enum ?

            Thanks
            Cedric

            Comment


              Hi Ali Akbar I downloaded dungeon architect plugin for UE4 (4.18). I installed it manually into it then it get compiled, rebuilt and worked absolutely fine. Now I updated my unreal engine to 4.21.2 now i cannot use it. It shows compilation or rebuilt errors. About 41 errors and 8 warnings. Please help me. Or please any one other coder junkie that can resolve my problem. I will be thankful to him.
              Here is log file-- Log.txt

              Comment


                Originally posted by Llama Del Rey View Post

                I did have a look at it, watched few videos, it's an amazing tool, close to what was used to make the city of Assassins Creed Unity.

                Designing around procedural is extremely tricky and demand a different way to approach the design constraints. In my case I made the choice to have handmade rooms to make sure I have control over the flow, the fun and make sure each room has a different flavor that players will remember. I wish there was a way to use the dungeon flow tool that will spread my rooms among the map and then have pure procedural generated corridors to join them. If you have an idea or want to talk about designing with procedural I'm open to give all the advices that I can.
                Hey Llama Del Rey I'd love to get more feedback. It should be possible to have the rooms connect procedural. Games like Unexplored already do that, I'll explore it in the near future.
                Dungeon Architect | Prefabricator

                Discord Support

                Comment


                  Originally posted by Roponator View Post
                  Issue: "Is On Corner" Selector blueprint node is placing items next to walls and not only corners.

                  1) I created a Selector blueprints
                  2) I'm using the "Is On Corner" blueprint node
                  3) Tried connecting it to either Wall or Ground marker but none works as expected.

                  Any ideas?



                  Please try spatial constraints

                  Dungeon Architect | Prefabricator

                  Discord Support

                  Comment


                    HI anyone plz help. Here !

                    Comment


                      Originally posted by LETTICONION View Post
                      HI anyone plz help. Here !
                      What version does it read inside the launcher? Click on Installed Plugins...

                      Click image for larger version

Name:	tip.jpg
Views:	1
Size:	96.0 KB
ID:	1602836

                      LEGENDS OF EPICA | CS - SPACE ALPHA

                      Comment


                        Originally posted by uced View Post
                        Ali,

                        Silly me, i've got my answer in the quick start guide^^
                        https://www.youtube.com/watch?v=Xor9nxeNoO4

                        Then, do you know what i should save/replicate to remember/share the manual layout ?
                        I going to look through your code in search for an array to save, but if you have the answer it'll spare me some time :-)

                        Thanks
                        Cedric
                        Hey uced
                        I've fixed the compile issues on the blueprint and reuploaded them in the quick start guide. You can grab the painted info from the ToolData of the Dungeon

                        Code:
                        UGridDungeonToolData* ToolData = Cast<UGridDungeonToolData>(Dungeon->GetToolData());
                        ToolData->PaintedCells

                        For reference, the function UGridDungeonBuilder::AddUserDefinedPlatforms uses this

                        Dungeon Architect | Prefabricator

                        Discord Support

                        Comment


                          Originally posted by Roponator View Post
                          I have a bug fix/proposal:

                          In the theme editor the dungeon is actually not fully rebuild, only markers seem to be re-emitted but in case of more complex custom markers this causes an annoying error since the rebuild in the theme editor does NOT equal the dungeon in the "real world" (scene).

                          So it seems that some old data remains which causes the theme editor preview to be wrong/different then when making a full dungeon rebuild by pressing "Build Dungeon" on the Dungeon actor in the world level.

                          This is very annoying since you cannot be sure that the new custom Selector you enabled actually worked as intented.

                          The hacky solution is to close the theme editor and re-open it.


                          Better solution: add this code to the top of the function SDungeonEditorViewport::PerformMeshRebuild:
                          ...

                          Roponator Thanks for the suggestion. I've added a new drop down on the theme editor's viewport that gives you the option to also rebuild the dungeon layout like you mentioned above

                          Dungeon Architect | Prefabricator

                          Discord Support

                          Comment


                            Originally posted by Tazzarian View Post
                            Having a problem when trying to package any project with DA i get this
                            Module.DungeonArchitectRuntime.cpp.obj : error LNK2001: unresolved external symbol __libm_sse2_sincosf_
                            any ideas whats going on?
                            This is a C++ compiler issue that others also got. Please reinstall your VisualC++ to solve this (Click the repair option from Visual studio setup)
                            Dungeon Architect | Prefabricator

                            Discord Support

                            Comment


                              Originally posted by uced View Post
                              Dear Ali,

                              I managed to paint cells from my code.

                              From this:
                              Click image for larger version

Name:	ManualDungeonTestCode.jpg
Views:	1
Size:	30.5 KB
ID:	1599848

                              I got this:
                              Click image for larger version

Name:	ManualDungeonTest.jpg
Views:	1
Size:	40.6 KB
ID:	1599849

                              Which is great.
                              The rest is just a matter of using arrays, looping, making a UI and so on.

                              By the way, there is a small bug in the GameState BP of the DA starter pack, surely due to using old code. The AddPaintedCell and RemovePaintedCell don't take a location as an input, instead they take a CellData which has to be built from the location like this:
                              Click image for larger version

Name:	CorrectionGS.jpg
Views:	1
Size:	83.7 KB
ID:	1599850

                              So after fixing this i just had to find the static AddPaintCell and everything was all right, i'm going to have to save and replicate the PaintedCells array.

                              Now i have a last question.
                              The UGridDungeonToolData also contains 2 others arrays that are used in the Editor Paint Mode: Rectangles and Borders.
                              But i don't see any way to use them in the UGridDungeonModelHelper.
                              Did you put any AddPaintedRectangle, RemovePaintedRectangle, AddPaintedBorder and RemovePaintedBorder functions somewhere else, or do i have to write my own functions and loop over the rectangles/borders to call the AddPaintedCell/RemovePaintedCell for each cell in the rectangle/border ?

                              Thanks and regards
                              Cedric
                              uced I didn't end up using them, instead the tool rasterizes the rectangles and borders down to individual cells in code (loops and adds NxM unique individual cells to the PaintedCells array)

                              You can have a look at the tools on how they do this:

                              Code:
                              DungeonArchitectEditor\Private\Builders\Grid\EditorMode\Tools\GridDungeonEdToolRectangle.cpp [FGridDungeonEdToolRectangle::BuildDungeon]
                              DungeonArchitectEditor\Private\Builders\Grid\EditorMode\Tools\GridDungeonEdToolBorder.cpp [FGridDungeonEdToolBorder::BuildDungeon]
                              Dungeon Architect | Prefabricator

                              Discord Support

                              Comment


                                Originally posted by unit23 View Post

                                What version does it read inside the launcher? Click on Installed Plugins...

                                Click image for larger version

Name:	tip.jpg
Views:	1
Size:	96.0 KB
ID:	1602836
                                Firstly; hi i am very thankful to you that you are helping me.
                                Secondly; the launcher is not detecting the plugin.
                                and here is output from rebuild (VS)--
                                LOG.txt

                                Comment

                                Working...
                                X