Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Originally posted by Monokkel View Post
    Like you've suggested, a cast is probably not working and is returning 0 (false), which is the first index of the grid arrays. Unfortunately I'm at a conference, and won't be back for a few days, so I can't check it out. By all means try to figure it out before then, but if not you should probably just use 4.7 for now.
    I'll dig around. Just for reference (To save time) - The basic jist is Grid creates the spline and casts to player right? Or is it camera casts to grid that moves player?
    KITATUS
    "Information shouldn't be behind a paywall, It should be free for all!"

    Comment


      You done anymore headway on the Dungeon Crawler features?
      Procedural generation would be really handy

      Comment


        After changing the movement/attack system to AP based, I found that AI units doesn't call Receive Damage after Attack Victim during "Attack on End" phase.
        The effect is that I don't see any attack animation and also the victim unit doesn't suffer any damage.

        That's very strange.

        I don't understand why it happen. Maybe can the "End Move" event triggered before "Attack on End" branch deny any event call or animation?
        Using UE4 debugger I see that it goes on "Receive Damage" event call but it doesn't enter into it if I press Step.

        Any help will be appreciated
        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


          Sorry for being slow in replying to your questions. I was away on a conference for a few days and forgot to bring my laptop charger

          Originally posted by KitatusStudios View Post
          I'll dig around. Just for reference (To save time) - The basic jist is Grid creates the spline and casts to player right? Or is it camera casts to grid that moves player?
          You are correct. The spline is created using the Find Path Within Pathfinding Array function in BP_GridManager, with the end point of the path being an input node. The function only works if there has been generated a CanMoveTo array (meaning the Pathfinding function has been run) and if the target index is within this array. The function finds the path by starting at the end index, looking at the parent of that index in the CanMoveToArray, looks at the parent of that index etc. until the index which was the origin point when Pathfining was called last.

          Originally posted by LDodds View Post
          You done anymore headway on the Dungeon Crawler features?
          Procedural generation would be really handy
          The dungeon crawler example is not my first priority as I'm working on the mobile/2D stuff first, so it won't be done for a while. Procedural generation will in any case be pretty basic in my example, as it will mostly be an example to learn from and build upon. Although it will be some time until I get to work on it, it is actually pretty easy to convert any of the other procedural dungeon examples on these forums to the toolkit. If you use a random dungeon generator that generates tiles/rooms that fit the size of whatever you use as your default tile and you resize the GridManager as appropriate to fit the area of the dungeon you can automatically get the toolkit to work with any dungeon by using the "Auto Height" feature.

          Originally posted by Wisdom-HELLy View Post
          After changing the movement/attack system to AP based, I found that AI units doesn't call Receive Damage after Attack Victim during "Attack on End" phase.
          The effect is that I don't see any attack animation and also the victim unit doesn't suffer any damage.

          That's very strange.

          I don't understand why it happen. Maybe can the "End Move" event triggered before "Attack on End" branch deny any event call or animation?
          Using UE4 debugger I see that it goes on "Receive Damage" event call but it doesn't enter into it if I press Step.

          Any help will be appreciated
          That is indeed pretty strange. I assume you have studied how the blueprint is set up pretty thoroughly? When you call Begin Movement in your custom blueprint, is "Attack On End" set to true? Are you aware that "Attack Victim" is called on the attacker, but "Recieve Damage" is called on the victim? The blueprint is set up so that movement, attacking, damage etc. is independent of animation, so everything should work even if a pawn doesn't have a skeletal mesh. "Attack Victim" is called in the regular toolkit even though "End Movement" is called beforehand. Try studying how things work in the vanilla toolkit, and see what parts of the logic chain your implementation differs. It is hard for me to say more than that without knowing more.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Support thread - Discord)

          Comment


            The strange thing is that "Attack Victim" is called (and so "Attack on End" is surely true) but "Receive Damage" isn't.
            Yes, my implementation differs from the out-of-the-box one, but this situation is quite strange because it seems like UE is not able to call the "Receive Damage" event correctly, because I've put some breakpoints in it but they are never called.

            Honestly I checked that the victim of "receive damage" is correct, but I didn't check for the attacker one. However, I didn't change it, so I don't expect a bug.

            I will dig it out more and let you know if I'll find something, meanwhile, I will try to send you my blueprint implementation with blueprintue.
            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


              Ok, getting the blueprintue version would help me a lot. I would recommend using a print string as well as a break point. In some cases I have noticed break points not working properly when used with a lot of blueprint communications, so use a print string after Recieve Damage is called just to be sure.
              The Advanced Turn Based Tile Toolkit (Marketplace page - Support thread - Discord)

              Comment


                This looks awesome and I would like to use it for an RPG. So I was wondering, can its AI can be swapped out for one written in C++? Perhaps I could make my own AI for each creature type? In Fallout, the creatures moved across the tiles in real time, when there was no combat and switched to turn based during combat. Would that be possible with this kit?

                Comment


                  @Ariegos: The toolkit is modular in design, so swapping out the AI controller with a custom C++ one should be relatively painless if you know how to use C++ with blueprints. The Fallout-style real-time/turn based combo is what I'm planning for my own eventual game, and is certainly possible. When in real time either use regular top down movement like in other real time games, or use my pathfinding with unlimited movement points depending on your needs. Then, when combat is initialized, get the locations of all pawns and populate the grid like I usually do in event begin play. If you allow units to stop between tiles in real-time mode you would also need to move all pawns to the closest tile, using a lerp or similar. So in other words, it takes a bit of work, but is absolutely possible.

                  In other news I'm still working on the 2D-template, which also contains lots of functionality that may be useful for all sorts of turn based games. I've just made a Fire Emblem/Advance wars style vision checking, that finds all possible visible tiles from all tiles you can move to. Since I can naïvely assume that all tiles that can be moved to can also be attacked I only do a vision check from tiles that are at the edge of the movement range, or adjacent to a wall (the same tiles that would be marked with an edge mesh in my last screenshot). This makes it a lot more efficient, but still quite a bit slower than my regular pathfinding/vision check combo. It's still done in less than a millisecond on my desktop for the pictured example, but I hope to make it even faster.

                  One problem with the current solution is that it doesn't work for troops that have a minimum range, as all tiles in move range might not be in sight range. That means that for such units I would have to calculate vision from all tiles in move range to achieve the same result. I'm unsure if I'll be able to find a better solution, though pre-generation of movement/sight will make this a non-issue in games where units follow a predictable turn order.

                  Click image for larger version

