Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Yeah fair enough, it was just really confusing when it looked like it worked but it didnt :P
    I think making sure the grid manager is on 0 is fairly straight forward so yeah not a big needed thing needed soon but cant wait for your new update!
    I assume projects with your current version will be able to upgrade without issue?

    Comment


      That depends. I have made many significant changes to the core functionality of the toolkit, so I suspect most people who have added a lot to the toolkit will need to spend some time integrating the new update. I will try to mark all changes I make as clearly as possible and discuss them in a video, but it will nonetheless be quite a bit of work if you want to integrate all the new stuff with your own heavily modified project.
      Advanced Turn Based Tile Toolkit (Marketplace - Support)

      Dungeon Crawler Toolkit (Marketplace - Support)

      Discord

      Comment


        Originally posted by Monokkel View Post
        That depends. I have made many significant changes to the core functionality of the toolkit, so I suspect most people who have added a lot to the toolkit will need to spend some time integrating the new update. I will try to mark all changes I make as clearly as possible and discuss them in a video, but it will nonetheless be quite a bit of work if you want to integrate all the new stuff with your own heavily modified project.
        Since I have made a fair bit of changes to the toolkit I'm not going to upgrade my toolkit at least for this project; since it already does what I need.
        Anyway, I find it really nice that you can expand it functionality of your own

        Comment


          Yeah, if you've made many changes it might be more trouble than it is worth to update the toolkit entirely. You can however look through my updates and add any new features you find particularly useful and/or easy to implement into your existing project.
          Advanced Turn Based Tile Toolkit (Marketplace - Support)

          Dungeon Crawler Toolkit (Marketplace - Support)

          Discord

          Comment


            Im changing and adding to some of the AI controller and I now am working on a Wandering AI.
            How could i implement a random direction and moving to their with its move speed?
            Click image for larger version

Name:	RandomMovement.png
Views:	1
Size:	94.9 KB
ID:	1092005

            Comment


              Its possible to pan to the side and go "around the world" like in civilization maps?

              Comment


                @LDodds: Random wandering AI is pretty easy to implement, though it might become more complicated depending on what you want to achieve. I'll give you the simplest solution I can think of, and you can try refining it from there. For this method I use a new array that is not included in the current version on the marketplace, but it is easy enough to implement. In the Pathfinding function we want to add an array that holds the indexes to all tiles a unit can move to similar to the CanMoveToArray. The difference is that we want every index in the array to be an index the unit can move to, unlike in the current CanMoveToArray, which is the size of the grid and thus contains mostly tiles the unit cannot move to. Make a new array of Pathfinding structs and call it Index Can Move To Array and append the Open List to this array after each pathfinding step (in the Pathfinding Function) like so:

                Click image for larger version

Name:	a4kcKlm.png
Views:	1
Size:	156.8 KB
ID:	1092042

                Make sure to clear this array at the beginning of a new pathfinding as you do not want it to carry over to subsequent pathfinding.

                When this is done you can modify the ATBTT_AI_Controller to pick a random index from this array and run the regular AI movement code. Remember that you can only run this after you have done pathfinding for this unit. You will have to decide what conditions you want to be met for a unit to choose to wander instead of doing other behaviors. In my test project I simply linked pathfinding directly to the nodes posted below, causing all AI units to wander every time. It seemed to work well and I hope it will serve as a good starting point:

                Click image for larger version

