Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    BTW, I'm having a strange issue where the unit parent is failing to get the grid manager, game mode and so forth. I haven't touched that part of the blueprint, and I just don't understand how a simple "get all actors of class" could fail.

    Comment


      Hmm, "get all actors" should work fine. Are you getting an array of all the actors and geting the actor on index 0? That should normally do it. If you are using a class reference to get all actors from, make sure that its default value is not 0.

      For finding the distance between tiles this is something that is actually not in the current version of the toolkit. It will be in the next update, which should hopefully be done next week. Here is the function for getting the distance (in tiles) between two tiles using either hexagons or a square grid with or without diagonal movement:

      Click image for larger version

Name:	83lKmlN.png
Views:	1
Size:	304.8 KB
ID:	1095011
      (Here is the pastebin of the same graph)

      For equipping wepons and similar this is something that will also be included in an example game in the coming update. The solution I have found is a bit clunky, though, so there might very well be better solutions. It works pretty okay, though. I have created a weapon class that holds the appearance, damage and range of a weapon. This is a 2D roguelike example so I'm using a paper sprite for the appearance, a float for damage and an integer for range. My custom hero unit in this example has a variable that holds its current weapon (of the weapon class). When the unit deals damage it gets the damage variable stored in this weapon variable. When the unit changes its weapon it runs this function:

      Click image for larger version

Name:	VVhZwiA.png
Views:	1
Size:	103.7 KB
ID:	1095012

      This might be different from what you have in mind, and please tell me if it is and I'll try to help you further along.
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        You were right, somehow the defaults had been reset. Strange.

        The range finding works perfectly, finally got my hit chance calculations working. Thanks.

        As for weapons, I figured that the easiest solution would be to just change the range and damage, but that only seems to update at the start of each turn?

        Comment


          Ok, great to hear you got it working! Yeah, my solution for weapons might be a bit much in many cases. Changing damage and range should work well. Damage should not be problematic to change at any point as it is only checked when doing an attack. Attack range however is checked only at the start of a unit's turn or when it has completed its move. If you want to change range in the middle of a unit's turn you would have to call the Activate Unit function in ATBTT_player_controller again after you have changed the range variable.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            So that worked, but I encountered a weird issue where if I have a range of 1 and try to do a diagonal attack after moving the unit it will simply do nothing and end its turn. However, if it has not moved it will teleport to index 0 and attack from there.

            Comment


              Hi again. Sorry for taking so long to reply. For some reason I did not get an email notification about the new reply this time. I have added something I think is similar to what you have done and I am not able to replicate your problem. Teleporting to index 0 is something that can happen if parts of the pathfinding returns 0 for some reason. Can you try to use my simple solution and check if you are still having the same issue? This is what I have added to ATBTT_PlayerController for testing purposes:

              Click image for larger version

