Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Originally posted by behappyandsm1le View Post

    Hey, hope everything is well

    I've been working with the toolkit on a full time basis and been really enjoying it. Have been trying to get all the easier tasks for my project done this week while you were away.

    If you're back, I would love to revisit the two questions you said wished you were home for.

    1) Attackable objects on the corners of square tiles. In my case, these objects only need to be attacked when a Unit is within the 4 adjacent squares that the corner object resides on. So we might be able to use collision to our advantage somehow. However, I will need to have the objects belong to the factions (Player, Enemy, Faction 3) both for the aura effects i mentioned on their 4 adjacent squares and because any object that doesn't belong to your faction will need to block pathfinding for movement and abilities (in this regard, I'm happy to have my Units only be able to move 1 square at a time if that makes everything significantly easier).

    2) Selecting multiple Units to be able to attack together/add their damage together for a single attack. This is also a case where range isn't an issue, the Units only need to be able to attack adjacent enemies and adjacent corner objects.

    Anyways, i'm more than happy to spend a lot of time trying to get it right, looking forward to continuing to work on it
    Hey, all is well and I'm back home. The next three weeks are going to be pretty busy, as I have a lot of catching up to do on work after my vacation, but at least I now have access to my computer

    I had some fun testing out options for your first questions. Did not make anything complete, but this should hopefully be helpful to you. I made some pegs in the corners of tiles and an ability that can be used to hammer down any single peg clicked or hammer down all four surrounding pegs if a tile is clicked. Here it is in action:


    So how does it work? Well, first I made a peg actor (BP_GA_CornerTower). It is a child of BP_GridActor to enable grid snapping and automatically setting a GridIndex variable. For components it has a static mesh cube scaled to look like a pillar with a blue material. It is parented to the GridAnchor and offset by 100UU in the X and Y axes. The pillar blocks Visibility and no other channels in its collision settings.

    At the start of the game this actor adds itself to the GridObjects array in BP_GridManager. It also implements the BPI_Interact interface, which is used by the grid manager to interact with objects in the GridObjects TMap. It has custom events for hovering and ending hovering which changes its material and an event for getting hammered into the ground, which is also called if an interact interface event is called (Pastebin):



    Next I made an ability that can be used to interact with the above pillars. It is based on BP_AbilityBase instead of BP_Ability, as BP_Ability has a lot of stuff in it which is mostly useful for unit based abilities, which is not needed here.

    This ability basically checks if there are any pillars under the cursor when hovering or clicking. If yes it highlights them (for hovering) and hammers them (for clicking). Hovering or clicking a pillar also prevents the regular grid hovering and interaction code from running. If the player clicks a tile instead of a pillar it will interact with the four surrounding tiles corresponding to the surrounding pillars and hammer them down through GridObjects interaction (Pastebin):



    Lastly I added a way to activate this ability by pressing a key (Just a simple way to test it):



    Hope this gets you on the right track. I'll see if I have the time to look into multi-unit selection some other day.

    Edit: forgot to include the GIF I mad if it in action:

    Last edited by Monokkel; 09-04-2019, 11:49 AM.
    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

    Comment


      Hey everyone, seems like Epic have rolled out a new review system for marketplace assets! Finally I can get notifications when people leave comments on the asset page. Comments have also been split into reviews and questions. I still prefer people to use this forum thread for questions, though, as it is still not possible to include screenshots etc. in the questions section.

      The only downside to the new marketplace is that all previous comments on the toolkit have been hidden from view in a "View Legacy Comments" section. Currently it looks pretty sad



      I think it would be great if new interested developers had at least a few reviews to read through while considering a purchase. If any of you following this thread have previously made a "legacy comment" that can easily be copied in as a review, or if you want to write a new one that would be appreciated. No pressure, of course, but for those of you in the mood for reviewing I thought I'd let you know about the new review tab

      In other news I've played around with creating a hybrid Real Time Third Person/Turn Based Strategy mode. I'll probably include this in the Experiemntal folder for the next update. I got inspired by Dan.Ott 's project and wanted to see what I could cook up. Still a ways to go, but what I've got is already pretty fun, I think. Take a look!



      Locoweed: Now that I'm back I've tried to replicate the issue you were reporting with the turn not ending if the final unit is AI controlled and has remaining action points. The way I tested it was to duplicate the JungleRaid map, use a single Player unit and and enemy AI controlled unit. I set bUseEndsTurn of BP_AbilityLaser to false and increased Current and Max Action Points to 4. I reduced the health of the player so he could be killed by a single shot. The Enemy Faction Wins message shows up correctly when I test it out like this. If you're still seeing the end game issue in the latest version of the toolkit, could you give me the exact repro steps to reproduce the issue in a fresh project?
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        I'm doing a posting hattrick here, but I just had to share. UE4.23 is out and they lined up the connections between impure compact nodes! Biggest improvement in Unreal Engine's history IMO:

        Click image for larger version

