Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Hi Monokkel,

    I have setup a trap system where if a unit walks over a trap during movement, it hurts the unit. However, if the unit dies during its movement, the game doesn't know how to continue and after leaving the game I get a lot of errors. If it is a player unit that dies, I have a button setup that will allows me to skip that unit's turn, thus allowing the game to continue. However, I cannot use this same approach for the enemy units, for obvious reasons.

    Any suggestions on how to remove a unit during the middle of its move without getting errors because the unit is no longer there and making sure the game automatically removes it from the initiative order and continues to the next turn?

    Comment


      Originally posted by GojiBerries View Post
      [MENTION=4318]Monokkel[/MENTION]:
      Hey man, Ill take a look at it as I think your system sounds really elegant. Thanks for the link and for responding, nice to find helpful peeps
      I hope the solution works well for you. Just happy to help

      Originally posted by Selentic View Post
      [MENTION=4318]Monokkel[/MENTION]

      AI pawns set to pass through friendlies pathfinding don't actually take advantage of that.
      Hmm, works for me. This is something I fixed in the last update, though, so if you are using an earlier version you will need to get and connect the Pathfinding Type variable from the current pawn and input it into the pathfinding functions in the event graph of ATBTT_AI_Controller.

      Originally posted by Mewbits View Post
      Hi Monokkel,

      I have setup a trap system where if a unit walks over a trap during movement, it hurts the unit. However, if the unit dies during its movement, the game doesn't know how to continue and after leaving the game I get a lot of errors. If it is a player unit that dies, I have a button setup that will allows me to skip that unit's turn, thus allowing the game to continue. However, I cannot use this same approach for the enemy units, for obvious reasons.

      Any suggestions on how to remove a unit during the middle of its move without getting errors because the unit is no longer there and making sure the game automatically removes it from the initiative order and continues to the next turn?
      I haven't done any extensive testing, but the following seems to work. In this case I have created a new blueprint actor with a capsule collider set to overlap the pawn channel and have enabled overlap for the pawn channel in the skeletal meshes of the units. Collision should work just as well, come to think of it. I do not get any errors when using this:

      Click image for larger version

Name:	WijIS0E.png
Views:	1
Size:	127.1 KB
ID:	1121221
      Advanced Turn Based Tile Toolkit (Marketplace - Support)

      Dungeon Crawler Toolkit (Marketplace - Support)

      Discord

      Comment


        Originally posted by Monokkel View Post
        Hmm, works for me. This is something I fixed in the last update, though, so if you are using an earlier version you will need to get and connect the Pathfinding Type variable from the current pawn and input it into the pathfinding functions in the event graph of ATBTT_AI_Controller.
        I just tested it in a fresh project, the toolkit in my library is kept up to date right or do I need to update it manually?
        Anime Shading Model - Twitter

        Comment


          Originally posted by Selentic View Post
          I just tested it in a fresh project, the toolkit in my library is kept up to date right or do I need to update it manually?
          You have to delete the content, then download it again. I had to do that to get the latest version.

          Comment


            It should update automatically, but I've had it happen a couple of times before that I would need to delete and re-download, as Mewbits suggested. This bug has been fixed, so I'm not sure what else could cause you to still see it.
            Advanced Turn Based Tile Toolkit (Marketplace - Support)

            Dungeon Crawler Toolkit (Marketplace - Support)

            Discord

            Comment


              Originally posted by Monokkel View Post
              It should update automatically, but I've had it happen a couple of times before that I would need to delete and re-download, as Mewbits suggested. This bug has been fixed, so I'm not sure what else could cause you to still see it.
              I removed my local files, and redownloaded it. The issue is still here.



              It appears they are pathfinding correctly, but they stop prematurely. As seen here with them stopping after two tiles, when there's a clearly open path.

              Last edited by Envieous; 01-12-2017, 11:36 AM.
              Anime Shading Model - Twitter

              Comment


                Okay, I've figured out the issue here. The problem is the Reachable Index Closest To Target function, which assumes units cannot pass through friendly units. This function does not fire if the target unit is in move range, so the bug only appears in cases where a unit which is set to pass through friendly units is not able to reach its desired target and there is a friendly unit between it and its target. I've found a solution that works, but I'll try to think up something more elegant to include in the update. For now you can do this:

                In ATBTT_AI_Controller in the middle of the Select unit and find path comment box:
                Click image for larger version

Name:	YBAbFL9.png
Views:	1
Size:	258.7 KB
ID:	1121251

                The new function from the screenshot above:
                Click image for larger version

