Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    There are a couple of ways I think you could go at this. The first would be to implement a turn-in-place animation before the unit moves along the spline. This would be a general UE4 thing so you should be able to search for how to do this. However, for ATBTT you would want to make sure you do it as part of the move action (or queue it as a separate action before movement)..
    The turn in place animation is what i was after, as you said queuing it properly before movement i think is the part im not grasping yet, ill go through the tutorials again see if im missing the glaringly obvious. Thanks.

    Comment


      Originally posted by OF-9Task View Post
      The turn in place animation is what i was after, as you said queuing it properly before movement i think is the part im not grasping yet, ill go through the tutorials again see if im missing the glaringly obvious. Thanks.
      The general idea is just to make sure you animate the turning within an action, so that it happens when it is suppose to. It should be fine to do it as part of the move action that already exists in BP_Unit. Before running the normal movement code there tell the unit to turn in place. You will hold off the rest of the movement until that animation is completed. You can signal this using an event dispatcher.
      Advanced Turn Based Tile Toolkit (Marketplace - Support)

      Dungeon Crawler Toolkit (Marketplace - Support)

      Discord

      Comment


        I've just sent a new version of ATBTT to Epic. This version is a major refactor and the largest update this toolkit has ever had. I've put a lot of work into this one and hope it will make it a lot easier for people to modify ATBTT to their needs. With an update of this magnitude there is bound to be a few bugs, so be prepared for a hotfix or two the coming weeks. If you run into any issues, please let me know. I have just made public a video showcasing the major new features of the update. Take a look:



        New features (see my Trello for a more complete list):

        v3.0 (sent to Epic)
        • Refactored action system. Actions are now separate actors. This makes it a lot easier to keep track of actions and enables the manipulation of actions in many new ways.
        • Split units into BP_Unit, for data and game logic and various Puppet actors. Makes the game logic/action distinction less muddied and makes it simpler to for instance use Character actors for units.
        • Moved all UI code from abilities into separate BP_GridUI actors.
        • Moved pathfinding functions into modular BP_Pathfinding objects.
        • Widget-based screen space health bars
        • Hex grid can be generated in a hexagonal shape
        • Mouse look for Grid Camera
        • Simplified splitting movement and interrupting actions
        • General cleanup and refactoring of most blueprints included in the toolkit
        Advanced Turn Based Tile Toolkit (Marketplace - Support)

        Dungeon Crawler Toolkit (Marketplace - Support)

        Discord

        Comment


          Hi again Monokkel. Thank you for your help on my last issue a while back. I also love the new update since everything definitely looks a lot cleaner and easy to use. For now, I have a question about pathfinding using the newest version.

          My question is, is it possible to make the tile costs come from the unit rather than from the tile itself? For example, I would want one unit to be able to traverse water tiles freely while another unit would have a movement penalty on the same terrain. My original idea was to have a struct of integers representing the cost of each kind of terrain within the unit BP and an enum for the terrain type of each tile (forest, water, etc.) in the tile BP. Then I would be selecting the cost based on the tile's enum from the values in the unit's struct within the pathfinding BP. This approach ended up not working though, and I'm not sure if I was just missing something silly.

          I am curious to see how you would implement this kind of pathfinding, as I am a bit stuck.

          Comment


            Originally posted by Munchydo1 View Post
            Hi again Monokkel. Thank you for your help on my last issue a while back. I also love the new update since everything definitely looks a lot cleaner and easy to use. For now, I have a question about pathfinding using the newest version.

            My question is, is it possible to make the tile costs come from the unit rather than from the tile itself? For example, I would want one unit to be able to traverse water tiles freely while another unit would have a movement penalty on the same terrain. My original idea was to have a struct of integers representing the cost of each kind of terrain within the unit BP and an enum for the terrain type of each tile (forest, water, etc.) in the tile BP. Then I would be selecting the cost based on the tile's enum from the values in the unit's struct within the pathfinding BP. This approach ended up not working though, and I'm not sure if I was just missing something silly.

            I am curious to see how you would implement this kind of pathfinding, as I am a bit stuck.
            Hi Munchydo, I thought this question might be of enough interest to other developers that I went ahead and made a video about it. Hopefully this should get you close to what you had in mind:

            Advanced Turn Based Tile Toolkit (Marketplace - Support)

            Dungeon Crawler Toolkit (Marketplace - Support)

            Discord

            Comment


              Originally posted by Monokkel View Post

              Hi Munchydo, I thought this question might be of enough interest to other developers that I went ahead and made a video about it. Hopefully this should get you close to what you had in mind:

              Wow!! Thank you so much for such an in depth answer. This is exactly what I was looking for. The video also gave me a bit more understanding for how the pathfinding works, which will definitely help me in the future.

              We all greatly appreciate the work you put into this project on a daily basis. Thank you for this amazing toolkit!

              Comment


                Originally posted by Munchydo1 View Post

                Wow!! Thank you so much for such an in depth answer. This is exactly what I was looking for. The video also gave me a bit more understanding for how the pathfinding works, which will definitely help me in the future.

                We all greatly appreciate the work you put into this project on a daily basis. Thank you for this amazing toolkit!
                Glad you found it helpful and thanks for the kind words
                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                Dungeon Crawler Toolkit (Marketplace - Support)

                Discord

                Comment


                  Hi Monokkel,

                  I hope you are well. Completly new UE user here with a bit of a question regarding pathfinding in the new version of ATBTT. Reading through the forum I came across a post from back in 2018 in which another user mentioned using a movement planning phase. I know that was a long time ago and that the blueprint has undergone major modifications since then but I was wondering if you could please help me with any insight as to how you would implement that solution using V3.0. I would greatly appreciate it as this is a fuctionality I am trying to create myself based on the BP_Path but with little success so far.

                  That said I wish you a very happy holiday season and end of year.
                  Thanks in advance.

                  Comment


                    Originally posted by B4s1l1sk View Post
                    Hi Monokkel,

                    I hope you are well. Completly new UE user here with a bit of a question regarding pathfinding in the new version of ATBTT. Reading through the forum I came across a post from back in 2018 in which another user mentioned using a movement planning phase. I know that was a long time ago and that the blueprint has undergone major modifications since then but I was wondering if you could please help me with any insight as to how you would implement that solution using V3.0. I would greatly appreciate it as this is a fuctionality I am trying to create myself based on the BP_Path but with little success so far.

                    That said I wish you a very happy holiday season and end of year.
                    Thanks in advance.
                    Hi, things are a bit busy right around Christmas, but I'll try to get back to you on this as soon as I'm able. Could you be a bit more specific in what you are after, though? Are you talking just about selecting multiple points to create a movement path for a single unit (as shown in the gif of the linked post) or are you talking about something more involved, like planning out the movement of all your units beforehand and then having all of them move at once (including or not including the ability to define custom move paths)?
                    Advanced Turn Based Tile Toolkit (Marketplace - Support)

                    Dungeon Crawler Toolkit (Marketplace - Support)

                    Discord

                    Comment


                      Originally posted by Monokkel View Post

                      Hi, things are a bit busy right around Christmas, but I'll try to get back to you on this as soon as I'm able. Could you be a bit more specific in what you are after, though? Are you talking just about selecting multiple points to create a movement path for a single unit (as shown in the gif of the linked post) or are you talking about something more involved, like planning out the movement of all your units beforehand and then having all of them move at once (including or not including the ability to define custom move paths)?
                      No problem Monokkel, I understand Christmas is a busy time of year so please take your time I´m in no rush

                      As to your question though, what I´d like to do is just as you described: be able to select multiple points in order to have more control of the route that unit will take when it moves.

                      I hope this helps understand what I´m trying to achieve. Thanks for all the help and congratulations on this amazing toolkit. As a newcomer to unreal I am having great fun learning my way around the engine with the ATBTT.

                      Comment


                        Originally posted by B4s1l1sk View Post

                        No problem Monokkel, I understand Christmas is a busy time of year so please take your time I´m in no rush

                        As to your question though, what I´d like to do is just as you described: be able to select multiple points in order to have more control of the route that unit will take when it moves.

                        I hope this helps understand what I´m trying to achieve. Thanks for all the help and congratulations on this amazing toolkit. As a newcomer to unreal I am having great fun learning my way around the engine with the ATBTT.
                        Ok, I've managed to put something together now. Sorry for the long wait, but it is Christmas this was a bit of work. This is my first pass. Can definitely be done cleaner, but this should get the job done.

                        All of the custom code is done in a new ability. I created a duplicate of the simple BP_Ability_Move ability to keep things simple, but the same general approach should work for all movement abilities.

                        I modify this duplicate ability in four places. PlayerActivate, ServerInteract, ServerHover and the CheckIfValidTarget function. I've made quite a few changes so screenshotting all of it would be tedious and difficult to read, so here is a pastebin of the three relevant events, and a small one for the CheckIfValidTarget function. I won't describe every last node here, but look through it in combination with my description to see if it makes sense. Let me know if you need clarifications. Note that pastebins like the ones linked can be copy/pasted directly into your event graphs in engine. Much of what is there is default stuff in BP_Ability_Move and only some is custom. You will have to create a few new public variables (the compiler warnings will tell you which).

                        Ok, so what am I doing here. Almost everything interesting is done in ServerInteract, so let me describe it first. The way I want this to work is that the player can right click to set path points and left click to move. So I keep track of the key that has been pressed. If the player clicks the active unit I want to reset the path, which I do by calling PlayerActivate.

                        If the player right clicks I check that the index can be reached and if so I store the GridIndexes of the path leading to the end point as well as the end point itself. I then run a new pathfinding from that point, subtracting the move cost of the path leading up to it. I make sure to clear and display tile markers as appropriate.

                        When the player left clicks I do the same as above, but also pay the move cost and execute movement. One thing I did not include in the pastebin is the ExecuteAbility function, since it is super simple. Here:



                        Ok, so that is ServerInteract. Quite a few nodes, but the general idea is simple. CheckIfValidTarget only has a minor modification compared to the default Move ability. Namely that I return valid if the move cost is 0, which is handled by our custom OwningUnit clicking code instead.

                        ServerHover is pretty straightforward. I generate two arrays of locations. One for the StoredPath from ServerInteract and another for the one from the end of the stored path to where we are hovering. I append them and display the path.

                        Lastly, in PlayerActivate I make sure to clear our new public variables so they are not carried over between turns (the same ability is shared by all units).

                        And there you go:


                        That should hopefully be a good starting point. There are some quirks to this approach that you might want to tweak. For instance you can run in circles over your own path if you want to, but what you want to do here is as much a question of game design as it is coding:



                        Hope that helped!
                        Advanced Turn Based Tile Toolkit (Marketplace - Support)

                        Dungeon Crawler Toolkit (Marketplace - Support)

                        Discord

                        Comment


                          Hi again Monokkel,

                          Thanks so much for the in depth explaination and attached pastebins. I´ve been able to implement the solution and it´s working without any errors. I truely appreciate all the help and support especially over Christmas holidays. Take care and have a great end of year.

                          Comment


                            Hey everybody, and specifically Monokkel. I'm wondering if someone could point me in the right direction to find information for how to implement the cover and overwatch systems

                            Comment


                              Originally posted by B4s1l1sk View Post
                              Hi again Monokkel,

                              Thanks so much for the in depth explaination and attached pastebins. I´ve been able to implement the solution and it´s working without any errors. I truely appreciate all the help and support especially over Christmas holidays. Take care and have a great end of year.
                              Thanks and happy to hear that! Good luck on your game.

                              Originally posted by Krymz1n View Post
                              Hey everybody, and specifically Monokkel. I'm wondering if someone could point me in the right direction to find information for how to implement the cover and overwatch systems
                              You need to add the cover component to the GridManager for the cover system to be activated. BP_GridManager_Advanced has it added by default (as well as the stealth component, which are the only ways it differs from the base GridManager).

                              To have the cover system affect the game you'll have to make use of it in your abilities, though. I'd take a look at BP_Ability_Laser and do a blueprint search for the places where it references the cover system component. That should hopefully give you an idea of how to make use of it.

                              As for overwatch, all you need is to add the overwatch ability to your units and it should work.
                              Advanced Turn Based Tile Toolkit (Marketplace - Support)

                              Dungeon Crawler Toolkit (Marketplace - Support)

                              Discord

                              Comment


                                Hi guys , i already discussed the topic with Monokkel on his discord channel but he asked me to repost it in the thread .so here it is =)...

                                My goal is to make the movement controlled over a chat command system . so i need to generate a grid in range of 1 or 2 around the actor that diplays a subgrid showing a standard "abc-123" grid .
                                and if a chat command says for example A5 the actor moves to this location .
                                it doesnt need to be a a set of fresh tiles to be generated . just something like the existing highlighting grid in range but with a coodinate system that never changes visually for the player .and doesnt change position but rotation on camera rotation .

                                something like that :
                                Click image for larger version  Name:	grid example.PNG Views:	4 Size:	616.9 KB ID:	1848028

                                . then i want Twitch-chat or something like it to vote on the tile to move to from within the blue ones
                                and then i want to create a new move range around the moved to location and repeat the process..

                                in this case 1A would be 1003 . so if a chat vote says 1A the actor moves to 1003.



                                thanks in advance and hopefully this was clear enough .




                                sry for my bad english

                                Last edited by Domsndom; 01-02-2021, 06:53 AM.

                                Comment

                                Working...
                                X