Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    #16
    Originally posted by Jon Jones View Post
    This has been updated and has been pushed to live. Everyone that purchased the pack now has the option to update to the latest and greatest.
    Thanks Jon! Much appreciated Camera controls and range tracing should work fine now.
    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

    Comment


      #17
      Originally posted by Gugenheimer View Post
      Love what I have seen so far. I didn't get a chance to dig into it as much as I wanted to before work, but is there a guide or video about setting up custom pawns? It was easy to replace the default mesh but not clear on how to set up the new animation blueprint.
      Hi Gugenheimer. Did not see your post until now. Sorry. Adding new pawns will be one of the next videos I'll make. The simplest solution if you use the default UE4 skeleton is to create a child of the Pawn_Anim_BP_Parent AnimBP. Import any animations you need and create a new blend space for movement if needed. In the anim graph replace the animations under Anim Graph Overrides to choose your own attack, idle/walk/run and death animations. Choose the new animation blueprint as the animation blueprint for your new pawns. Does this solve your problem, or are there other reasons you want to change the AnimBP besides changing animations?
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        #18
        I think the issue is I am not using the default UE4 skeleton but a custom one. I tried retargeting the Pawn_Anim_BP_Parent BP to my skeleton, even tried to test it with the odd animations but it didn't carry over.

        Comment


          #19
          Updated version works as expected. Got through both tutorials without any issues. Looking forward to more, especially the "adding your own meshes" and how to use terrain with your system. Now I have to dig into how to create touch interfaces so I can get this running on an iPad. Cheers,

          J^2

          Comment


            #20
            Originally posted by Gugenheimer View Post
            I think the issue is I am not using the default UE4 skeleton but a custom one. I tried retargeting the Pawn_Anim_BP_Parent BP to my skeleton, even tried to test it with the odd animations but it didn't carry over.
            I tried the same, I managed to get my custom char to play ingame the idle animation from the toolkit, but I couldn't get the movement and attack animations to play as intended (even though everything seems to be set properly in the retargeted animation assets).
            Strange thing is that after the retargeting if I recompile any of the default pawns they stop animating.
            I didn't spend much time on this anyway, I'll keep you updated if I make it work.

            @Monokkel: Don't know if it's a bug or we're not supposed to do that, but if you rotate the grid it only updates graphically to the new position but the path/grid logic will stick to the starting position.
            Last edited by BardicKnowledge; 02-27-2015, 07:14 AM.

            Comment


              #21
              Too bad that you're having trouble adding new meshes. I'll try to finish my videos for on this tonight, which will hopefully clear up any confusion.

              @BardicKnowledge: Well it's supposed to to that in the sense that I have not scripted anything to avoid it from doing that. At the moment I'm afraid you can only move and resize the grid, but not rotate it. I have tried to add support for rotation, but it was difficult to achieve than I predicted. I want to add support for rotation, but I have several other features I want to add before that. Until then I hope you're ok with modifying the rest of the world around the grid if you really need it to stand at a specific angle.
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                #22
                Just to update you, I was able to get the project running on my iphone. Of course, the interface is not functional. Digging in to that now. I assume you have the game mode and controllers in BP_Grid_Manager?

                Also, I noticed something odd.

                Click image for larger version

