Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Your fix for adding flying units worked like a charm, with one minor hiccup. I modified it so that instead of removing edges for impassible terrain, it just made the cost too high for a normal unit to transition. Next I changed the path-finding type to "Ignore Difficult Terrain" and sure enough my "flying units" could travel straight up the side of buildings/cliffs while non-flyers have to walk around. The hiccup occurs if I want to toggle "flying". If my unit takes to the air, or lands it doesn't register the change in path-finding type until I move again. Is there a way I can have it run the logic as if I moved when I toggle flight on/off so the variables are re-initialized without taking a step?

    Comment


      Hello again. This may seem like a simple question but I cannot figure this out.

      Is there a way to check which object is at a certain index in the Grid Manager? What I am trying to do is to have a custom pathfinding that will treat certain kinds of tiles as impassable for units using that pathfinding (Otherwise it is a normal no-diagonal square pathfinding).

      Comment


        Originally posted by Southwind View Post
        Your fix for adding flying units worked like a charm, with one minor hiccup. I modified it so that instead of removing edges for impassible terrain, it just made the cost too high for a normal unit to transition. Next I changed the path-finding type to "Ignore Difficult Terrain" and sure enough my "flying units" could travel straight up the side of buildings/cliffs while non-flyers have to walk around. The hiccup occurs if I want to toggle "flying". If my unit takes to the air, or lands it doesn't register the change in path-finding type until I move again. Is there a way I can have it run the logic as if I moved when I toggle flight on/off so the variables are re-initialized without taking a step?
        Glad it worked! You have to re-run pathfinding if you want to change the pathfinding type of a unit mid-game that has already calculated pathfinding using a different method. So what I would do is to simply rerun the Pathfinding function the moment a unit lands, using its new pathfinding type.

        Originally posted by AxelRantila View Post
        Hello again. This may seem like a simple question but I cannot figure this out.

        Is there a way to check which object is at a certain index in the Grid Manager? What I am trying to do is to have a custom pathfinding that will treat certain kinds of tiles as impassable for units using that pathfinding (Otherwise it is a normal no-diagonal square pathfinding).
        There are a few ways of checking whether an object is at a certain grid index, though which one is most suited depends on what you are doing. The simplest to implement is to get all objects of the class you are interested, loop through each and inputting their locations into the VectorToIndex function in BP_GridManager, checking the outputted index against the index you are interested in. This works fine if there are not too many of this particular object in a map and you do not intend to do so multiple times in the same tick. Since you want to check this for every step during pathfinding this solution is way too slow. In this case you can do what I've done with the Pawn Array. Make a new array for your objects, resize it to be the size of the grid, loop through all your objects and use the VectorToIndex function to SetArrayElements at the correct indexes to references to your objects. Then you design custom pathfinding that checks if this new custom array is empty at any checked index (in the same way I do with the Pawn Array). As a rule when creating a custom pathfinding function the ordering of the branches should be set up from most to least likely branch to fail out, so put this new branch near the end (same as with my branch checking for units).
        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

        Comment


          Originally posted by Monokkel View Post
          Hello there, if you are using units that are not animated you should not use the Unit_Player_Ranged blueprint, but instead make a new child blueprint of the base Unit blueprint and add a mesh. The four example units that are included in ATBTT are just the Unit blueprint with a skeletal mesh and animation logic added. Since you aren’t animating it in any way similar to what I’m doing there it does not make sense to use these.
          Hi I tried this and got some compile errors, not too sure why its not working considering I did what you said to do. The errors are below and heres a screenshot of what I've done, if you need any more information then let me know.Click image for larger version