Name:	Fi8ZwoC.png
Views:	1
Size:	217.9 KB
ID:	1076365
                  Last edited by Monokkel; 05-14-2015, 09:35 AM.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Support thread - Discord)

                  Comment


                    I'm going to take a dive and see if I can fix 4.8 issues; If I do, I'll splinter off the fixes and ship them your way! If I don't manage to fix it, Then ah well :P
                    KITATUS
                    "Information shouldn't be behind a paywall, It should be free for all!"

                    Comment


                      Originally posted by KitatusStudios View Post
                      I'm going to take a dive and see if I can fix 4.8 issues; If I do, I'll splinter off the fixes and ship them your way! If I don't manage to fix it, Then ah well :P
                      Ok, great, though that really shouldn't be your responsibility. I'm trying to look into it myself, but for some reason the launcher won't let me open the preview. It gets stuck on 45% loaded when I try to begin a new project. I'm hoping I'll solve this soon so I can figure out what needs to be changed.
                      The Advanced Turn Based Tile Toolkit (Marketplace page - Support thread - Discord)

                      Comment


                        Originally posted by Monokkel View Post
                        Ok, great, though that really shouldn't be your responsibility. I'm trying to look into it myself, but for some reason the launcher won't let me open the preview. It gets stuck on 45% loaded when I try to begin a new project. I'm hoping I'll solve this soon so I can figure out what needs to be changed.
                        Hey man, I don't mind helping out! That's why I run KITATUS - It not only helps me, But it helps you and all your customers!

                        Taking a look at face value; If all these warnings are what they think they are; You're in for a MAJOR code re-write for 4.8 ;/ Things like sequences don't run, so you have to do the sequence manually (Which in the case in which you've used them, It's super hard to do)

                        I'm trying to see if I can circumvent these warnings simply; But if not, I honestly don't mind re-building everything for 4.8 for you or at least giving a hand.

                        But don't get worried; There might be something really easy to fix and I'll dig around first !
                        KITATUS
                        "Information shouldn't be behind a paywall, It should be free for all!"

                        Comment


                          Well, you've got me worried alright :P I've done two major rewrites before, and am not exactly looking forward to a third one, but you go gotta do what you gotta do. Thanks a lot for offering to lend a hand, though!

                          Edit: Ok, I've looked at it a bit. Seems like one of the big reasons for bugs is that 4.8 has chosen to connect up a few execution pins to the return nodes inside functions that were not connected before. For instance, this Destroy Spline Mesh function returns after only one segment of the spline mesh has been deleted. The same holds true for all such functions it seems. Deleting these new connections does at least solve some of the problems:

                          Click image for larger version