Name:	Screen Shot 2015-02-27 at 1.45.31 PM.png
Views:	1
Size:	363.4 KB
ID:	1067298

                Why isn't the path being computed as a straight diagonal? Stuck out to me as a little odd...

                J^2

                Comment


                  #23
                  @J.J. Franzen: It's great to hear that you got it running on iphone! I had hoped I had made it efficient enough that it would work, and it's great to hear that it does. I'm still working on some major optimizations for weaker hardware before I officially declare mobile support, though.

                  There aren't really a game mode or controllers per say, but almost everything is handled through the event graph of the BP_Grid_Manager, except for camera control in BP_Grid_Camera and some minor construction script functions in the unit and tile parent classes.

                  I've managed to replicate the error you made a screenshot of. It annoys me that I didn't discover it myself. This happens for every odd tile on the western side of hex maps, and is a result of the pathfinding stopping when it has reached the edge of the grid, while the even rows should really continue the search one step more to the north west and south west. I have just implemented a new way of checking if the pathfinding has reached an edge, by marking all the edges as unwalkable in the edge array. This will get rid of this bug, and also make pathfinding slightly faster still. I'll get the update sent to epic as soon as I'm able. Thank you for making me aware of this issue.

                  As for the people who have been asking me for help in importing their own meshes, I'm afraid I won't be able to make a video about it tonight, but I'll give a quick rundown below:

                  Adding your own tiles:

                  - Import your own mesh as normal
                  - Make sure it has collision if it is not a default grid mesh that shall only be used on the level of the collision plane
                  - Create a child of the Tile_Parent blueprint or duplicate the tile closest to what you're trying to make for less work.
                  - Add your new mesh in the components of the tile. If it is a walkable tile, make sure "path trace" is set to "block" under collision. If the mesh should block visibility set "range trace" to "block".
                  - Parent the imported mesh to "CustomGridAnchor" to enable the possibility of custom grid snapping.
                  - If you want to predictably block visibility in a similar way to the default walls you can add the static mesh SM_Wall as a component, set its collision to block "range trace" and make it invisible. Increase its size to 1.0001 to block sight past corners or 0.9999 to allow it. If you instead use the collision of your own mesh it will block visibility as determined by that specific collision
                  - In the "Edge cost" local variable set the movement costs of entering various edges (north west means entering from the north west. Hex tiles do not make use of the east and west edges). 0 means the edge is impassable. 2 means movement to that tile costs 2 points of movement.
                  - Edit: If the mesh will be instanced (if it is the default grid mesh, one of the "move to" or "in sight" meshes or has "instantiate" set to true) make sure the material it is using has "Used with Instanced Static Meshes" set to true in its material properties.

                  Adding your own pawns with the default UE4 skeleton:

                  - Import your skeletal mesh. In import settings select HeroTPP_Skeleton as the skeleton.
                  - If you want to use the default toolkit animation skip to the next part. If not, read on.
                  --- Create a child of the Pawn_Anim_BP_Parent animation blueprint in animations.
                  --- Import any custom animations you want to use
                  --- for custom attack animations make sure to copy the PunchEnd animnotify from either the Attack_Ranged or Attack_Melee animations and place it at the point of your animation where the attack connects.
                  --- for custom idle/walk/running create a copy of blend_space_melee in animations and replace with your own animations in your animation blueprint.
                  --- for custom death animations you don't have to do anything special
                  --- in the graph tab of your new child animation blueprint select "Asset Override Editor" (under the preview) and replace the idle_walk_run, punch and death animations with yor own
                  - Make a copy of any of the units under blueprints -> pawns. In the components replace the skeletal mesh with your own. Select your own custom animation blueprint as the anim_BP if you made one. If not use either Pawn_Anim_BP_Melee or Pawn_Anim_BP_Ranged.
                  - Set up health, movement, range etc. in the local variables of the graph
                  - You should be good to go!

                  I hope that's enough to help anyone who might be having trouble using their own meshes. I'll be making a video about this as soon as I have the time. By the way, for adding structures larger than a tile you do not have to split them up. Just drag the mesh into the world and place invisible walls where appropriate (located in blueprints->tiles->hex or square).
                  Last edited by Monokkel; 02-28-2015, 06:54 AM.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                  Comment


                    #24
                    Thanks for the update Monokkel, I've always been good at finding bugs. Quick question. I'm in the process just swapping in some of my own meshes and I've discovered something else. Are you forcing a material for the in move range mesh? Example:

                    Click image for larger version

Name:	Screen Shot 2015-02-27 at 5.15.57 PM.png
Views:	1
Size:	449.8 KB
ID:	1067325

                    The movement range should be a solid blue outline, similar to the solid green outline under the pawn. But for some reason, no matter what I set the In Move Range mesh's material to, it always ends up being that transparent blue, M_Blue_Transparent. I've verified this by changing the color of that material, which is NOT assigned to my mesh, and the change I made showed up. If you are overriding the material for that mesh, could you perhaps make it an option to not do so? Unless it's a bug, of course.

                    Cheers,

                    J^2

                    Comment


                      #25
                      @J.J. Thanks for continuing reporting bugs It used to be that I used the same mesh for tiles in move range and sight range and switched its material at runtime depending on what was needed. I switched to using separate meshes later, but this bug is caused by a single node I forgot to delete. I'll send a new update to Epic to fix this.

                      In the meantime, fixing it yourself is really easy. The offending node resides in the "Prepare for pathfinding" function. It's the last node before the return node. Delete it and you should be able to use your own materials. However, make sure that whatever new material you're using has "Used with Instanced Static Meshes" set to true in its material properties or i won't render.

                      Click image for larger version