Name:	2017-03-08.jpg
Views:	1
Size:	653.8 KB
ID:	1124486

          Warning Can't connect pins Unit and Self : Unit Parent Reference is not compatible with Self Reference.
          Warning Can't connect pins Self and Unit : Self Reference is not compatible with Unit Parent Reference.
          Warning Can't connect pins Target and Victim : Self Reference is not compatible with Unit Parent Reference.
          Warning Can't connect pins Victim and Target : Unit Parent Reference is not compatible with Self Reference.
          Warning Can't connect pins Self and Item : Self Reference is not compatible with Unit Parent Reference (by ref).
          Warning Can't connect pins Item and Self : Unit Parent Reference (by ref) is not compatible with Self Reference.
          Warning Can't connect pins Item and Self : Unit Parent Reference (by ref) is not compatible with Self Reference.
          Warning Can't connect pins Self and Item : Self Reference is not compatible with Unit Parent Reference (by ref).
          Attached Files

          Comment


            It seems like you duplicated Unit instead of creating a child blueprint of it. Because of this all of the nodes that assume the unit is of the Unit class are not working. Right click on the Unit blueprint and create a child actor. Then modify this actor how you want.
            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

            Comment


              Originally posted by Monokkel View Post
              There are a few ways of checking whether an object is at a certain grid index, though which one is most suited depends on what you are doing. The simplest to implement is to get all objects of the class you are interested, loop through each and inputting their locations into the VectorToIndex function in BP_GridManager, checking the outputted index against the index you are interested in. This works fine if there are not too many of this particular object in a map and you do not intend to do so multiple times in the same tick. Since you want to check this for every step during pathfinding this solution is way too slow. In this case you can do what I've done with the Pawn Array. Make a new array for your objects, resize it to be the size of the grid, loop through all your objects and use the VectorToIndex function to SetArrayElements at the correct indexes to references to your objects. Then you design custom pathfinding that checks if this new custom array is empty at any checked index (in the same way I do with the Pawn Array). As a rule when creating a custom pathfinding function the ordering of the branches should be set up from most to least likely branch to fail out, so put this new branch near the end (same as with my branch checking for units).
              Your suggestion with a grid-sized array worked for me. And since the layoutit doesn't change mid-game, it also made sense to set it up during set-up. I need to make the blueprint looks nicer now but it works just fine.

              Comment


                How have people using this kit implemented a way to store many pawns? I assume a struct containing all the pawn information needed and a data table, but as I've never really worked with data tables I'm not really sure if this is the best solution. I'm curious as to how anyone has approached this and the strengths and weaknesses of the approach. I myself am aiming to have many pawn characters of which the player can choose to use in each map. My pawns will be quite unique from each other, having their own specific stats and skills.

                Comment


                  Originally posted by Malibu Lizard View Post
                  How have people using this kit implemented a way to store many pawns? I assume a struct containing all the pawn information needed and a data table, but as I've never really worked with data tables I'm not really sure if this is the best solution. I'm curious as to how anyone has approached this and the strengths and weaknesses of the approach. I myself am aiming to have many pawn characters of which the player can choose to use in each map. My pawns will be quite unique from each other, having their own specific stats and skills.
                  I'm doing exactly that. I simply have them all present in the level with a flag marking them as spawner entities which are then taken at startup and stuck into a list provided they meet specific criteria (ie: belong to the player) which can then be selected from by the player to decide who to use in that level. I'm not sure whether this is the best way of doing this, since I will need persistence for their stats later on between levels, and I haven't gotten to the point where I have a save feature, but that's how I'm handling this at the stage of development I'm at.

                  Comment


                    Originally posted by AxelRantila View Post
                    Your suggestion with a grid-sized array worked for me. And since the layoutit doesn't change mid-game, it also made sense to set it up during set-up. I need to make the blueprint looks nicer now but it works just fine.
                    Ok, great! If you later find that you need to make modifications during gameplay this can be done quite easily. Take a look at my Spawn Unit and Spawn Tile functions in the grid manager in that case.
                    Originally posted by Malibu Lizard View Post
                    How have people using this kit implemented a way to store many pawns? I assume a struct containing all the pawn information needed and a data table, but as I've never really worked with data tables I'm not really sure if this is the best solution. I'm curious as to how anyone has approached this and the strengths and weaknesses of the approach. I myself am aiming to have many pawn characters of which the player can choose to use in each map. My pawns will be quite unique from each other, having their own specific stats and skills.
                    I haven’t tried anything like this out yet, but I have given it some thought and I agree that data tables are probably your best bet; at least if you are storing a lot of different units.
                    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                    Comment


                      Originally posted by Monokkel View Post
                      It seems like you duplicated Unit instead of creating a child blueprint of it. Because of this all of the nodes that assume the unit is of the Unit class are not working. Right click on the Unit blueprint and create a child actor. Then modify this actor how you want.
                      Hiya, yes this fixed the compile errors, I now somply have to set it all up the way I want it to play, thanks a bunch!

                      Also is there a changelog of and a way to check the version of ATBTT that I am using in my project??

                      Comment


                        Originally posted by Rob3342421 View Post
                        Hiya, yes this fixed the compile errors, I now somply have to set it all up the way I want it to play, thanks a bunch!

                        Also is there a changelog of and a way to check the version of ATBTT that I am using in my project??
                        Great! Check the second post of this thread for a changelog. The version can be found in the project settings. Or you can look at the Version variable in BP_GridManager.
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          Hey there, I love the tootlkit. Is there a possiblity in the Sci Fi Gamemode to instanly wake the units instead of when they spot me?

                          Ty

                          Comment


                            Originally posted by Nobleactual View Post
                            Hey there, I love the tootlkit. Is there a possiblity in the Sci Fi Gamemode to instanly wake the units instead of when they spot me?

                            Ty
                            You mean to make it behave like the regular toolkit in this regard? That is as easy as deleting the SortPawnsInInitiativeOrder custom event in the event graph of ATBTT_GameMode_SciFi, which makes it default back to the base game mode for creating the initiative array.
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              New tutorial is up! In this video I go through some of the new features in the newest update. For the most part the skill system included in the Jungle Raid example map. Enjoy!

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

                              Comment


                                hi guys
                                thank you for the great work, i bought this pack and honestly i have a little problem...having a map with hexagonal grid, when i try to put a walk on grid, it doesn't attach on it.
                                what could be wrong?

                                Comment

                                Working...
                                X