Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    So I finally got my hands on it and have to say this is exactly what I was looking for!

    Only issue I have found is that the game seems to get stuck if the AI cant find a clear path to my character in the 2D game demo.
    - Russell Meakim AKA The Castle
    BLOG: https://steemit.com/@thecastle

    Comment


      Originally posted by Bantichai View Post
      Well I've dived in as deep as I can in regards to the first feature I want implemented which was having both pawns face each other when combat initiates. I've watched your blueprint video too and it's slowly edging me closer to understanding the "attack_victim" event. I know one of the nodes that control rotation is definitely "Find Look At Rotation", I played around a little bit and got some varied results but not what I was looking for. Essentially at this point I'm learning by trial and error as I kind of just want to get a rough prototype level working as soon as possible. However, I'm still stuck haha. I'm having trouble with replicating all the nodes that are associated with rotation and I'm not sure how to link them, I watched the blueprint run while I was testing the game, so I know the general area of nodes that I'm looking for but still struggling to duplicate the nodes.

      As to the second feature I'd like to have implemented, that's completed beyond me. Also if your curious the type of game I'm trying to make is a game similar to The Age of Decadence and Expeditions: Conquistador with maybe a little XCOM thrown in.
      I’ll try to help you along as best I can. Getting one’s head around how blueprints work can take some time. To get an actor to face another you generally just need to get their look at rotation and then modify the rotations of the actors based on the output from the get look at rotation node. From there you just need to make sure you fire the nodes at the correct time. In the toolkit this is done during the attack victim event. If you do the same thing connected up to event tick it will happen every single tick (note that the units of ATBTT have their tick disabled by default). I cannot be sure what you are doing wrong, but if you send me a screenshot I should be able to figure it out.
      Originally posted by Castle View Post
      Honestly that sounds exactly right, then when going into combat mode I simply spawn the rest of the units in my party so to speak and the fighting begins. When leaving combat mode I erase those units and update their stats.
      That is definitely doable. I’ll help you implement the feature if you find it tricky.
      Ok,
      Originally posted by Castle View Post
      So I finally got my hands on it and have to say this is exactly what I was looking for!
      Only issue I have found is that the game seems to get stuck if the AI cant find a clear path to my character in the 2D game demo.
      This is a bug I thought I had fixed in an earlier update, but it seems it is back (though caused by something different). It only happens in the 2D game example, which is quite baffling. It is likely caused by the way the AI controller reacts to the specific layout of the 2D game example map, but I was not been able to figure out the exact cause when I looked at it this morning. I’ll try to find a solution soon.
      Advanced Turn Based Tile Toolkit (Marketplace - Support)

      Dungeon Crawler Toolkit (Marketplace - Support)

      Discord

      Comment


        Ok thanks again! Will see what I come up with.

        Comment


          Originally posted by Monokkel View Post
          That is definitely doable. I’ll help you implement the feature if you find it tricky.
          Ok,
          Honestly outside of this and some cool loot and a tileset this already almost plays how I want it to. I think its pretty cool out of the box. I'll spend some time looking over the blueprints, so far everything seems straight forward-ish. Having SP and abilities that pop up in a menu would be pretty

          Originally posted by Monokkel View Post
          This is a bug I thought I had fixed in an earlier update, but it seems it is back (though caused by something different). It only happens in the 2D game example, which is quite baffling. It is likely caused by the way the AI controller reacts to the specific layout of the 2D game example map, but I was not been able to figure out the exact cause when I looked at it this morning. I’ll try to find a solution soon.
          Ah!

          I wonder if a simple fix would be to skip the turn if the AI simply takes too long to decide.
          - Russell Meakim AKA The Castle
          BLOG: https://steemit.com/@thecastle

          Comment


            Originally posted by Castle View Post
            I wonder if a simple fix would be to skip the turn if the AI simply takes too long to decide.
            Ok, so I figured out the problem. A bit annoyingly I realized that I had already found the reason for this issue. Completely forgot about that in the previous busy months. The problem seems to stem from how UE4 handles child actors. I'm not sure of the exact reason, but calling events on a child actors that belong to the parent actor does not seem to work flawlessly.

            The problem appears when the BP_GridManager_2D calls the Pathfinding_per_tick event (which is contained in BP_GridManager). To fix this one can simply replace the Pathfinding_per_tick parts of ATBTT_AI_Controller with calls to regular Pathfinding functions. This should not have any real impact on performance unless you are making a huge map where the AI units have a huge search range, you run it on very poor hardware and you choose not to nativize the blueprints for some reason. I will probably just change this to be the default in a future update.

            Here is the relevant part of ATBTT_AI_Controller to change, which is at the bottom right of the Choose Target part of ATBTT_AI_Controller's event graph:

            Click image for larger version