Name:	LinedUp.png
Views:	13
Size:	158.9 KB
ID:	1660690

        I'm going through every function and event graph and lining up all the things!
        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

        Comment


          Hey Knut,

          Apologizes for a simple question but where is the damage being calculated and store for the units. I've been trying to figure it out through the Take Damage Function of the BP_Unit but i couldn't find where the health and damage variables were.

          Thanks, Eagle.

          Comment


            Originally posted by Monokkel View Post

            Hope this gets you on the right track. I'll see if I have the time to look into multi-unit selection some other day.
            Thanks man, really appreciate the in depth responses. It's been a very good starting point to build in the functionality!
            Originally posted by EagleEyeGamma View Post
            Hey Knut,

            Apologizes for a simple question but where is the damage being calculated and store for the units. I've been trying to figure it out through the Take Damage Function of the BP_Unit but i couldn't find where the health and damage variables were.

            Thanks, Eagle.
            I'm not sure if this fully answers your question, but in the details panel of BP_Unit's editor you can find and tweak a bunch of attributes including damage down in the Config>Attributes tab. Otherwise if you drag it into the viewport, it is also editable there by selecting it and going under Config>Attributes (i think that functionality is called being instance editable)

            Comment


              Originally posted by EagleEyeGamma View Post
              Hey Knut,

              Apologizes for a simple question but where is the damage being calculated and store for the units. I've been trying to figure it out through the Take Damage Function of the BP_Unit but i couldn't find where the health and damage variables were.

              Thanks, Eagle.
              No need to apologize as it is not completely straightforward, since the answer depends on the ability. BP_Ability_MoveAttack and BP_Ability_Attack get their damage value from the Damage public variable in BP_Unit (like behappyandsm1le said). These abilties were designed with the sort of game in mind where each unit has a single attack, so it makes sense to store the damage variable on the unit. In contrast, BP_Ability_Laser and BP_Ability_Explosive were designed for games where each unit might have multiple different damaging abilities. As such, damage for these abilties are defined in separate Damage variables within each ability.

              Originally posted by behappyandsm1le View Post

              Thanks man, really appreciate the in depth responses. It's been a very good starting point to build in the functionality!
              Happy to help!

              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                hi knut

                i am working on the movement part, and I am using the experimental part of the toolkit. I have some problem I hope you can help me with.

                so at first i used the code as it is (in my project) and didn't change it, but I get strange behavior as so:

                1. when I move my character to a ladder to climb he is doing everything as needed but when he gets to his final tile on top and stop, then he Disappear for a moment and then pop back into the grid (to the last tile) from above like he spawned there. any idea what could be the problem?

                2. in the animation of climbing the ladder there is a unclean transition (a liitle jump) from the climb loop to the climb end?

                3. I want to add special edges to all my fence so the character know he can jump over it. I do not want to place them as an actor( I have a lot of them) so I thought to make another trace for that but I don't know if will be better to make it as a new function or just extend a already working function like the the Adds edges from a tile to neighboring tiles for multi-level grid . what do you think is the better approach for that?

                thanks in advance

                leo
                Last edited by leo bar; 09-05-2019, 06:07 AM.

                Comment


                  Originally posted by leo bar View Post
                  hi knut

                  i am working on the movement part, and I am using the experimental part of the toolkit. I have some problem I hope you can help me with.

                  so at first i used the code as it is (in my project) and didn't change it, but I get strange behavior as so:

                  1. when I move my character to a ladder to climb he is doing everything as needed but when he gets to his final tile on top and stop, then he Disappear for a moment and then pop back into the grid (to the last tile) from above like he spawned there. any idea what could be the problem?

                  2. in the animation of climbing the ladder there is a unclean transition (a liitle jump) from the climb loop to the climb end?
                  Specifically the ladder climbing animation is the least elegant part of the toolkit at the moment. The animation I'm using is unfortunately not a perfect loop, which causes the small jump. I'm sure it is possible to work around it through animation transition lerping etc., but animation is admittedly not my strong suit. I will try to revisit the climb animation at some point, but I'm open to input from users more used to UE4 animation in the meantime.

                  Originally posted by leo bar View Post
                  3. I want to add special edges to all my fence so the character know he can jump over it. I do not want to place them as an actor( I have a lot of them) so I thought to make another trace for that but I don't know if will be better to make it as a new function or just extend a already working function like the the Adds edges from a tile to neighboring tiles for multi-level grid . what do you think is the better approach for that?

                  thanks in advance

                  leo
                  Hmm, I probably wouldn't be using the function for adding edges for this, if I understand you correctly in that the fences are purely aesthetic and don't affect pathfinding. Using actors is the simplest way, but I can understand that you'd want to steer away from that if you have a lot of fences. If performance is the reason you don't want to use actors you could use fence actors in editor, where the fence meshes are editor only and have a function at startup loop through all the fence actors and place ISMs on each of them instead of fence meshes. Using collision and traces is another way, of course. I'd probably make a new channel and set it up similarly to how I do things in the cover system component.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                  Comment


                    hi knut

                    thanks for the answer, i will try to work on an improve animation and will let you know if I have something better.

                    the fences are not purely aesthetic , they are used as cover and can be jump over by the character.

                    but the biggest problem I have ( I cant progress because of it ) I wrote you on no -1 (you probably didn't notice it). I will be glade if you can help me with this one.

                    cheers

                    leo
                    Last edited by leo bar; 09-05-2019, 11:12 AM.

                    Comment


                      That hybrid third person/turn based mode just knocked me out of my chair this morning. I would love dig into that!

                      Comment


                        Originally posted by leo bar View Post
                        hi knut

                        thanks for the answer, i will try to work on an improve animation and will let you know if I have something better.

                        the fences are not purely aesthetic , they are used as cover and can be jump over by the character.

                        but the biggest problem I have ( I cant progress because of it ) I wrote you on no -1 (you probably didn't notice it). I will be glade if you can help me with this one.

                        cheers

                        leo
                        Sorry, I assumed question 1 and 2 described the same issue. I'm not sure I undersatnd what you meant in question #1. If you're using the experimental ladders perhaps you haven't moved the 3D widget appropriately to sit over the tile at the top of the ladder?

                        Originally posted by Methosborgoff View Post
                        That hybrid third person/turn based mode just knocked me out of my chair this morning. I would love dig into that!
                        Good to hear! You won't have to wait long, as I've included it in the next update, which I'm sending to Epic today. It is a tiny bit hacky, but it works. I've included it in its own "Hybrid" folder in the Experimental folder.
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          Just wondering if you could point me in tge right direction for a teleport strike. The way I have it now breaks the unit, causing it to show up on the edge of the map and be unable to attack or take damage after the ability is used.

                          Comment


                            Originally posted by QuixoticTheKid View Post
                            Just wondering if you could point me in tge right direction for a teleport strike. The way I have it now breaks the unit, causing it to show up on the edge of the map and be unable to attack or take damage after the ability is used.
                            Depends on what you mean by teleport strike. What precisely are you trying to achieve and what are you currently doing? Teleporting to the edge of the map indicates that you are interpreting a function that returns false as a grid index, causing it to return index 0 (which is at the edge of the map)
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              hi knut

                              ok in order to be more clear on my problem here is the steps I did :

                              1.started a new project
                              2. copy all the code of the move to segment, QueueMoveSegment function and simulate move (override) into the bp_unit_unim.
                              3. place the unit on the grid with a ladder (the 3D widget appropriately sit over the tile at the top of the ladder ).
                              4. move my unit - the result is in the gif below:


                              Click image for larger version  Name:	giphy-2.gif Views:	1 Size:	343.7 KB ID:	1661980

                              so I got lost what have gone bad there, didn't change anything

                              also if you use the experimental movement you have to make sure your grid manger location is at zero,if not you get wrong placement. is there a way to change it? I need my grid not to be on the 0,0,0

                              cheers

                              leo

                              Comment


                                Originally posted by leo bar View Post
                                hi knut

                                ok in order to be more clear on my problem here is the steps I did :

                                1.started a new project
                                2. copy all the code of the move to segment, QueueMoveSegment function and simulate move (override) into the bp_unit_unim.
                                3. place the unit on the grid with a ladder (the 3D widget appropriately sit over the tile at the top of the ladder ).
                                4. move my unit - the result is in the gif below:


                                Click image for larger version Name:	giphy-2.gif Views:	1 Size:	343.7 KB ID:	1661980

                                so I got lost what have gone bad there, didn't change anything

                                also if you use the experimental movement you have to make sure your grid manger location is at zero,if not you get wrong placement. is there a way to change it? I need my grid not to be on the 0,0,0

                                cheers

                                leo
                                Ok, thanks for clarifying. Seems like I forgot to correct for the location of the grid in the experimental unit's SimulateMove function. Here is a version of the function where I've corrected for the grid's transform.

                                Less certain about your other issues, though, as I'm not able to replicate them. Do they still appear if you use BP_Unit_Anim_Ex instead of your own custom unit? Also, what is the precise height of the box the unit is climbing and where have you placed the ladder blueprint's 3D widget?
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X