Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Thank you Monokkel. That's great news about the former ssi folks making a new game. I also appreciate the willingness to help, I have seen you post several times helping people.

    Comment


      I try my best Let me know if you have any questions.
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        Originally posted by Monokkel View Post
        Happy to help

        I got a question by a user by e-mail that I think other users might also be wondering, so I'm posting my answer here. He was wondering whether it was possible to make it so that diagonal movement is 50% more costly than straight movement on a square grid. Here is my answer:

        The easiest way to do this is to make the cost of straight movement 2 and the cost of diagonal movement 3 and then doubling the movement attributes of all units. Here is how you can add this in the Generate Gameplay Grids function in BP_GridManager:

        [ATTACH=CONFIG]93701[/ATTACH]
        Hello,

        I tried this tip for increasing the cost of diagonal movement by 50% and it work perfectly but only on the first level of the grid. The units move now twice further on the higher levels. How can I adapt this for a multi-level grid ?

        Thanks in advance
        Last edited by Bounit; 06-20-2016, 02:59 AM.

        Comment


          Totally forgot about how edge costs are set separately for higher levels. These costs are set in the Add Viewport Terrain To Arrays function in BP_GridManager. Generally what you need to do is to double the cost each time a cost is set within that function. I will not be home until tomorrow so I cannot show you exactly what you need to change at the moment. If you do not manage to achieve the desired result by doubling all cost variables in Add Viewport Terrain To Arrays by tomorrow I will show you using screenshots.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Yes I figured it should be on the "add viewport terrain to arrays" but didn't saw a reference to the cost (I checked your blueprint video on youtube but there is a lot of changes since this vid). I'll have a second look, I'm new in UE4 and sometime, BP can be a little bit mazy.

            Thanks for the help

            Comment


              Originally posted by Monokkel View Post
              Totally forgot about how edge costs are set separately for higher levels. These costs are set in the Add Viewport Terrain To Arrays function in BP_GridManager. Generally what you need to do is to double the cost each time a cost is set within that function. I will not be home until tomorrow so I cannot show you exactly what you need to change at the moment. If you do not manage to achieve the desired result by doubling all cost variables in Add Viewport Terrain To Arrays by tomorrow I will show you using screenshots.
              I tried yesterday to find were to set the costs in the function but was not able to achieve it. Your screenshots could be a big help for me

              Comment


                Hi again, I have access to my computer now. Little wonder you had trouble figuring this out yourself, as it was quite a bit more complicated than anticipated. In the Gameplay Grids function it is very straightforward to identify which edges are diagonal and which are straight, but at a later point this is more tricky, as the Edge Array does not distinguish between various forms of edges. There are many ways to determine this, however, so it is definately doable, but takes a bit more work than just doubling the edge costs set in the graphs. You just need to alter one macro, though, which is the Get Edge Cost from Z difference macro. Here is how to alter it so that it sets the edge costs of all straight edges to 2 and all diagonal edges to 3:

                Click image for larger version

Name:	LfMQCZj.png
Views:	1
Size:	361.6 KB
ID:	1108765

                Here is the original for comparison:

                Click image for larger version

Name:	0QY9eLr.png
Views:	1
Size:	258.6 KB
ID:	1108766

                Since this modification alters the inputs of the macro you will also need to connect the index of the parent tile instead of the Z height of the parent tile every place the macro is used. It is used three times in Add Viewport Terrain To Arrays. You can easily find all three by right clicking the macro in the MyBlueprint tile and selecting Find References.

                This seems to do the trick. Hope that helps!
                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                Comment


                  Thank a lot ! I'll try this as soon as I can

                  Comment


                    It work perfecly, thanks a lot man, you're da man

                    One last thing : Do I need to also change something in the "tile parent" BP (in the "make edge cost int array" function?) ? I double the edge costs of the "tile_cost 2" (from 2 to 4) but it doesn't seems to do the trick anymore.

                    In any case, thanks a lot for your quick answers
                    Last edited by Bounit; 06-22-2016, 01:56 PM.

                    Comment


                      You should not have to change something in the functions. Doubling the edge costs does seem to do the trick on my end (though you should multiply diagonal edge costs by 3). Like this:

                      Click image for larger version

Name:	dIB7kIq.png
Views:	1
Size:	73.9 KB
ID:	1108903

                      For this result:

                      Click image for larger version

Name:	krFuUdG.jpg
Views:	1
Size:	112.3 KB
ID:	1108904
                      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                      Comment


                        That's really strange, on my hand tiles with cost doesn't work anymore.

                        And it also seems to have an impact on the multilevel : If I don't have a Tile with cost on the edge of my higher level, pawns can just ignore hight and walk from a level to an other.

                        Click image for larger version

Name:	cost2.jpg
Views:	1
Size:	212.1 KB
ID:	1108906

                        Comment


                          That is very strange. It works fine on my end. Can you post screenshots of all three locations of Get Edge Cost from Z difference in Add Viewport Terrain To Arrays so I can see if everything is hooked up correctly?
                          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                          Comment


                            is there a tutorial on the 2d hydra's lair map? I tried to recreate it using my own tile sheet and the character doesn't move!

                            Comment


                              Hello charliepilotti, I plan to make such a tutorial in the future, but have not gotten around to it just yet. There might be many reasons why the character doesn't move. Could you explain all that you have done so far? Is it just the grid manager placed on top of a tile sheet? The first thing I would check is to see if your tiles have collision enabled and are set to block PathTrace. If that does not work, please explain what you have done in a bit more detail and I will try to find the problem.
                              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                              Comment


                                hey man I actually got it working, I hard to restart my editor. Even though I added the path trace to collision it wasn't showing up until I restarted. Another thing I actually had a question about is what use is the dungeom tilemap base? I can't see where it's actually being used, but i'm still new to visual scripting.

                                Comment

                                Working...
                                X