Name:	xZ3XbD7.png
Views:	1
Size:	192.6 KB
ID:	1114226
            Advanced Turn Based Tile Toolkit (Marketplace - Support)

            Dungeon Crawler Toolkit (Marketplace - Support)

            Discord

            Comment


              With unreal forums back up again I'd like to ask a few questions. After managing getting the both player and enemy character to turn and face each other on attack, I'm wondering how would I go about implementing "turn in place" animations for when the enemy rotates. I have the "turn in place" animations I would just like some guidance on where to implement such things, would it be a blend space or state machine? I would need to implement both "turn in place left" and "turn in place right" animations, to make the movement realistic.

              My second question and I have a feeling this is already covered in one of your videos which I haven't all watched yet but just curious to know. How would I go about implementing special abilities, like a special attack that plays "x effect". Would that be something I could modify off the "overwatch" feature that you'll be adding in your next update?

              Also how would I go about implementing a hit and miss or % miss chance feature. Once again I do apologise if I'm asking questions that you've covered, if you have just refer me to the video

              Thanks in advance!
              Last edited by Bantichai; 08-28-2016, 09:23 AM.

              Comment


                Hi there, glad to see that the forums are mostly up again.

                Animation isn't something I have spent a ton of time on in the engine, and the one I have implemented is pretty rudimentary, so I might not be the best one to ask, but turn in place animations should be handled with a blend space. You should also be using a state machine to control everything, but the turn animation itself should be contained in a blend space, which should get its input from the state machine. I would recommend Googling for "turn in place animation unreal", as there seem to be many posts and videos discussing this.

                Special abilities is not really something I have covered in my tutorials, though other users have implemented this in ATBTT in various ways. One of the reasons I have not implemented something like this is that special abilities are naturally very varied, and how they are handled will vary a lot depending on what sort of game you are making. Because of this, most people would need to make this from scratch anyway. However I will be implementing one such system in the coming update, which will be close to how it is done in XCOM, with overwatch, explosives, rapid fire etc. There will still be some time until the update is done, however. There are a million ways to implement abilities, but the way I am doing it is creating inidividual ability blueprints that are spawned in the world when an ability is used, that contain all code related to an ability. These actors are deleted after the ability has been used. That is the general idea, in any case.

                For hit and miss chance, this is pretty straightforward. You just need to check the value of a random float against an accuracy value every time an attack is made. Here is a simple solution I came up with when I was asked this question some time ago: https://forums.unrealengine.com/show...l=1#post505675
                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                Dungeon Crawler Toolkit (Marketplace - Support)

                Discord

                Comment


                  Oh good the forums are back!

                  Once I fix the hang on AI that cannot path to a player bug I will be in pretty good shape. I am not worried about performance as I am not really looking into making large levels.

                  Just need to make it so when not in combat and having multiple friendly units that free roaming still toggles on. Once I have that all I need to do is make a special ability system where units can use special attacks at the cost of SP.
                  If I get that in place ill change the graphics and make something with it.

                  Not sure what would be the easiest way to do special abilities though. hmm
                  - Russell Meakim AKA The Castle
                  BLOG: https://steemit.com/@thecastle

                  Comment


                    Thanks for the advice, I'll see what I come up with. Really looking forward to the next update, does that mean you'll be adding an ability bar that holds the overwatch, explosive ability etc etc. I feel that once I see your blueprints, I'll have a better way of implementing my own abilities, will you be making a video with your next update? Also will the AI be able to use those new abilities, like overwatch etc etc.

                    Also with your hit chance blueprint, how did you create the public floats accuracy and dodge?
                    Last edited by Bantichai; 08-28-2016, 07:44 PM.

                    Comment


                      Just to let you know the fix was easy to setup but for some strange reason 1 out of every 10 AI turns the game will slow to an absolute crawl and eventually crash.
                      Last edited by Castle; 08-28-2016, 09:22 PM.
                      - Russell Meakim AKA The Castle
                      BLOG: https://steemit.com/@thecastle

                      Comment


                        Sorry for the delayed response. I did not recieve an e-mail notification about the replies.

                        Originally posted by Castle View Post
                        Once I fix the hang on AI that cannot path to a player bug I will be in pretty good shape. I am not worried about performance as I am not really looking into making large levels.
                        You probably wouldn't have to worry about performance in any case, and even if you were to make a game that would have performance issues because of huge move ranges etc. that should no longer be a problem after nativizing blueprints.

                        Originally posted by Castle View Post
                        Just need to make it so when not in combat and having multiple friendly units that free roaming still toggles on. Once I have that all I need to do is make a special ability system where units can use special attacks at the cost of SP.
                        If I get that in place ill change the graphics and make something with it.

                        Not sure what would be the easiest way to do special abilities though. hmm
                        I'm not entirely sure what you mean with free roaming toggling on with multiple friendly units. Can you tell me exactly what you are trying to achieve and what is preventing you from doing so? Special abilities can be done in a few ways. As mentioned my plan is to have a new actor class containing the blueprints controlling the special abilities, and creating child actors of this blueprints for each specific ability. When the ability is used I would spawn this invisible actor in the game, run the code, and remove it afterwards.

                        Originally posted by Bantichai View Post
                        Thanks for the advice, I'll see what I come up with. Really looking forward to the next update, does that mean you'll be adding an ability bar that holds the overwatch, explosive ability etc etc. I feel that once I see your blueprints, I'll have a better way of implementing my own abilities, will you be making a video with your next update? Also will the AI be able to use those new abilities, like overwatch etc etc.

                        Also with your hit chance blueprint, how did you create the public floats accuracy and dodge?
                        I do indeed plan to make a video when I'm done with the update. But again note that there is still a lot of work left before the update is done. I intend to have the AI utilize the abilities, though getting them to use the abilities effectively will be a challenge.

                        As for creating public floats for accuracy and dodge, what I would do is create a duplicate of one of the four base units and have this be the parent blueprint for all your units. Add the floats as public variables to this unit.

                        Originally posted by Castle View Post
                        Just to let you know the fix was easy to setup but for some strange reason 1 out of every 10 AI turns the game will slow to an absolute crawl and eventually crash.
                        That is disconcerting. I will have to look into it and see if I can replicate it.
                        Advanced Turn Based Tile Toolkit (Marketplace - Support)

                        Dungeon Crawler Toolkit (Marketplace - Support)

                        Discord

                        Comment


                          Originally posted by Monokkel View Post
                          Sorry for the delayed response. I did not recieve an e-mail notification about the replies.
                          Its np, I have been going over yoiur blueprints a lot and have learned quite a bit on my own. I have answered most of my own questions already. For example how to make enemy characters have aggro ranges and when and how to set free roam on or off depending on what is happening in game play. So far its working great!


                          Originally posted by Monokkel View Post
                          You probably wouldn't have to worry about performance in any case, and even if you were to make a game that would have performance issues because of huge move ranges etc. that should no longer be a problem after nativizing blueprints.
                          Originally posted by Monokkel View Post
                          That is disconcerting. I will have to look into it and see if I can replicate it.
                          Sadly in the 2d game if an AI is unable to reach its desired destination and its only option is to move closer it pretty much causes the game to hang from the slow down. However this not a problem, like you say, when in the standard blueprint. So I decided to work with that version for my neat fun little project.

                          Originally posted by Monokkel View Post
                          I'm not entirely sure what you mean with free roaming toggling on with multiple friendly units. Can you tell me exactly what you are trying to achieve and what is preventing you from doing so? Special abilities can be done in a few ways. As mentioned my plan is to have a new actor class containing the blueprints controlling the special abilities, and creating child actors of this blueprints for each specific ability. When the ability is used I would spawn this invisible actor in the game, run the code, and remove it afterwards.
                          I have the free roaming part already figured out now! I have it working exactly how I want and wasn't even that difficult to be honest. You did a great job with this blueprint setup!

                          If you are already planning to do special abilities then you pretty much will have done 80% of the work for what I want to do. That's crazy!

                          If you are familiar at all with Disgaea, being able to have abilities that are centered around the caster or allow you to point to locations. If the abilities have unique patterns and stuff like that then. Then the template is pretty much already a game, it just needs graphics, levels sound and a HUD basically. I mean I have no trouble hooking up the stats and damage system at that point.
                          - Russell Meakim AKA The Castle
                          BLOG: https://steemit.com/@thecastle

                          Comment


                            I have a question.

                            When spawning new units do I need to do anything special to make sure they appear on the grid correctly?
                            - Russell Meakim AKA The Castle
                            BLOG: https://steemit.com/@thecastle

                            Comment


                              The issues with the 2D game example are very strange. It seems like there might be some inherent issue in Unreal Engine with child actors would be difficult to fix. I'll keep searching for a workaround, though. In any case I would recommend basing your own game on the regular BP_GridManager and modifying it as you see fit.

                              Good to hear you were able to get free roaming working for all units. It is not something I assumed would be difficult, so it is good to hear there are no unexpected issues.

                              I'm not really familiar with Disgaea besides knowing it exists. If what you are thinking of are area attacks such as cones, lines etc. it is absolutely possible to implement, but I will probably just add a simple square explosion for the next game example.

                              When spawning new units you need to make sure they are added to the Pawn Array in BP_GridManager at the index corresponding to their location. I have made a couple of functions for doing this easily. You can find the Spawn Unit and Move Unit on Grid functions in BP_GridManager under the utility section of the functions.
                              Advanced Turn Based Tile Toolkit (Marketplace - Support)

                              Dungeon Crawler Toolkit (Marketplace - Support)

                              Discord

                              Comment


                                Originally posted by Monokkel View Post
                                The issues with the 2D game example are very strange. It seems like there might be some inherent issue in Unreal Engine with child actors would be difficult to fix. I'll keep searching for a workaround, though. In any case I would recommend basing your own game on the regular BP_GridManager and modifying it as you see fit.

                                Good to hear you were able to get free roaming working for all units. It is not something I assumed would be difficult, so it is good to hear there are no unexpected issues.

                                I'm not really familiar with Disgaea besides knowing it exists. If what you are thinking of are area attacks such as cones, lines etc. it is absolutely possible to implement, but I will probably just add a simple square explosion for the next game example.

                                When spawning new units you need to make sure they are added to the Pawn Array in BP_GridManager at the index corresponding to their location. I have made a couple of functions for doing this easily. You can find the Spawn Unit and Move Unit on Grid functions in BP_GridManager under the utility section of the functions.
                                I am no stranger to limitations with blueprints and this sounds like yet another example. I had an entire first person shooter with over 30 unique weapons fiz out on me for god knows why this year. Be very careful when working with structs and parent child relationships. That stuff breaks down quick.

                                So far working with your blueprints has been pretty easy. My next goal is to figure out how to setup agro ranges where mobs that are placed in the world can wake up and activate combat mode where free roam is toggled off. So basically if they see an enemy unit they are added to initiative order and combat mode persists until all active enemies are dispatched. I might just use line traces, I think the 2d example game has a basic example of this.

                                Seems like spawning units is pretty straight forward.

                                Honestly the only thing left would be accessing a menu to select and activate unique abilities with cones, lines and patterns. With that being functional the rest seems pretty basic. Hard thing about abilities though is the AI needs to understand how to use defense and healing abilities. RIP trying to get that in a functional state.
                                - Russell Meakim AKA The Castle
                                BLOG: https://steemit.com/@thecastle

                                Comment

                                Working...
                                X