Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    @nrm2122: Ok, good luck on implementing your custom movement. I'm pretty sure what you want to achieve is possible, and I would personally have started by finding a good way to get unit facing at every step of the pathfinding. Hit me up if you're having a hard time progressing.

    As for new videos, I have been delayed because of a very annoying cold, but I will soon be making a new video. The plan is to make it on wednesday, since I'm busy the next couple of nights.

    Edit: I forgot to mention that I have added annotations to the old tutorial videos on all points mentioned in the old videos that have been modified.
    Advanced Turn Based Tile Toolkit (Marketplace - Support)

    Dungeon Crawler Toolkit (Marketplace - Support)

    Discord

    Comment


      So noob question here. I purchased from the marketplace, when you update will it just show that it is available like it does when a new engine version? Or will I have to re-download the plugin again?

      Comment


        @daniel311311: I'm afraid I'll have to answer your noob question with a noob answer as I'm a bit unclear on this myself. I have seen marketplace items update in the same way the engine does, with the orange exclamation mark and all, but there have also been cases where that didn't happen. That might be because I check regularly after I've sent Epic and update and update the toolkit before it has been fully updated in the launcher (might be a two-step thing), but I really don't know. I would re-download the toolkit before starting a new project if I've recently made an update just to be sure.
        Last edited by Monokkel; 04-28-2015, 10:06 AM.
        Advanced Turn Based Tile Toolkit (Marketplace - Support)

        Dungeon Crawler Toolkit (Marketplace - Support)

        Discord

        Comment


          Hey Monokkel! After some time I really have to say that I like the new version very much!
          Another (hopefully quick) question.. Where or better how and when are the 'Tile in movement range' and 'Tile in attack range' meshes placed? I want to remove the blue 'Tile in range' meshes when a button is clicked and show red 'Tile in attack range' meshes instead (within a range that I can specify).
          Last edited by Hinato; 04-28-2015, 04:52 PM.

          Comment


            Originally posted by Hinato View Post
            Hey Monokkel! After some time I really have to say that I like the new version very much!
            Another (hopefully quick) question.. Where or better how and when are the 'Tile in movement range' and 'Tile in attack range' meshes placed? I want to remove the blue 'Tile in range' meshes when a button is clicked and show red 'Tile in attack range' meshes instead (within a range that I can specify).
            Good that you like the changes, Hinato As for your question, it depends a bit on what you are asking. If you just want to change the appearance of the tiles in move range/sight range, they can be changed in public variables in the grid manager. If what you want to do is instead to prevent tiles in move range to be displayed at all, that can be changed by unchecking the "Display tiles" box in the Pathfinding function which can be found in the "Begin Unit Turn" part of ATBTT_PlayerController. If you want to go even deeper, you can go within the pathfinding function to the part where it runs the "Spawn Tiles In Move Range Markers" function and modify that. I hope one of my three solutions is the one you needed.
            Advanced Turn Based Tile Toolkit (Marketplace - Support)

            Dungeon Crawler Toolkit (Marketplace - Support)

            Discord

            Comment


              Sorry maybe I should've made myself a bit clearer. The last part is what I was looking for.. didn't think to look in the Pathfinder.. THX!

              I'm working on a hotbar and as soon as a hotbar button is pressed the possible (blue) move range shouldn't be displayed anymore. Instead there should be red tiles which show the ability range (like with melee and ranged attack). Finally, after the ability was used, movement tiles should be displayed again.

              I'll try to run pathfinding again and set stuff up with that.. If that won't work I'm going to start with looking into pathfinding some more!

              Comment


                Originally posted by Hinato View Post
                Sorry maybe I should've made myself a bit clearer. The last part is what I was looking for.. didn't think to look in the Pathfinder.. THX!

                I'm working on a hotbar and as soon as a hotbar button is pressed the possible (blue) move range shouldn't be displayed anymore. Instead there should be red tiles which show the ability range (like with melee and ranged attack). Finally, after the ability was used, movement tiles should be displayed again.

                I'll try to run pathfinding again and set stuff up with that.. If that won't work I'm going to start with looking into pathfinding some more!
                Ok, in that case you shouldn't have to change the pathfinding function itself. Just run the "Clear All in Range Mesh Markers" and clear the "Can Move to Array" (both are contained within the grid manager). Then run the "Find Tiles in Range" function for displaying tiles in range. See the "Begin Unit Turn" and at the end of "Initiate movement towards and/or attacking target" within ATBTT_PlayerController for examples.
                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                Dungeon Crawler Toolkit (Marketplace - Support)

                Discord

                Comment


                  I've finally uploaded a new tutorial video. This one shows how to use many of the new features in the latest update. Make sure to enable annotations, as I have made a few minor changes after the latest update which have not been uploaded yet, which are noted. Hope the people using the toolkit will find the new video useful.

                  Advanced Turn Based Tile Toolkit (Marketplace - Support)

                  Dungeon Crawler Toolkit (Marketplace - Support)

                  Discord

                  Comment


                    Hi Monokkel,

                    Simple question: if I have one tile index, how can I know that tile class? More deeply, how can I possibly cast it to Tile_Parent?

                    I don't know if there's already such a function (or workaround) in ATBTT, meanwhile to clear this issue I've created a new public array in the Add Terrain to Viewport function of the BP_Grid_Manager (I don't remember the exact name, sorry) which contains a struct of Index and Tile_Parent.

                    Is the one above a good solution or I missed something in the tookit?
                    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


                      @Wisom-HELLy: The way you've chosen to do it is a good solution if you want to access the indexes of multiple tiles during a single tick, when speed is very important. The downside is that you need to add a new, large array, but that's not that big of a problem. If you do not need to access the tile parents at certain indexes every tick a simpler solution would be to get all actors of class Tile_Parent and run a ForEachLoop where you check the index of each Tile_Parent until you find the one with the correct index.
                      Advanced Turn Based Tile Toolkit (Marketplace - Support)

                      Dungeon Crawler Toolkit (Marketplace - Support)

                      Discord

                      Comment


                        Hey just seen the new video. Are there plans to allow hex shaped tiles follow a terrain map as well, or are you staying with squares only?

                        Comment


                          Originally posted by nrm21122 View Post
                          Hey just seen the new video. Are there plans to allow hex shaped tiles follow a terrain map as well, or are you staying with squares only?
                          That's already included. Just do the exact same thing with a hexagonal grid. Either replace the decals with the appropriate hex decals or use Grid_Manager_Child_Hex, which has these set up already.
                          Last edited by Monokkel; 04-30-2015, 05:03 AM.
                          Advanced Turn Based Tile Toolkit (Marketplace - Support)

                          Dungeon Crawler Toolkit (Marketplace - Support)

                          Discord

                          Comment


                            Hey Monokkel, I just started working on the new version. Unfortunately, I did a some work on a project the day before you announced that the new one was available, so I have added some parts to the blueprint on the first version, where, after the Grid Manager blueprint would start up, it would spawn three characters on random tiles. Obviously, this means none of the characters are being placed manually before pressing "Play". However, in the new version, I transferred this function and its variables to the same place on the BP_Grid_Manger blueprint and the characters are placed correctly. The problem is that no value is set for "CurrentPawn" in ATBTT_PlayerController or in BP_Grid_Camera. I am assuming this is because where CurrentPawn is set in ATBTT_GameMode, there is nothing to set it to because this is called before that part is in the Grid Manager? I was just hoping you could point me in the right direction towards getting CurrentPawn to be set to perhaps, the last character added to the grid in my function, just so that there is some value there so it will run correctly. Better yet, if there was a way to go without setting current pawn until one of them is clicked, so there can be free camera, since I plan on adding that anyway. Thanks!

                            Comment


                              Hi Sreno1, that's a few different things you're asking. I'll address them each in turn. First, as you've rightly guessed, the order of operations when the game starts up is important. The Game Mode fires before the Grid Manager, so the game mode sorts pawns in initiative order and selects the current pawn before you have spawned any pawns in the grid manager. The simplest way to fix this is to insert a delay in the game mode before the current pawn is selected, so that the pawns will have been placed before they are sorted in initiative. There is in fact already such a delay in the game mode, but it is placed after the pawns are sorted. Move this delay over to before they are sorted, like this:

                              Click image for larger version