Name:	RMXbyWh.png
Views:	1
Size:	222.0 KB
ID:	1121252
                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                Dungeon Crawler Toolkit (Marketplace - Support)

                Discord

                Comment


                  Hey [MENTION=4318]Monokkel[/MENTION],
                  Just been looking at your cover system and I'm just a bit confused as to setting up the cover array, You mentioned that it's a struct with multiple nested arrays. Are they multiple individual structs? or is it a struct with multiple arrays as variables.
                  I think ill be fine with the nodes I just want to make sure that I have the Array done correctly.
                  Regards,
                  G

                  Comment


                    Yeah, I guess I could have ben clearer in the description. The Cover Array consists of an array of structs. Each of these struct contain another array of structs. These structs contain an integer (representing an adjacent tile index) and a float (representing the cover value). Like so:

                    CoverArray [ NestedCoverArrayStruct [ CoverStruct [ Index, Cover ] ] ]
                    Advanced Turn Based Tile Toolkit (Marketplace - Support)

                    Dungeon Crawler Toolkit (Marketplace - Support)

                    Discord

                    Comment


                      Originally posted by Monokkel View Post
                      Hello DasMaeh,

                      online multiplayer is indeed something that I've not attempted to implement yet, as there have been many other features I've prioritized. It is on the list, but it is going to take a while before I'm there. So if you need online multiplayer for your ATBTT TBS game at this point I would suggest implementing it yourself. Something you can do is either messaging user Wisdom-HELLy who has been working on this or contacting user GS_Liam from GameSparks who has said earlier in this thread that he would be willing to help anyone wanting to use the GameSparks multiplayer framework with this toolkit.
                      I've read only now this post.
                      I will try basically to explain how to do this (sorry I cannot give blueprint references or blueprintue right now): Implementing GameSparks needs five steps:

                      1) Connect to GameSparks cloud with your API KEY and SECRET (which are available after create an account on GS website) using the GS UE4 OOTB API
                      2) Authenticate with a valid user on your Game (you need to register a game on GameSparks dashboard console, and then register a user by use a dedicated json request or a no-sql database insert into user collection). Also for this step you can use the OOTB API from GS
                      3) Create some log events on GS Dashboard Console (with Javascript Language and dedicated server API) and give them unique names.
                      4) Put a event listener (resolved by name) layer on a project blueprint (I put all event listeners under ATBTT_GameMode, but you can create the event listeners everywhere in your project).
                      5) Push an event everytime you want to engage the server during gameplay in the blueprint.

                      I will try to make an example for points 3-4-5:

                      3) You create a MOVEMENT_PROPAGATE log event on the GS Console:
                      Click image for larger version

Name:	move_propagate.JPG
Views:	1
Size:	78.2 KB
ID:	1121286

                      with this javascript code:
                      Click image for larger version

Name:	move_propagate_code.JPG
Views:	1
Size:	142.9 KB
ID:	1121287

                      4) You create an event listener using the GameSparks API plugin on Unreal Engine 4 and check if the incoming event has "MOVE_PROPAGATE" name.
                      If this is true, you move the current pawn (which should be same on the two computers) to the index given from the incoming message using the ATBTT framework functions

                      5) Everytime you move a pawn, you have to send the MOVE_PROPAGATE message to the server, pointing the corrent target index of the grid and the opponent GameSparks ID.

                      This is how it works, sorry if I cannot share you a working blueprint.
                      Fantasy Turn-Based Tactical Game
                      STEAM: https://store.steampowered.com/app/9...Arcane_Legacy/
                      IG: https://www.instagram.com/arcanelegacyofficial/
                      FB: https://www.facebook.com/ArcaneLegacy/
                      WEB: http://www.arcanelegacy.com

                      Comment


                        Originally posted by Monokkel View Post
                        Okay, I've figured out the issue here. The problem is the Reachable Index Closest To Target function, which assumes units cannot pass through friendly units. This function does not fire if the target unit is in move range, so the bug only appears in cases where a unit which is set to pass through friendly units is not able to reach its desired target and there is a friendly unit between it and its target. I've found a solution that works, but I'll try to think up something more elegant to include in the update. For now you can do this:

                        In ATBTT_AI_Controller in the middle of the Select unit and find path comment box:
                        [ATTACH=CONFIG]124742[/ATTACH]

                        The new function from the screenshot above:
                        [ATTACH=CONFIG]124743[/ATTACH]
                        Thanks. I'll test this out shortly.
                        Anime Shading Model - Twitter

                        Comment


                          Hi everyone,

                          First off, I want to say thank you Monokkel for putting this toolkit on the marketplace. I'm new to UE4 and I downloaded this toolkit a few days ago and I've been messing around with a lot of the features and I think it'll be a perfect start for what I'm trying to do.

                          But one thing I can't seem to figure out is how would I go about starting with an empty grid and spawning units during play? Basically, I'm trying to make something like Disgaea (for reference, https://youtu.be/SbvUseGdhVY?t=1m35s), where both players each start with a spawner and can pull units from it as the game goes on.

                          Comment


                            Thanks for the rundown on GameSparks, WisdomHELLy. Looks like a great tool. Very useful for anyone thinking of implementing multiplayer.
                            Advanced Turn Based Tile Toolkit (Marketplace - Support)

                            Dungeon Crawler Toolkit (Marketplace - Support)

                            Discord

                            Comment


                              A small update. I've been working a lot on the toolkit lately, particularly AI and have come pretty far. All abilities I've added can now be used by the AI. It took a ton of work, since I've chosen very different types of abilities, requiring completely different AI behavior trees for each one. With six different skills that means six different behavior trees where each is roughly the size of the ATBTT_AI_Controller. There is some overlap in the nodes for each, so I'll want to do some refactoring down the road, but I'll skip that for this update so that I can deliver it quicker. This update is going to be somewhat experimental when it comes to the new Tactical Combat game example. I've kept the blueprints separate from the main toolkit, but I might consider integrating some of the additions into the main toolkit later. I'll be interested in getting feedback from you guys when I drop the update.

                              At the moment I'm tweaking the AI and have two AI teams fight it off. At the moment the AI is way to defensive and they usually end up having a mexican standoff where each team stands still and everyone enters overwatch. As soon as someone from the other team moves they all mow him down. After a while only the ones with the wits to stand still are alive and the game never ends :P I'll try to increase their aggression next.
                              Advanced Turn Based Tile Toolkit (Marketplace - Support)

                              Dungeon Crawler Toolkit (Marketplace - Support)

                              Discord

                              Comment


                                like ur work

                                hi...just saw ur posts and ur expertise in turned based ...i have a few questions of my own that i cant find answers too..i an new in the forums so cant message in private..

                                Comment

                                Working...
                                X