Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    I've zipped up the project so you can check it out. It's Unreal 4.24, basically straight out of the box from ATBTT. The only change I made was changing Example map's unit DefaultOwningPlayer to 1.

    no linking to marketplace assets allowed.
    Last edited by Nawrot; 02-29-2020, 06:34 PM.

    Comment


      mflux: Please remove your last message, as this is not a PM. Send it to me over e-mail at knuteiliv@gmail.com
      Advanced Turn Based Tile Toolkit (Marketplace - Support)

      Dungeon Crawler Toolkit (Marketplace - Support)

      Discord

      Comment


        Just purchased and have started with your tutorial videos. One thing I noticed though is that in your first video you seem to have a folder structure different from what got imported when I loaded up this framework. I created this project directly from the store page and then opened it, instead of creating a blank project and importing the framework. Is that the cause of the problem, or is this simply due to the fact that the version I have has had the benefit of 5 more years of work done on it?

        Comment


          My bad, link has been removed and sent you a PM.

          Comment


            Originally posted by Calvin_McG View Post
            Just purchased and have started with your tutorial videos. One thing I noticed though is that in your first video you seem to have a folder structure different from what got imported when I loaded up this framework. I created this project directly from the store page and then opened it, instead of creating a blank project and importing the framework. Is that the cause of the problem, or is this simply due to the fact that the version I have has had the benefit of 5 more years of work done on it?
            Hey Calvin, it is the second one of you guesses. At one point I realized that organizing into folders for blueprints, meshes etc. was redundant, because you can do the same thing with filters. I therefore reorganized it in a more project specific manner. The later tutorial videos will use the new structure, but the early ones still use the old one. Let me know if you struggle with finding something. Creating a project directly is the recommended way of starting a fresh ATBTT project, so you did it correctly there.

            Originally posted by mflux View Post
            My bad, link has been removed and sent you a PM.
            So this is quite strange. In the project you sent me I am able to replicate the issues you are having, but not when I create a fresh project, where things seem to be working correctly. There must be one step where we differ in our setup, but I don't know what it is. So to list my precise steps:

            1) In Launcher -> Create Project -> 4.24
            2) In Example Map -> Set DefaultOwningPlayer of one of the player units to 1.
            3) In Play Mode and Play Settings -> Set NumberOfPlayers to 2 and RunDedicatedServer to true
            4) Open the MainMenu map and play in New Editor Window
            5) In Client 1, Host a Game using Connection "LAN", level "Example" and Max Players "2". Press Done.
            6) In Client 2, select Connection "LAN" in the Server Browser and Refresh. Select the session that shows up.

            This is what I do on my end, and replication works fine. There is one error message tied to the MainMenu map and there seem to be some slight shifts on the units' starting positions (nothing like what you are seeing), that I need to investigate. But for the most part everything seems fine.
            Advanced Turn Based Tile Toolkit (Marketplace - Support)

            Dungeon Crawler Toolkit (Marketplace - Support)

            Discord

            Comment


              Thanks for checking that.

              I've upgraded from UE 4.24.2 -> 4.24.3, created a new project using ATBTT, and the problem went away. I'll try to diff the files to see exactly what's different.

              Comment




                I'm able to reproduce it all the time now for some reason. Please see the above video where I create a new ATBTT project from unreal, perform the above steps, and see the error.

                The issue can be reproduced regardless of LAN or Internet in server host.

                Comment


                  Originally posted by mflux View Post


                  I'm able to reproduce it all the time now for some reason. Please see the above video where I create a new ATBTT project from unreal, perform the above steps, and see the error.

                  The issue can be reproduced regardless of LAN or Internet in server host.
                  Annoying that the issue is so erratic. I am working on this, but it will need a bit of investigation, so it might take me some time to solve.
                  Advanced Turn Based Tile Toolkit (Marketplace - Support)

                  Dungeon Crawler Toolkit (Marketplace - Support)

                  Discord

                  Comment


                    Hi there, looking at this system now, can I ask how difficult it would be to create a real time top down controller that switches to the turn based combat system in combats, similar to what divinity original sin 2 does?

                    Comment


                      Hi Monokkel, a couple of days ago we bought your project, it is beautiful and complex)
                      I just recently started working with blunts and still haven’t mastered a lot.
                      Please tell me how you can block the movement of units in certain hexes. The idea of the game is to make a different movement for each unit.
                      Photo for example

                      Comment


                        Originally posted by UberWiggett View Post
                        Hi there, looking at this system now, can I ask how difficult it would be to create a real time top down controller that switches to the turn based combat system in combats, similar to what divinity original sin 2 does?
                        Hi UberWiggett. Slightly to moderately difficult depending on how far you want to go. There is an example map in the toolkit that shows how to transition from a real time third person game to a turn based one and back. You could do essentially the same for third person movement. You can find it in Maps/Experimental/Hybrid.

                        It is a tiny bit hacky, though. For real time top down games you are likely to want to use the Character class as the base for your units, while BP_Unit in ATBTT is a child of the Actor class, which makes Unreal's movement component unavailable for it. In the Hybrid example map I have worked around this by having the BP_Unit blueprint essentially "puppet" a Character child blueprint.

                        This works, but it is probably not what I would have done if I was to redesign the toolkit with a Divinity-style system in mind. If you want to get your hands dirty you could instead reparent BP_Unit to Character. The biggest problem here is that Character is set up so that the center of the actor is at the middle of the skeletal mesh instead of at the feet. This means that you will need to offset the location of the unit by half the size of the Character's capsule component for anywhere where units are placed or moved on the grid, or the units' skeletal meshes will clip through the ground.

                        Up to you!

                        Originally posted by Vital005 View Post
                        Hi Monokkel, a couple of days ago we bought your project, it is beautiful and complex)
                        I just recently started working with blunts and still haven’t mastered a lot.
                        Please tell me how you can block the movement of units in certain hexes. The idea of the game is to make a different movement for each unit.
                        Photo for example
                        Hi Vital, happy to hear you like the toolkit. There are a few ways to work with unit movement in the toolkit. For general stuff that you want to affect all units you can work with how edges (connections) between tiles are set up at startup. This is efficient, but not very flexible. If you need to have many different movement types, your best bet is to expand the ChooseAndRunPathfindingSearchStep function in BP_GridManager. This already contains several custom pathfinding types, which by default can be selected through the PathfindingType variable in BP_Unit.

                        There is already a nested function here which I've made for just this sort of testing. The SearchAndAddAdjacentTilesCustom1 function is a duplicate of the regular SearchAndAddAdjacentTiles function in BP_GridManager, and is for you to modify and play around with. If you need more custom types you will need to add more values to the EPathfindingType enum.

                        To achieve the result in your screenshot can be achieved by adding the following branch to SearchAndAddAdjacentTilesCustom1:



                        Here is a full pastebin of the modified custom function for you to copy. This branch checks the relative location of the tile to be added and the current tile to the relative location of the current tile and its parent tile. If these are the same, it means they lay on a straight line, and we add this tile to the pathfinding.

                        Beware that these functions are run potentially hundreds of times during pathfinding with large movement ranges, so this is the part of the toolkit where thinking about performance and efficiency is most vital. My suggested implementation here is quite inefficient, since it requires looking up and comparing the values of three map elements for each pathfinding search step. This is alleviated in this case by the smaller number of tiles that need to be searched for this particular movement pattern, but try to be as conservative as possible when adding new custom pathfinding types or you might potentially run into performance issues for large movement ranges.

                        Hope that helps! A screenshot of it in action:
                        Advanced Turn Based Tile Toolkit (Marketplace - Support)

                        Dungeon Crawler Toolkit (Marketplace - Support)

                        Discord

                        Comment


                          Awesome reply, way more depth than I was expecting! XD but yeah sounds like i can play with the hybrid example and come up with something. Going to purchase now!

                          Comment


                            Originally posted by Monokkel View Post

                            Thanks I've got a few other projects now that I'm working on in parallel, but I always come back to ATBTT. I feel it is more or less feature complete at this point, but there is always more stuff that can be added in the form of utility functions, gameplay examples etc.



                            Ok, thanks for the explanation. This should indeed be a good fit for the new function. I finished it today. It will be included in the next update (which I'll likely release along with UE4.25), but you can have it now.

                            Here is the main function (pastebin link)



                            First nested function (pastebin):



                            Second nested function (pastebin)



                            The UpdateTilesInRange function works by getting grid indexes in range of a source index and adding them to GridLocations and GridEdges in much the same way as happens for the entire grid during startup. As mentioned, the edges entering into a tile is generally stored in the adjacent tiles, so you need this function to cover a tile area of one tile more in each direction than the GridIndexes you are adding to the grid.

                            If you have not done so already I recommend seeing this video to understand how the toolkit indexes tiles. Let me know if you run into any difficulties.
                            We have not been able to get this working on our end yet. I saw that the 4.25 preview is available. Have you had the chance to get it working in 4.25 yet? I know you said you would not update the toolkit until unreal went to 4.25.

                            Comment


                              Hi Monocles. Thank you very much for explaining and showing how to change the movement system for different units. I managed to make most of the varieties of moving units. But with 2 movements there were difficulties. Please help me. If it’s not difficult for you



                              Comment


                                Originally posted by UberWiggett View Post
                                Awesome reply, way more depth than I was expecting! XD but yeah sounds like i can play with the hybrid example and come up with something. Going to purchase now!
                                Happy to hear that and best of luck Let me know if you run into any difficulties.

                                Originally posted by RTE1984 View Post

                                We have not been able to get this working on our end yet. I saw that the 4.25 preview is available. Have you had the chance to get it working in 4.25 yet? I know you said you would not update the toolkit until unreal went to 4.25.
                                The next ATBTT update won't be out until the full release of 4.25, I'm afraid. My previous suggestions did not solve your problems? What sorts of issues are you seeing now.

                                Originally posted by Vital005 View Post
                                Hi Monocles. Thank you very much for explaining and showing how to change the movement system for different units. I managed to make most of the varieties of moving units. But with 2 movements there were difficulties. Please help me. If it’s not difficult for you



                                Well, these are trickier. I played around a bit, but was not able to reproduce the patterns you are showing (particularly the second is difficult). It is especially hard to work at when I don't understand the underlying logic behind the patterns, and reproducing arbitrary patterns programatically is a challenge. Could you explain the logic behind these? As an aside, I'm very curious what sort of game needs these sorts of movement patterns.
                                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                                Dungeon Crawler Toolkit (Marketplace - Support)

                                Discord

                                Comment

                                Working...
                                X