Name:	y8eAY3p.png
Views:	1
Size:	115.7 KB
ID:	1075590

                              But of course, you don't want to have a current pawn at the start of the game at all right? In that case, simply delete the "cast to" and "set current pawn" parts of what's pictured above and connect up what's left. Make sure to set the spawn transform of the camera to something appropriate. Then you want to prevent the game mode from running all the nodes activating the current pawn. To do this, simply disconnect all the stuff inside the "Setup actor references" parts of the game mode from the rest by breaking the link after "Set BP Grid Camera Ref". Also, set the default value of PlayerTurn to "true".

                              If you've done the above you'll have something pretty close to what you want. There is no current pawn selected at the start, and clicking any of the player pawns will select that pawn (provided "Player can switch pawns" is set to true). However, a remaining problem is that if you click any other tile than one inhabited by a player pawn the "End Turn" custom event will run and select the next pawn in initiative as the current pawn. Do disable this, include a branch statement at the start of the "End Turn" part of ATBTT_PlayerController to check if "Current Pawn" is empty. If it is, don't bother ending a nonexistent current pawn's turn. Like so (the "Select Asset" part of the == statement means the blueprint checks if current pawn is empty):

                              Click image for larger version

Name:	yOslHwv.png
Views:	1
Size:	83.9 KB
ID:	1075592

                              I think that should solve all of your problems. One last thing you might want to do is to make the current pawn marker invisible at the start of the game and make it visible the first time you click a pawn.

                              As a bonus, I set up some super simple nodes for spawning a pawn from a blueprint. You've figured this out already, but it might be useful for anyone else reading. The blueprint graph in the image below (from the end of the event graph of BP_Grid_Manager) spawns a Unit_Player_Melee pawn at grid index 5 at event begin play. In this case it is important to do this before running the "Add Viewport Pawns To Pawn Array" function. If you do not do this, or want to spawn pawns at any later point in the game, you have to add the pawn at the appropriate index in the Pawn Actor Array and its faction at the same index in the Pawn Array.

                              Click image for larger version

Name:	6t5wXfz.png
Views:	1
Size:	121.5 KB
ID:	1075594

                              I hope this will help you achieve the result you are after.
                              Advanced Turn Based Tile Toolkit (Marketplace - Support)

                              Dungeon Crawler Toolkit (Marketplace - Support)

                              Discord

                              Comment


                                Wow, thank you so much. This is great, exactly what I was looking for!

                                Comment

                                Working...
                                X