Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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



    Hi Knut! I've been getting more into UE4 specifically for this toolkit - you've made an awesome job. Could you (or anyone else) share me your wisdom when you have the time? I've been watching all your videos and trying to do it myself, but I'm starting to hit some blocks that I don't know how to approach/overcome. I bet these are very very simple questions - I'm a beginner on this, coming more from the 3d art side of things.

    Question 1 - Pic attached Click image for larger version  Name:	image_149480.jpg Views:	1 Size:	395.8 KB ID:	1537845.

    Question 2 - Pic attached Click image for larger version

Name:	question2.jpg
Views:	66
Size:	93.2 KB
ID:	1537955 .

    Question 3 - I noticed that you published a new version of the toolkit on the marketplace, since my launcher suggests me if I want to upgrade the toolkit. How can I quickly compare what version do I have, versus what version is up? No idea for the former, but for the latter, I suppose I could always come here and look for the latest post I can find of you with the update info, unless there is a quicker, more automatic way of doing this...

    Anyway, thanks for your time! And if you think these have already been answered somewhere before, don't hesitate to point me towards it. Cheers, keep up the awesome work dude!
    Last edited by Justo; 10-10-2018, 04:07 AM.
    Artstation | 3D Artist | Krakow

    Comment


      hi justo

      i can only help you with question 1 and 3

      1. i think you can move into the wall because you are using a static mesh wall, if that is the case so you have two option: go to the grid manager and enable the trace for walls option, or you can use the bp_ga_tile (it in the project) this tile have everything set inside(edge cost).

      2. in order to see what version you have just go to project setting in the editor and look you will see project version number. the last version is 1.91

      cheers
      leo
      Last edited by leo bar; 10-10-2018, 04:23 AM.

      Comment


        Hey Leo, thanks for the reply! I was able to find the Project Version thanks to you, awesome. And as for finding the latest log of new updates, after Ctrl+Fing "1.91" through the latest page of this thread backwards, I found the post in page 147. I then had the dumb realization Knut handily transcripts all this info into the second post of this thread on the first page. Oh.

        However, Knut, in that changelog I would suggest for you to use hyperlinks to the full post you make later in the thread. Just taking 1.91 alone as an example, even though you correctly summed up all new features/fixes in the changelog, there's still some cool info you did not include (mainly to not clutter the changelog I would guess) like pictures and your own thoughts on the matter. It's all useful insight. Obviously it's your call though, but I think those few hyperlinks could really help with your documentation.


        And Leo, thanks for your suggestion about Question 1. They are static meshes as you say. I'll try those two options when I get back home and reply back!
        Last edited by Justo; 10-10-2018, 06:32 AM.
        Artstation | 3D Artist | Krakow

        Comment


          Originally posted by Lexx View Post
          Unfortunately this not worck, in this way you can't shoot, enemy unit mark as wall.
          Ah, of course. Sorry, should have seen that one. Ok, then it is going to take a bit more work. Keep the project as per my last suggestion, but make the following changes to the CheckIfTileIsVisibleFromOtherTile function in BP_GridManager (changes are at the end after the line trace). Should hopefully do the trick.

          Originally posted by Justo View Post

          Hi Knut! I've been getting more into UE4 specifically for this toolkit - you've made an awesome job. Could you (or anyone else) share me your wisdom when you have the time? I've been watching all your videos and trying to do it myself, but I'm starting to hit some blocks that I don't know how to approach/overcome. I bet these are very very simple questions - I'm a beginner on this, coming more from the 3d art side of things.
          Happy to hear that! I'll do my best to answer your questions. And thanks leo bar for chipping in.

          Originally posted by Justo View Post
          Question 1 - Pic attached Click image for larger version Name:	image_149480.jpg Views:	1 Size:	395.8 KB ID:	1537845.
          Hmm I think the issue is being caused by your extremely high HeightImpassableCutoff. What this variable defines is the maximum height between two tiles of different height at which a unit can move from one to the other. In your current setup, units can move 1000 unreal units (10 meters) in height between two adjacent tiles. Is this what you intend in your game? I have not tested the multilevel tile system for such extreme cases. In order to ensure that everything works properly you should have HeightImpassableCutoff be as low as or lower than HeightBetweenLevels. If you want to have special cases where unit can move between multiple levels for one single tile move you should add these edges manually. I should probably add a descriptive warning message if someone tries this.

          Question 2 - Pic attached Click image for larger version  Name:	question2.jpg Views:	1 Size:	93.2 KB ID:	1537955 .

          I'm not seeing the same thing you are seeing here. Here I tried to replicate your screenshot and it seems to be working fine:



          Maybe you're rotating the walls instead of choosing different actors for west, north etc? The wall tiles block directions based on the values in their EdgeCosts variable and not based on their mesh. If you want walkability to be based on collision I recommend doing what leo bar suggested and enable TraceForWalls, which will remove edges between tiles that has something blocking the WallTrace trace channel placed between them. You can always combine this with using Tile blueprints, but be mindful of how they work.

          Originally posted by Justo View Post
          Question 3 - I noticed that you published a new version of the toolkit on the marketplace, since my launcher suggests me if I want to upgrade the toolkit. How can I quickly compare what version do I have, versus what version is up? No idea for the former, but for the latter, I suppose I could always come here and look for the latest post I can find of you with the update info, unless there is a quicker, more automatic way of doing this...
          Like leo said, you can check in the project settings. As for finding more exact changes I tend to mark the most important changes with an unconnected boolean variable named after the version it was added (which you can find by using the "Find in blueprints" window. Like you discovered I describe the general update notes in the second post of this thread. I go into a bit more detail on my Trello, which is also linked to in my first two posts.

          Originally posted by Justo View Post
          Anyway, thanks for your time! And if you think these have already been answered somewhere before, don't hesitate to point me towards it. Cheers, keep up the awesome work dude!
          No worries! I should really make a tutorial at some point about working with all the procedural heightmap/wall stuff. I agree that it is not all intuitive.

          Originally posted by Justo View Post
          However, Knut, in that changelog I would suggest for you to use hyperlinks to the full post you make later in the thread. Just taking 1.91 alone as an example, even though you correctly summed up all new features/fixes in the changelog, there's still some cool info you did not include (mainly to not clutter the changelog I would guess) like pictures and your own thoughts on the matter. It's all useful insight. Obviously it's your call though, but I think those few hyperlinks could really help with your documentation.
          Thanks for the suggestion. As mentioned, the Trello gives a bit more information than the changelog here, but I'll consider adding some links to posts in the future.

          Edit: Impressive Artstation, by the way. Great work!
          Last edited by Monokkel; 10-10-2018, 10:56 AM.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Hey Knut, thanks for your reply, rich in details too. You were spot-on on all problems haha - Q1 was indeed being problematic because of the HeightImpassableCutoff value, and in Q2 I did rotate the walls around like a silly goose.

            This led me to try and solve another issue in my map, which was a narrow zigzag staircase. The player would often be able to cut through it directly, without needing to climb it bound by the laws of gravity. After rewatching your video on multilevels, I was able to complete this! I'm very interested in hearing if you have any other ways to tackle areas like it:
            Click image for larger version  Name:	Q4.jpg Views:	1 Size:	60.5 KB ID:	1538282

            AFAIK, unless I change the geometry, this is the easiest way to lay out this area, right? Height Impassable Cutoff NEEDS to be higher than 150, or else normal units wont be able to walk from the H(height)75 tile to the H225 tile. And the walls are needed too, so that the unit doesnt cut through any tiles.

            Also...
            1) Since it's all connected, does the grid manager official take this all as 1 level, height-wise? Basically ignoring the "Height Between Levels". If it was set to 74, these would be technically 7 levels?
            2) For some reason, if I input 150.1 in my Height Impassable Cutoff value, it defaults to 150.100006.
            3) About your explanation on Height Slow Increment here...If I understand correctly, all it's doing is taking up more Move points from the unit if its condition is met, right? For example: HSI value is 89, and a unit is able to move 5 tiles. If it chooses to move to a tile that is 90 units higher, that tile will "cost" 2 Movements, so in total that unit would only move 4 tiles during that turn?

            Thanks again for any reply! And Im glad to hear you liked my artstation haha (:
            Last edited by Justo; 10-11-2018, 10:02 AM.
            Artstation | 3D Artist | Krakow

            Comment


              hi knut

              hope you can help me with this one Because i am stuck.

              i hope i can explain in a good way so you will understand.
              1. i made the bp_unit re parent to character and made all The necessary changes, every thing work great.
              2. when i select a unit i press a button to go to third person view where i posses the unit so i can move (all done in the bp_player controller).
              3. when i press another button i can go back to top view and posses the grid camera.
              4. i encounter a problem that after i posses a unit and go back to top view i can not swap between the units anymore and i cant do anything anymore the game is stuck.
              5. i figure the after i posses a unit and and then posses the grid camera back the unit now(owning actor) is no longer Associated with the player controller ( i printed the owning actor).
              6. i made a fix(i thought its a fix) and i set the owner of the unit to player controller after the posses flow. that actually fixed the problem when i play in a stand alone or in the editor view but when i package the game(the package is fine, no error) and run the packaged game The same problem exists and the game is stuck without being able to select a unit or anything.
              (my package game run in single player)

              I think it's something that belongs to a multiplayer or something,I'm really bad at the multiplayer side of thing.
              hope you can help me on that

              thanks in advance
              leo
              Last edited by leo bar; 10-11-2018, 06:03 AM.

              Comment


                Ah, of course. Sorry, should have seen that one. Ok, then it is going to take a bit more work. Keep the project as per my last suggestion, but make the following changes to the CheckIfTileIsVisibleFromOtherTile function in BP_GridManager (changes are at the end after the line trace). Should hopefully do the trick.

                Still not work.
                1)I create a collision box for BP_UNIT. I put set collision Response to channel - range trace - ignore on event Select Actor
                2) I put set collision Response to channel - range trace -block on event End Actor turns.
                3)make the following changes to the CheckIfTileIsVisibleFromOtherTile function in BP_GridManager (changes are at the end after the line trace)
                Maybe it possible do it same think via ability system?

                Comment


                  Originally posted by Justo View Post
                  Hey Knut, thanks for your reply, rich in details too. You were spot-on on all problems haha - Q1 was indeed being problematic because of the HeightImpassableCutoff value, and in Q2 I did rotate the walls around like a silly goose.
                  Good to hear!

                  Originally posted by Justo View Post
                  This led me to try and solve another issue in my map, which was a narrow zigzag staircase. The player would often be able to cut through it directly, without needing to climb it bound by the laws of gravity. After rewatching your video on multilevels, I was able to complete this! I'm very interested in hearing if you have any other ways to tackle areas like it:
                  Click image for larger version Name:	Q4.jpg Views:	1 Size:	60.5 KB ID:	1538282

                  AFAIK, unless I change the geometry, this is the easiest way to lay out this area, right? Height Impassable Cutoff NEEDS to be higher than 150, or else normal units wont be able to walk from the H(height)75 tile to the H225 tile. And the walls are needed too, so that the unit doesnt cut through any tiles.
                  Yep, you got it right. If you do not enable TraceForWalls this is the way to do it. However, with TraceForWalls enabled you have some other options as well. You could then skip having the invisible tile actors and instead use a single invisible wall mesh for each "level" of your staircase. An even better option could be to enable TraceForWalls and sett TraceForWallsHeight to something really low, like 5 or 10 unreal units. I think that should automatically give you the result you want without having to add any invisible walls (so long as the staircase itself blocks WallTrace). How TraceForWalls works is that it runs a line trace between each tile and its connected neighbors checking the WallTrace channel, removing the edge if it is blocked. It goes from the center of one tile to the center of the other, offset by TraceForWallsHeight. If you set this value low enough it will be blocked by a small height difference when there is a sudden drop, but not if it is a smooth incline. This may or may not work with the way you plan to make your level as a whole, but it should work well for what you've shown me so far. Test it out and see if it does what you want.

                  Originally posted by Justo View Post
                  Also...
                  1) Since it's all connected, does the grid manager official take this all as 1 level, height-wise? Basically ignoring the "Height Between Levels". If it was set to 74, these would be technically 7 levels?
                  As an optimization measure when I first made the heightmap system, the toolkit will never add more levels than needed. More specifically, a tile will only count as a being at a higher level (meaning that is has a grid index higher than GridSizeX * GridSizeY) if there is one or more walkable tile directly beneath it. In your screenshot above this means that all tiles will be at the same level, as far as the Grid Manager is concerned.

                  Edit: Just noticed the stairs lead to the top of a bridge. So all tiles will not be on the same level. The tiles that are directly above the walkable tiles below the bridge will be at level 2. If you want to see this for yourself, enable PregenerateGameplayGrids and ShowTileIndexes. You will see that all tiles at a higher level will have a grid index equal to the tile below them + GridSizeX * GridSizeY. Just remember to disable PregenerateGameplayGrids later, as any changes you make to the grid after checking this will not go into effect before it is disabled.

                  Originally posted by Justo View Post
                  2) For some reason, if I input 150.1 in my Height Impassable Cutoff value, it defaults to 150.100006.
                  That is just a rounding error that comes with floating point values. It is based on how such values are stored in memory. Integers will always be exactly what you set them to, but floats will be a tiny bit imprecise. I recommend reading an introductory course in C++ if you want to understand this more fully. It should not matter for your game though. UE4's blueprint nodes are generally set up to take this into account.

                  Originally posted by Justo View Post
                  3) About your explanation on Height Slow Increment here...If I understand correctly, all it's doing is taking up more Move points from the unit if its condition is met, right? For example: HSI value is 89, and a unit is able to move 5 tiles. If it chooses to move to a tile that is 90 units higher, that tile will "cost" 2 Movements, so in total that unit would only move 4 tiles during that turn?
                  Yep, basically movement cost equals height difference divided by HeightSlowIncrement. If you never want height difference to affect movement cost, just set it to be as high as HeightImpassableCutoff.

                  Originally posted by Justo View Post
                  Thanks again for any reply! And Im glad to hear you liked my artstation haha (:
                  No worries

                  Originally posted by leo bar View Post
                  hi knut

                  hope you can help me with this one Because i am stuck.

                  i hope i can explain in a good way so you will understand.
                  1. i made the bp_unit re parent to character and made all The necessary changes, every thing work great.
                  2. when i select a unit i press a button to go to third person view where i posses the unit so i can move (all done in the bp_player controller).
                  3. when i press another button i can go back to top view and posses the grid camera.
                  4. i encounter a problem that after i posses a unit and go back to top view i can not swap between the units anymore and i cant do anything anymore the game is stuck.
                  5. i figure the after i posses a unit and and then posses the grid camera back the unit now(owning actor) is no longer Associated with the player controller ( i printed the owning actor).
                  6. i made a fix(i thought its a fix) and i set the owner of the unit to player controller after the posses flow. that actually fixed the problem when i play in a stand alone or in the editor view but when i package the game(the package is fine, no error) and run the packaged game The same problem exists and the game is stuck without being able to select a unit or anything.
                  (my package game run in single player)

                  I think it's something that belongs to a multiplayer or something,I'm really bad at the multiplayer side of thing.
                  hope you can help me on that

                  thanks in advance
                  leo
                  Hmm, my guess is that unpossessing the unit causes the player controller to lose ownership of it. When a unit is activated, the player controller that owns it is told to activate one of the unit's abilities. Since it does not own the unit anymore it does not receive the message. If you're making a single player game this should be easy to fix. In the event graph of BP_Unit, fins where ActivateAbility is called on the owner of the unit. Replace the owner input with GetPlayerController.

                  You will also need to change the OwnsActor macro in BPML_ATBTT. Either remove all instances of it or set it to always return true if you're lazy (though if you do this you'll need to manually recompile all blueprints that use it due to an annoying quirk of UE4 when it comes to macro libraries).

                  Originally posted by Lexx View Post
                  Still not work.
                  1)I create a collision box for BP_UNIT. I put set collision Response to channel - range trace - ignore on event Select Actor
                  2) I put set collision Response to channel - range trace -block on event End Actor turns.
                  3)make the following changes to the CheckIfTileIsVisibleFromOtherTile function in BP_GridManager (changes are at the end after the line trace)
                  Maybe it possible do it same think via ability system?
                  No, what I suggested should work as I've tested it. It seems I failed to paste on essential node in above, though. Sorry about that. At the very end of the function, if TargetIndex == GridIndex returns false, you should add a return node with Visible set to false. Here is how I personally set up collision to be enabled/disabled in a child blueprint of BP_Unit:




                  Here is how it looks in game:

                  Last edited by Monokkel; 10-11-2018, 07:13 PM.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                  Comment


                    hi knut

                    that fix the problem.....

                    thanks a lot, i was stuck on it for a long time, i think that just in the past hour i manage somehow to get it work in multiplayer - i made a custom event that run on server from which i posses the unit and also after unposses i run another custom event (run on server) that sets the owner to the player controller again. somehow i think its working, but i am not sure.

                    thanks again you helped me a lot

                    cheers
                    leo

                    edit:
                    well your solution didn't fix the problem (i thought it did), but i manage to overcome it by other way.
                    thanks for the help
                    Last edited by leo bar; 10-12-2018, 01:39 AM.

                    Comment


                      Share your solution later if you want Leo, I'm sure it could be useful to others in the future (;
                      Artstation | 3D Artist | Krakow

                      Comment


                        Alright, experiments were made and here I bring my results to you, Knut and friends! Keep in mind that this isn't so much a plead for a fix, but more of "how does this work" kind of questions. The more we know about the inner workings of sth, the better chances we'll have of using the tool to its max capacity. I welcome anyone to comment and enlighten me on this matter:

                        Click image for larger version  Name:	Q5.jpg Views:	1 Size:	581.5 KB ID:	1538835

                        (open image for a larger preview)

                        If I have CheckForWalls enabled, my CheckForWallsHeight needs to be at least over 37.5 for the unit to be able to climb the stairs. However, my unit is able to cut through from tile H525 to the floor above (img B), something which I would not like. If I replace the slope for a sudden drop (img C), top floor is inaccessible. Then I tried making this vertical drop super small (img D & E), and interestingly enough, top floor remained inaccessible. Even more interesting, if the slope is slightly altered in any way (img F), results are the same as C, D & E.

                        1) Why does CheckForWallsHeight need to be at least over 37.5? It makes no sense to me. If the value should be just the height offset between neighbor tiles (the same description as HeightImpassableCutoff afaik), value should be at least over 150.
                        If a line is being traced from center to the next center, should it not be bumping into a wall at tile H525 to tile H600 in img B?
                        2) CheckForWallsHeight overrides HeightImpassableCutoff when TraceForWalls (TFW) is active, correct? If TFW is on, top floor is inaccessible in C & E, whereas if TFW is off, top floor is accessible in those same situations. For this reason, if I planned to have a more complexly modeled map (like, say, model the individual steps in my stairs), perhaps having TFW On would be more trouble than help, don't you agree?
                        3) The ONLY way a smooth slope will override the effects of CheckForWallsHeight is if it is a PERFECTLY interpolated slope? In img F, if I add an edge to the H525 slope and ever-so-slightly incline it downwards, the top floor becomes inaccessible. If it's that specific, and if I'm not missing something else here, I really have a hard time imagining what real-life scenarios such a feature would truly be useful in, unless your map is entirely made of primitive, minimalistic shapes.
                        Last edited by Justo; 10-12-2018, 07:49 AM.
                        Artstation | 3D Artist | Krakow

                        Comment


                          Justo : I think you're partly misunderstanding how TraceForWalls works, but my previous suggestion was anyways not a really good one, and this is not a problem that can be solved entirely with TraceForWalls. I forgot to factor in that going from an upward sloped to a flat tile will mean that there is a heightened center between them, which means using a really low TraceForWallsHeight is not recommended. I knew this from when I developed the system, but forgot about it when answering your question.

                          TraceForWalls is mostly useful in that it eliminates the need for using wall tiles, as you can just use any regular static mesh instead. It also means you are free to rotate any wall you use and the toolkit will remove edges appropriately, as you initially attempted to do with the thin wall tiles.

                          CheckForWallsHeight does not override HeightImpassableCutoff. They are entirely separate systems. HIC compares the height of adjacent tiles against the cutoff and removes edges between the tiles if the height is greater, while TFW runs a line trace between them and removes the edges if it is blocked. They serve separate, though in some cases somewhat overlapping, functions.

                          So, for your stair, here is one way you can utilize TFW to avoid having to place several invisible wall tiles by using two blocking volumes instead. If you were to use a 3D model for your stairs you could even include such collision boxes in the model itself, and you would never have to place invisible walls manually for that stair mesh again:


                          Hope that helps you see the utility of TFW. If you want to see exactly what TWF does I recommend finding the CheckIfValidEdgeCandidate macro in BP_GridManager and set DrawDebugType of the TraceOnGrid function within to WallTrace to ForDuration. Then check PregenerateGameplay to see how the line traces fire:


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

                          Comment


                            Dear all,

                            I have been using the ATBTT to create a school project game.
                            I have been looking the blueprints, however, have not found a way to do what I wish.
                            First is that if you fail and the enemy faction wins, I would like to link the game back to the main menu.
                            Second is how would I link level 1 to a picture that would display for 30 seconds-ish then link that picture to level 2.
                            Third is how to create a main menu that links to the first level, a picture of main menu blueprints included.
                            The last is how would you place a collectable on a level and if you collect it, then in the next level you would gain more health, damage or change the skin of the character.
                            Thank you in advance,
                            Shadow-Obsidian
                            Attached Files

                            Comment



                              No, what I suggested should work as I've tested it. It seems I failed to paste on essential node in above, though. Sorry about that. At the very end of the function, if TargetIndex == GridIndex returns false, you should add a return node with Visible set to false. Here is how I personally set up collision to be enabled/disabled in a child blueprint of BP_Unit:




                              Here is how it looks in game:

                              [/QUOTE]

                              Cool! Almost work Unit which controlled by AI start drive crazy. AI unit run to 0 index tile. Please check it
                              Last edited by Lexx; 10-14-2018, 03:54 PM.

                              Comment


                                Lexx : There is likely still a place in the AI logic that checks for visibility the old way. Search through the nodes in the Assess Ability Value part of BP_Ability for line traces for visibility and modify them as with CheckIfTileIsVisible. If it still does not work, come back to me and I will look into it when I have the time.
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X