Name:	EToZsIy.png
Views:	1
Size:	67.8 KB
ID:	1076380

                          Edit 2: It's almost working as before now. Seems like a reference to "self" had become disconnected from Unit_Parent when adding the pawn actor back into the Pawn Actor array after movement, as well as removing it after death. Still a few little hiccups, but it does fortunately seem like no big reorganization will be necessary.

                          Edit 3: Ok, I think I've got everything working as before now. I'll do some more testing to be sure, and will make a conversion guide when I'm confident I've got all the bugs ironed out. I will not be sending the update to Epic, since it's a preview build and the changes would screw up the 4.7 version, but converting should be quite easy for anyone who can't wait to use the new 4.8 features with the toolkit.
                          Last edited by Monokkel; 05-14-2015, 03:55 PM.
                          The Advanced Turn Based Tile Toolkit (Marketplace page - Support thread - Discord)

                          Comment


                            Originally posted by Monokkel View Post
                            Well, you've got me worried alright :P I've done two major rewrites before, and am not exactly looking forward to a third one, but you go gotta do what you gotta do. Thanks a lot for offering to lend a hand, though!

                            Edit: Ok, I've looked at it a bit. Seems like one of the big reasons for bugs is that 4.8 has chosen to connect up a few execution pins to the return nodes inside functions that were not connected before. For instance, this Destroy Spline Mesh function returns after only one segment of the spline mesh has been deleted. The same holds true for all such functions it seems. Deleting these new connections does at least solve some of the problems:

                            [ATTACH=CONFIG]39423[/ATTACH]

                            Edit 2: It's almost working as before now. Seems like a reference to "self" had become disconnected from Unit_Parent when adding the pawn actor back into the Pawn Actor array after movement, as well as removing it after death. Still a few little hiccups, but it does fortunately seem like no big reorganization will be necessary.

                            Edit 3: Ok, I think I've got everything working as before now. I'll do some more testing to be sure, and will make a conversion guide when I'm confident I've got all the bugs ironed out. I will not be sending the update to Epic, since it's a preview build and the changes would screw up the 4.7 version, but converting should be quite easy for anyone who can't wait to use the new 4.8 features with the toolkit.
                            Beat me to it; Haha. I was about to come here after converting to 4.8, sending BP back to 4.7 and diffing them. A guide would be super useful to make sure I've got everything and for everyone else; But great work! Sorry I scared you. Scrolling through the errors, I was like ah daaaarrnnnn :P
                            KITATUS
                            "Information shouldn't be behind a paywall, It should be free for all!"

                            Comment


                              Things I found:

                              GridManager: SetMarkerLocation doesn't copy over all of the connections (Some are unconnected!)

                              Will update this post as I find everything
                              KITATUS
                              "Information shouldn't be behind a paywall, It should be free for all!"

                              Comment


                                Guide to updating to 4.8 (WIP):

                                BP_GridManager:

                                Set Marker Location (function): Delete the bottom "select" node and create a new one. Connect the output from Index To Vector On Grid to the bottom vector input. Split the top input and connect the three floats (X, Y and Z + offset) to the split vector. Set the index to boolean and connect "Use Index" to this bool. Connect the output of the "Select" node to the SetWorlLocationAndRotation function.

                                Create Spline Path (function): Remove the connection between ADD and Return Node.

                                Destroy And Clear Spline Path (function): Remove the connection between Destroy Component and Return Node.

                                Display Path As Spline (function): Remove the connection between Set Start and End and Return Node.

                                Compile BP_GridManager and follow the Yellow exclamation marks to the four Cast To Static Mesh Component issues. In each case, remove the cast and connect the previous input to the cast to the previous outputs from the cast. Connect up the execution pins on either side of the cast.

                                ATBTT_AI_Controller:

                                Make Choice Array (function): Remove the connection between ADD and Return Node.

                                Unit_Parent:

                                End Movement and Update Arrays (red comment box): Connect "Self" to the last "Set Array Element" node. (Edit: it seems this is not enough as the self nodes are disconnected each time the project is saved. This can be mended by casting self through Unit_Parent, though this is an awkard workaround).

                                Recieve Damage (purple comment box): Connect "Self" to the last REMOVE node. Get Index and connect it to the last Set Array Element Node. Remove the input from "Item" in the same Set Array Element Node.

                                Tile Parent:

                                Compile the blueprint and remove the unnecessary cast.

                                Other stuff:

                                Decals no longer seem to accept materials without textures plugged into their opacity. To fix all the Decal_Square decals, make a pure, white square texture and plug it into the opacity of each material.

                                There still seems to be a problem with switching pawns by clicking on them, that removes the current pawn from initiative altogether in some cases. I'll look into it soon.

                                There might be other stuff as well. Please post in this thread if you encounter anything. And again I recommend sticking with 4.7 until 4.8 is out of preview if you want to ensure that there are no bugs.
                                Last edited by Monokkel; 05-15-2015, 05:54 PM.
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Support thread - Discord)

                                Comment

                                Working...
                                X