Name:	AI.PNG
Views:	1
Size:	202.6 KB
ID:	1092043

                @Sulfurize: It should be possible, but I haven't thought up a very good solution yet. I have a few ideas, but nothing I would immediately recommend. I would suggest you hit up Zeustiak on these forums who has been working on a Civilization-style world map using similar methods of storing map info in arrays to what I'm doing. I believe he has managed to do convincing world wrap. Take a look at his amazing Map Generator thread (recommended reading for anyone, really) here!
                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                Dungeon Crawler Toolkit (Marketplace - Support)

                Discord

                Comment


                  Hey there added your suggestion and implemented it, tested it just from pathfinding and found an interesting problem.
                  This only occurs sometimes, but a problem is a problem.
                  My turn order goes - Player - Enemy - Wandering

                  Now after the Enemy turn, the wandering unit searches for any pawns in its range, if not it wanders aimlessly.
                  However sometimes after the enemy has moved and the wandering turn begins, it switches back to the enemy turn and moves an enemy to the same place they had moved in their previous turn again and again in a loop?
                  I feel like you may need more info on this so let me know if you need any screens

                  Comment


                    Hi, I apologize because this has probably been asked before. How do I get the camera to zoom out further?. So far i have been using the default camera when I press play. As I've been building larger maps, I need to be able to see a wider area. I use Unreal 4.8 and that may have caused some confusion because the 1st YouTube video was using 4.7 or earlier.

                    Comment


                      Hi, I got around to watching the destructible mesh tutorial and got it to work which is super cool. However, it only works with the BP grid manager and falls through (as in sinks to the abyss) a custom map. How do I fix is so that the rubble stays?

                      Comment


                        Originally posted by LDodds View Post
                        Hey there added your suggestion and implemented it, tested it just from pathfinding and found an interesting problem.
                        This only occurs sometimes, but a problem is a problem.
                        My turn order goes - Player - Enemy - Wandering

                        Now after the Enemy turn, the wandering unit searches for any pawns in its range, if not it wanders aimlessly.
                        However sometimes after the enemy has moved and the wandering turn begins, it switches back to the enemy turn and moves an enemy to the same place they had moved in their previous turn again and again in a loop?
                        I feel like you may need more info on this so let me know if you need any screens
                        Hmmm, that's pretty strange. I feel like it might somehow be caused by how you have implemented custom factions, but it's very hard to be sure. Try to add some breaks to your code and try to determine exactly when it switches back to the enemy pawn. That way it might be easier to determine exactly what part of the blueprints is causing this.

                        Originally posted by deflip007 View Post
                        Hi, I apologize because this has probably been asked before. How do I get the camera to zoom out further?. So far i have been using the default camera when I press play. As I've been building larger maps, I need to be able to see a wider area. I use Unreal 4.8 and that may have caused some confusion because the 1st YouTube video was using 4.7 or earlier.
                        Hi there. There is a variable for adjusting this, and I apologize that it is a bit hidden away. Open BP_Grid_Camera and change the "scroll roof" variable (I've changed the name to zoom roof in the coming update) to the amount of unreal units you want the camera to be able to scroll to.

                        Originally posted by deflip007 View Post
                        Hi, I got around to watching the destructible mesh tutorial and got it to work which is super cool. However, it only works with the BP grid manager and falls through (as in sinks to the abyss) a custom map. How do I fix is so that the rubble stays?
                        That's probably just your collision settings. Make sure the ground in your custom map has collision enabled and configured correctly.
                        Advanced Turn Based Tile Toolkit (Marketplace - Support)

                        Dungeon Crawler Toolkit (Marketplace - Support)

                        Discord

                        Comment


                          My mistake on that, Actually turns out its the wandering unit that is repeating his turn over and over again.
                          Abit easier to debug and see what the issue is anyway

                          Comment


                            Finally got some time to work on my project again for a few hours. I managed to make a Macro that returns an area of indexes based on the size of an object and which tiles it is over. It has a few constraints such as the object needs to be centered on it's scene component. It also uses the object's bounds so it might not be ideal for all objects.

                            Once I get the blue print cleaned up I will share it maybe someone can make it run better. Or at the very least other people can use it for their projects.

                            Comment


                              I know it is not super clean but here is the basics of it. It takes the Transform and Bound vector of an object as well as the Grid Manager Ref. Since the bound is a positive number and the registration point is in the middle of that it needs to be divided in half to get the positive and negative value. Subtract that from the location to get the lowest value edge. Multiply the bound size by 2 and divide by the tile size this gives you the number of passes on both x and y. Run it through nested loops. Subtract 1 from the index and multiply that by the tile size add that to the lowest edge. Put it all back into a vector and run the VectorToIndexInterface to get the index. Add it to a temp array and then return the temp array at the end.

                              It is a lot of basic math nods with connecting wires running everywhere I did my best to use Knots to keep the flow clean. If someone sees a better way to do this I would love to have a look at it. However I know this is something that I think will be very helpful so I am hoping others will find it useful as well.

                              Click image for larger version

Name:	Macro1.PNG
Views:	1
Size:	223.3 KB
ID:	1092258
                              Click image for larger version

Name:	Macro2.PNG
Views:	1
Size:	192.2 KB
ID:	1092259
                              Click image for larger version

Name:	Macro3.PNG
Views:	1
Size:	163.0 KB
ID:	1092260

                              Comment


                                @LDodds: Ok, great that you figured it out! Is it working now or do you still need assistance?

                                @Anzak: That's really awesome! I'll try to implement it myself when I have the time and give feedback
                                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                                Dungeon Crawler Toolkit (Marketplace - Support)

                                Discord

                                Comment

                                Working...
                                X