Name:	1K41cyu.png
Views:	1
Size:	119.1 KB
ID:	1097180

              This simple blueprint in ATBTT_PlayerController switches the current unit's range and damage between two arbitrary values each time '1' is pressed and reactivates the unit. The execution pin going off to the right is connected to the "Set Current Tile Hover" part of "Display Path on Hover" to ensure that the spline showing the movement path to the target/ranged attack path is changed if appropriate.
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                Hi Monokkel!

                I just bought the Toolkit two days ago and am trying my best to unravel its many mysteries! I'm an artist and level designer with no real aptitude for programming, but I bought your kit because I want to use it as the basis for a grid-based-movement system in a first-person VR game. The idea is that you'd toggle a widget cursor in the center of your 3D view by hitting X on a gamepad, then you'd look at the in-range tile you want your player to move to and click A to warp there (either instantly, or by racing along the spline path at a player-defined speed without acceleration.)

                I have a theory that I can dismantle the top-down camera, parent it to a socket on the Unit_Player_Melee pawn's neck and then make him invisible. I haven't gotten that to work yet, as there is a lot of complexity in how the camera operates. Also, I'd like the player to be able to advance one grid square in any direction just by clicking the D-Pad. Have you considered VR as a use-case for your Toolkit? Do you have any suggestions for how I could accomplish this? Thank you for this awesome kit, and for your consistent efforts to make it cooler and better!

                Comment


                  So I'm finally done with the 1.5 update! This one took a very long time to make, so I hope you guys will like it. It is the biggest update I've done until now, both in terms of new features and reorganization. Still some of you might think that is a smaller update than what you would expect from the amount of time I've spent on it.

                  The biggest reason for this is that I have done a lot of experimentation and changed many features in various ways. Some of this led to dead ends while other times I had to reiterate several times before I had something I was happy with.

                  What remains are the changes I finally landed on after much trial and error. Some of these changes are large and modify core aspects of the toolkit. For those of you who have already come far in making games using the toolkit the hardest change to implement will probably be the one that changes the old Edge Array into a nested array.

                  Because of the sheer amount of changes I have not marked these with a version boolean as I have in previous updated. I will instead be making a video later that goes through all changes I've made in detail.

                  Since it is close to the holiday season it is likely that it will take some time until Epic uploads the new version in the Launcher. Until then here is the changelog (less detailed than for other updates due to the size of this update):

                  v1.5 (being processed by Epic)
                  1. Changed the edge array to be a nested array of structs, with each struct representing a single edge. This change required major changes to all parts of the toolkit that utilize edges, but makes pathfinding even quicker and opens for grids with customized connections between tiles.
                  2. Added touch controls and an option for rotation 90 degrees at a time (currently default, but can be unchecked in BP_GridCamera)
                  3. AI has been improved significantly. AI now selects from all possible tiles to attack its target from, choosing depending on a personality enum. The AI will now move as close as possible to units it cannot reach if the path is blocked by a friendly unit.
                  4. Player units can be set to display all possible tiles that can be attacked from all tiles in move range, similar to Fire Emblem and many other TBS games.
                  5. Tiles in Sight Range and Move Range can be displayed as a frame.
                  6. Improved commenting and organization across the board. Variables and functions are now grouped in categories.
                  7. Included a variety of utility functions in BP_GridManager such as spawning units and tiles during gameplay among other things.
                  8. Split up the Event Graph of Unit_Parent into several sub-graphs for easier modification. Unit_Parent’s event tick now only fires when it is needed for movement, improving performance.
                  9. Added several “slow loops” which spread loops over multiple ticks. These can be used to improve performance when necessary. These are used by default when displaying all possible visible tiles for player units, since this is a demanding operation, and when an AI unit is activated.
                  10. Added an example game called Hydra’s Lair that demonstrates how the toolkit can be tweaked to create a 2D dungeon crawler. This includes many experimental features such as fog of war, weapons and armor.
                  11. The example game contains sprites from Dungeon Crawl Stone Soup, which are licenced under Creative Commons Zero and can be found here: http://opengameart.org/content/dunge...wl-32x32-tiles
                  12. The example game includes music made by Jon Lunde that can be freely used by anyone owning the toolkit. More of his music can be found at https://soundcloud.com/marengs
                  13. Many additional minor changes to blueprints.


                  I have big plans for future updates and cannot wait to start working on the next one. This time I intend to keep the scope smaller so that I can release updates more frequently. For the next update I'm planning to add true multi-level grids, a cover system and a faction system.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                  Comment


                    Originally posted by Monokkel View Post
                    So I'm finally done with the 1.5 update! This one took a very long time to make, so I hope you guys will like it. It is the biggest update I've done until now, both in terms of new features and reorganization. Still some of you might think that is a smaller update than what you would expect from the amount of time I've spent on it.

                    The biggest reason for this is that I have done a lot of experimentation and changed many features in various ways. Some of this led to dead ends while other times I had to reiterate several times before I had something I was happy with.

                    What remains are the changes I finally landed on after much trial and error. Some of these changes are large and modify core aspects of the toolkit. For those of you who have already come far in making games using the toolkit the hardest change to implement will probably be the one that changes the old Edge Array into a nested array.

                    Because of the sheer amount of changes I have not marked these with a version boolean as I have in previous updated. I will instead be making a video later that goes through all changes I've made in detail.

                    Since it is close to the holiday season it is likely that it will take some time until Epic uploads the new version in the Launcher. Until then here is the changelog (less detailed than for other updates due to the size of this update):

                    v1.5 (being processed by Epic)
                    1. Changed the edge array to be a nested array of structs, with each struct representing a single edge. This change required major changes to all parts of the toolkit that utilize edges, but makes pathfinding even quicker and opens for grids with customized connections between tiles.
                    2. Added touch controls and an option for rotation 90 degrees at a time (currently default, but can be unchecked in BP_GridCamera)
                    3. AI has been improved significantly. AI now selects from all possible tiles to attack its target from, choosing depending on a personality enum. The AI will now move as close as possible to units it cannot reach if the path is blocked by a friendly unit.
                    4. Player units can be set to display all possible tiles that can be attacked from all tiles in move range, similar to Fire Emblem and many other TBS games.
                    5. Tiles in Sight Range and Move Range can be displayed as a frame.
                    6. Improved commenting and organization across the board. Variables and functions are now grouped in categories.
                    7. Included a variety of utility functions in BP_GridManager such as spawning units and tiles during gameplay among other things.
                    8. Split up the Event Graph of Unit_Parent into several sub-graphs for easier modification. Unit_Parent’s event tick now only fires when it is needed for movement, improving performance.
                    9. Added several “slow loops” which spread loops over multiple ticks. These can be used to improve performance when necessary. These are used by default when displaying all possible visible tiles for player units, since this is a demanding operation, and when an AI unit is activated.
                    10. Added an example game called Hydra’s Lair that demonstrates how the toolkit can be tweaked to create a 2D dungeon crawler. This includes many experimental features such as fog of war, weapons and armor.
                    11. The example game contains sprites from Dungeon Crawl Stone Soup, which are licenced under Creative Commons Zero and can be found here: http://opengameart.org/content/dunge...wl-32x32-tiles
                    12. The example game includes music made by Jon Lunde that can be freely used by anyone owning the toolkit. More of his music can be found at https://soundcloud.com/marengs
                    13. Many additional minor changes to blueprints.


                    I have big plans for future updates and cannot wait to start working on the next one. This time I intend to keep the scope smaller so that I can release updates more frequently. For the next update I'm planning to add true multi-level grids, a cover system and a faction system.
                    This sounds really cool especially the example game.

                    Cannot wait for the update

                    Comment


                      The features in the game example aren't as polished as the ones in the main toolkit, but should hopefully serve as inspiration. Example maps give me an opportunity to experiment a bit more wildly with the toolkit and add features that are more game specific and that do not have to work for any genre of TBS games. It also shows how it is possible to modify the toolkit to create very different games without touching the default blueprints at all, using child blueprints and the like. Expect me to make more example games in the future for various TBS genres. A simple XCOM clone is next in line, two updates from now.
                      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                      Comment


                        Originally posted by Monokkel View Post
                        A simple XCOM clone is next in line, two updates from now.
                        Sadness.......

                        Comment


                          awesome update. perhaps a level load based on when a player or enemies dies for a future update.

                          Comment


                            @BardicKnowledge: Do not be too sad The next updates will be quite a bit smaller than the last one, so the two ones combined should probably take less time then the last one. I actually just added multi-level grids after a couple of days of intense work. It is still a bit wonky, though, so I'll need to add a lot of polish. It wasn't as hard to do as I feared, though. I laid the groundwork by changing how edges work in the update you guys will soon have.

                            Click image for larger version

Name:	Sl2YUAG.png
Views:	1
Size:	619.7 KB
ID:	1097328

                            @Joel: You mean like loading a new level after every enemy has died? That is very easy to set up. In the update I've sent to Epic I've already added code that ends the game when all enemies are defeated. Just connect a "load level" node to this and you should be good.
                            Last edited by Monokkel; 12-20-2015, 07:30 PM.
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              Originally posted by Monokkel View Post
                              [ATTACH=CONFIG]70886[/ATTACH]
                              That's an amazing piece of art

                              Comment


                                Awesome

                                Comment

                                Working...
                                X