Name:	TsqBiM0.png
Views:	1
Size:	32.0 KB
ID:	1067332
                      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                      Comment


                        #26
                        Verified fixed! Now if I could just get the dang touch interface working... Cheers,

                        J^2

                        Comment


                          #27
                          I will wait till you get the videos uploaded on adding custom pawns. I looked at the instructions but they are for the default UE4 skeleton. None of my custom assets utilize the UE4 skeleton.

                          Comment


                            #28
                            So I've sent a new version with quite a few bug fixes and some new features to Epic. It will hopefully be on the marketplace soon. I've made the following changes:

                            - Added an option for changing between player pawns when clicking on them. Only works for pawns that have not acted yet this turn.
                            - Added some more variables that are useful for adding gameplay features. These include an "has acted this turn" variable for pawns and a turn counter in the grid manager.
                            - Fixed a bug where tiles in move range would always be transparent blue, regardless of the mesh used.
                            - Simplified the pathfinding by removing checking for edges and instead populating the edge nodes with unwalkable nodes at grid generation. This is easier to read, speeds up the pathfinding slightly and fixes a bug that created suboptimal paths to tiles on edges for hex grids.
                            - Fixed a bug that caused auto generation of walkability based on height to fail if the grid manager was not placed at0 on the Z-axis.
                            - Various minor fixes.

                            Originally posted by J. J. Franzen View Post
                            Verified fixed! Now if I could just get the dang touch interface working... Cheers,
                            Great! I wish you luck

                            Originally posted by Gugenheimer View Post
                            I will wait till you get the videos uploaded on adding custom pawns. I looked at the instructions but they are for the default UE4 skeleton. None of my custom assets utilize the UE4 skeleton.
                            I've just uploaded a video showing how to add your own custom meshes. However I do not show how to add skeletal meshes that do not use the default UE4 skeleton. I apologize for this, but I'm actually unsure if I have found the best way to do this yet, and am reluctant to make a video about it before I have made sure there is not an easier way. Currently you have to make a new animation script and copy over all blueprint nodes and anim-graphs from Anim_BP_parent. Then you have to change all references to the animation blueprint in the grid manager event graph. I'll explore optional ways of doing this in the coming days, and will make a video as soon as I've landed on a solution.

                            In any case I've posted the new tutorial video below. I hope you will still find it useful:

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

                            Comment


                              #29
                              Hi Monokkel,

                              I've finally bought your solution and I have to say that "the source" is very well commented, even if it is not pretty simple to understand everything in a short time (but this depends on the complexity of the system and of course it's not your fault)
                              Anyway, I'm currently finding a way to implement a very simple system of hit/miss situation.
                              Let's say that when ranged unit attacks it can miss the target with 50% probability.

                              How should I modify the blueprint in order to achieve this? I've seen something about the projectile Logic: should I insert the hit/miss logic before projectile starts in order to "simulate" a miss also?

                              Also, I have one important question that maybe can help other developers: it is possibile to have separate blueprints that communicates with your massive one? Can they implement a custom logic that affects the main blueprint logic without modifying it?
                              This because if you continuously update the main blueprint (of course I appreciate that you introduce new features :P) I will lose every customization after every update.

                              Thanks for your support in advance.
                              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


                                #30
                                Hi Wisdom_HELLy,

                                thank you for the kind words. I've tried to make it as intuitive as possible, but some of this stuff is by nature pretty complicated. For understaning the pathfinding better I would recommend reading Amit's great explanation. I'm using something similar to Dijkstra’s Algorithm for the toolkit.

                                It is certainly possible to create separate blueprints that communicate with the Grid Manager, and doing this is a good way to prevent my updates from overriding your own solutions. The easiest way to do this is through the level blueprint. Here is a very simple example level blueprint that finds and display all visible tiles in a range of 5 from the node under the cursor when the player presser "G":

                                Click image for larger version

Name:	mOWTOtp.png
Views:	1
Size:	107.0 KB
ID:	1067394

                                As for creating an accuracy system, the way I would do it is create an accuracy public float variable for the Unit_Parent class (0 being 0% change to hit, 1 being 100%). Then, when I want to check if an attack is a hit, I would get a random float and compare it to the current pawn's accuracy. You could also substract a fraction the distance between the attacker and the target from this (either by measuring the distancedirectly or getting the value from the Range Array). If the random float is lower than the current pawn's accuracy minus the range modifier it would be a hit and you'd go on to dealing damage. For a miss you could instead fire off an appropriate miss animation or launch a projectile in a trajectory that misses the target.
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X