Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Originally posted by GEE-1 View Post
    Hello, thanks for this great toolkit. Is it possible to use decals for spline (arrow) meshes? Thanks.
    Click image for larger version  Name:	 Views:	1 Size:	111.3 KB ID:	1393707
    That used to be in as a default feature, actually, and I'll make sure to add it back in. Here are some quick steps to add it to the current version:

    Make a copy of any of the decals used for markers, such as Decal_CurrentMarkerHex. Lets call it M_ArrowDecal. Replace the texture sample with the arrow texture included in the toolkit.

    Go To BP_GridManager and the DisplayPathAsInstancedMeshes function. At the right hand of the function, right before meshes are normally spawned, add a branch checking the bUseDecals boolean. If it is true, spawn a decal instead, and add it to a new array of decals that we make, like so (note the values in the Spawn Decal at Location node):


    Then, in the DestroyAndClearSplinePath function, add the following:


    Then, add this function at the very start of the DisplayPathAsInstancedMeshes function and in ATBTT_PlayerController in the RemoveDisplayedPath event, ignore the bDisplayPathAsSpline branch and always run the DestroyAndClearSplinePath function instead. Like so:



    That should do the trick. I'll add this back in more elegantly in the update after the next.

    Originally posted by atarax View Post
    Just wanted to say got the toolkit and it is a great starting point for my game. This is my first time using unreal engine and I appreciate all the youtube tutorials as well.
    I am really looking forward to the multiplayer implementation as we are planning on a multiplayer game.
    Thanks for the hard work!
    Happy to hear that Make sure to learn about UE4 multiplayer implementation from Epic's tutorials beforehand. Even though everything will be replicated in the next update, when you're adding your own features you'll need to know how.

    Originally posted by GEE-1 View Post
    Hello again, I want to setup a specific zoom and position for the camera when the game begins but I couldn't find where you setup the camera. BP_Grid_Camera Blueprint is not setting up any location at event begin play nor the BP_Grid_Manager at Construction script. Thanks again.
    Go to ATBTT_GameMode and replace the value at SetActorLocationAndRotation of BP_GridCamera_Ref to whatever you want:

    Advanced Turn Based Tile Toolkit (Marketplace - Support)

    Dungeon Crawler Toolkit (Marketplace - Support)

    Discord

    Comment


      Thanks. It's working now. I need to add multi-tile big units. 1x2, 2x1, 1x3, 2x2; I know it's planned for 1.9 but I don't think I can wait for the next version. Are there any recommendations you can make? Besides this, I need to add "drag and drop" to units before the battle begins. Any recommendations for this as well? Thanks.

      Comment


        Originally posted by GEE-1 View Post
        Thanks. It's working now. I need to add multi-tile big units. 1x2, 2x1, 1x3, 2x2; I know it's planned for 1.9 but I don't think I can wait for the next version. Are there any recommendations you can make? Besides this, I need to add "drag and drop" to units before the battle begins. Any recommendations for this as well? Thanks.
        For big units I've explained the general approach previously in this thread. Here is a link to the start of the discussion: https://forums.unrealengine.com/unreal-engine/marketplace/31005-advanced-turn-based-tile-toolkit-support?p=1023941#post1023941

        As for drag and drop, I cannot give to much input on dragging and dropping in itself, but however you choose to solve it you should look at the Spawn Unit event in BP_GridManager to see how to add new units to the grid. The only important thing is to add them to the appropriate arrays, and if you have any active pathfinding running you need to re-run it for the new units to be picked up.
        Advanced Turn Based Tile Toolkit (Marketplace - Support)

        Dungeon Crawler Toolkit (Marketplace - Support)

        Discord

        Comment


          Originally posted by GEE-1 View Post
          Thanks. It's working now. I need to add multi-tile big units. 1x2, 2x1, 1x3, 2x2; I know it's planned for 1.9 but I don't think I can wait for the next version. Are there any recommendations you can make? Besides this, I need to add "drag and drop" to units before the battle begins. Any recommendations for this as well? Thanks.
          http://aigamedev.com/open/tutorials/...d-pathfinding/

          This was the article I read before starting my system, idk if I linked it before, but it may be helpful to you.
          Anime Shading Model - Twitter

          Comment


            Hello, I am a beginner but have some idea of the concepts in UE4. I have add tried changing a few animations around on the pawns with the Map_Grid_Example and all has been easy to comprehend. I then wanted to move onto the Jungle Raid Map and implement the 'melee' as another skill, so i duplicated the laser shot skill and limited the range to 1. I removed the set and laser and weapon nodes but left the 'Deactivate Skill', 'Deal Damage', 'Visualise Preparation', 'Check if Attack hits' section. Now in the 'Fire Laser Beam' section, the AttackAnimation was replaced with the Attack_Melee animation. Everything runs up to the point were the animation plays and keeps on looping, even though movement animations. I have checked the Animation State Machine and also the endnotify is in the Attack_Melee animation. I've looked in the Unit_Skill at the Move Timeline to apply the DoOnce node, but it still doesn't seem to resolve this small issue that i have. Is there something i have left out?

            Comment


              Thanks for the continued work.
              Is there a reason I would grab the 4.18 version of ATBTT ?

              Comment


                Thanks Monokkel, Thanks Selentic.

                Comment


                  Originally posted by Selentic View Post

                  http://aigamedev.com/open/tutorials/...d-pathfinding/

                  This was the article I read before starting my system, idk if I linked it before, but it may be helpful to you.
                  Great article Selentic, thanks for the link. Also leads on to some other interesting pathfinding articles. Much obliged!

                  Comment


                    Originally posted by Selentic View Post

                    http://aigamedev.com/open/tutorials/...d-pathfinding/

                    This was the article I read before starting my system, idk if I linked it before, but it may be helpful to you.
                    Thanks for the link, Selentic. The article is a great read.

                    Originally posted by LDodds View Post
                    Thanks for the continued work.
                    Is there a reason I would grab the 4.18 version of ATBTT ?
                    Well, it is the newest version availible on the at the moment, which is a pretty compelling reason I'm not sure if I fully understand your question, though.

                    Originally posted by GEE-1 View Post
                    Thanks Monokkel, Thanks Selentic.
                    No worries!

                    Originally posted by User609571414 View Post

                    Great article Selentic, thanks for the link. Also leads on to some other interesting pathfinding articles. Much obliged!
                    I'm unsure if I have posted this before, but I should probably link you guys to some of the articles that helped me a lot when I first started making ATBTT. Amit Patel's articles on pathfinding, grid math and procedural generations are fantastic, and the entire website is a treasure trove of stuff that should be of interest to most game developers, and developers of grid based games in particular: http://theory.stanford.edu/~amitp/GameProgramming/
                    Advanced Turn Based Tile Toolkit (Marketplace - Support)

                    Dungeon Crawler Toolkit (Marketplace - Support)

                    Discord

                    Comment


                      Originally posted by User609571414 View Post

                      Great article Selentic, thanks for the link. Also leads on to some other interesting pathfinding articles. Much obliged!
                      Originally posted by Monokkel View Post

                      Thanks for the link, Selentic. The article is a great read.
                      Originally posted by GEE-1 View Post
                      Thanks Monokkel, Thanks Selentic.
                      Anime Shading Model - Twitter

                      Comment


                        I am really liking this toolkit, but am at the same time slowly learning about UE4 and blueprints.I am unsure if i have the homing target node setup correctly. From the 'target' variable i tried to get the static mesh component object reference through the 'Get Components by class' but it seems that the projectile blueprint 'particle_BP' might not see it as a proper static mesh component object. The spawned projectile travels in the right direction but does not approach the homing target. I have included the modified skill_laser blueprint picture. Has anyone got a working spawned homing projectile system working?


                        My closest solution has been to implement the 'move component to' node and seems to be visually similar to homing projectile.

                        Click image for larger version  Name:	skillHoming.png Views:	3 Size:	366.4 KB ID:	1395268
                        Attached Files
                        Last edited by miketv23; 12-05-2017, 03:22 AM. Reason: Found a solution after much forwards and back addition of an arrow component added to the 'unit' pawn

                        Comment


                          Got a bit deeper into the blueprints and just had a suggestion. As you mention above to change the start location of the camera you need to go into the game mode blueprint and then adjust the position of the camera from the player location to your own location.

                          I thought this should really be a function on the camera blueprint, as I spent a good amount of time trying to figure out how the camera was working, turning on and off things etc.. trying to find where to set the initial position of the camera.

                          Comment


                            Hey,

                            It's me again with another question Looking at the kit and we're looking into making tiles impassable for just specific classes, any built-in or hacky way we can utilize to let some units cross tiles and not others? So i.e. a tile that is marked as 10 cost for pawn class ranged but marked as 1 cost for class melee?
                            Marketplace Asset - Economy Kit; Marketplace Asset - Notification Kit; Marketplace Asset - Achievepedia; Marketplace Asset - Player Stats Kit; Marketplace Asset - Photomode;
                            Marketplace Asset - Interaction Kit; Marketplace Asset - Turret Kit; Marketplace Asset - Character Stats Kit; Marketplace Asset - Smooth Camera Kit; Plugin - Toggl Plugin;
                            Hire us here; Panda Studios, Game development company.; Official Unreal Engine Game Jam Sponsor

                            Comment


                              Originally posted by miketv23 View Post
                              I am really liking this toolkit, but am at the same time slowly learning about UE4 and blueprints.I am unsure if i have the homing target node setup correctly. From the 'target' variable i tried to get the static mesh component object reference through the 'Get Components by class' but it seems that the projectile blueprint 'particle_BP' might not see it as a proper static mesh component object. The spawned projectile travels in the right direction but does not approach the homing target. I have included the modified skill_laser blueprint picture. Has anyone got a working spawned homing projectile system working?


                              My closest solution has been to implement the 'move component to' node and seems to be visually similar to homing projectile.

                              Click image for larger version Name:	skillHoming.png Views:	3 Size:	366.4 KB ID:	1395268
                              Hi, I've thrown together something that works that will hopefully point you in the right direction. Here is what I did:

                              I made a new blueprint called BP_HomingMissile. The homing missile contains the following: A static mesh, A vector variable for its TargetLocation (with expose on spawn checked), a float variable for its speed (set to the number of unreal units to move each second. Mine is at 300), and the following nodes that make it move from its start location to the TargetLocation destroying itself and running its custom OnHit event dispatcher when it has reached its destination (note that this is not the best way to move something at a constant speed, but it is something I threw together quickly. Replace with any other method of moving something to somewhere else)



                              For the skill I've made a duplicate of Skill_Laser that I've called Skill_Homing. All I've done in this new blueprint is to replace the nodes that normally spawn and destroy the laser emitter with ones that spawn a homing missile and continues once the missile has hit. Like so:



                              If you cope the above you should have a missile that spawns when you click the target to shoot, travels to the target and then deals damage and disappears. Hope that is close to what you were after.

                              Originally posted by atarax View Post
                              Got a bit deeper into the blueprints and just had a suggestion. As you mention above to change the start location of the camera you need to go into the game mode blueprint and then adjust the position of the camera from the player location to your own location.

                              I thought this should really be a function on the camera blueprint, as I spent a good amount of time trying to figure out how the camera was working, turning on and off things etc.. trying to find where to set the initial position of the camera.
                              Thanks for the suggestion. I agree completely, and this is actually how it is already in my WIP build. The starting location of BP_GridCamera is now set in the EventBeginPlay event of the camera blueprint itself. Generally, several things will be in more sensible places in the next update.

                              Originally posted by Panda Studios View Post
                              Hey,

                              It's me again with another question Looking at the kit and we're looking into making tiles impassable for just specific classes, any built-in or hacky way we can utilize to let some units cross tiles and not others? So i.e. a tile that is marked as 10 cost for pawn class ranged but marked as 1 cost for class melee?
                              Welcome back There are several ways you can solve this, but I'll give you a farily simple one that should achieve what you want.

                              For this I’ve created a new Enum called ETerrain that holds our different terrain types. I’ve added Plain, Woods and Water by default.

                              Then to the Unit blueprint I’ve added a new Map called TerrainCosts, with ETerrain as the Key and Integer as the value. For each unit type you then add to the map what terrain you want the unit to be able to traverse (leaving out any that should be impassable) and set the value to whatever extra cost you want for that terrain type for that unit (keeping it at zero for default cost).

                              Next, I’ve added an ETerrain variable to BP_Tile where we can specify what terrain that tile represents. I’ve then made two child blueprints of BP_Tile called BP_TileWoods and BP_TileWater, set their ETerrain values to match and set their edge costs to 1.

                              Following this I’ve added a new array to BP_GridManager called Terrains that holds the terrain type of each tile. At the end of the event graph of BP_GridManager (does not matter where as long as it is after AddViewportTerrainToArrays) I’ve added the following:



                              This adds the terrain values of each of your tiles to the Terrains array, defaulting to Plain. You could of course forego using tiles and just manipulate the array directly.

                              The next step is to create a custom pathfinding for our units. If you have not modified it already, use the SearchAndAddAdjacentTiles(Custom1) function, which is identical to the regular pathfinding, but included for ease of adding a new type. However, we will be referencing the current unit a lot in this function, and do not want to cast to it every step of the pathfinding, so go to the CustomPathfinding macro and hook up the SetCurrentPawnPathfinding nodes in front of SearchAndAddAdjacentTiles(Custom1) just like they are in SearchAndAddAdjacentTiles(PassThroughFriendlies)



                              Next, in the SearchAndAddAdjacentTiles(Custom1) function add a new branch after the one checking the movement cost of the next tile to search. In the new branch, get the terrain type of the tile to be searched from the Terrains array and try to find it inm the TerrainCosts Map of CurrentPawnPathfinding. If you do not do so, abort this seach step of the pathfinding. If you find it, add its cost of moving to this tile. Like so (new nodes are highlighted. Don't forget the '+':



                              That should be it, I think. Except remember to set the PathfindingType of your units to Custom1. Here is a screenshot of a unit that has Forest set to 2 cost, plains to 1 and water not addet to its TerrainCosts map


                              Hope that is what you were looking for and that I remembered all the steps. Let me know if it works on your end
                              Advanced Turn Based Tile Toolkit (Marketplace - Support)

                              Dungeon Crawler Toolkit (Marketplace - Support)

                              Discord

                              Comment


                                [QUOTE="Monokkel;n1396143"]

                                Hi, I've thrown together something that works that will hopefully point you in the right direction. Here is what I did:

                                I made a new blueprint called BP_HomingMissile. The homing missile contains the following: A static mesh, A vector variable for its TargetLocation (with expose on spawn checked), a float variable for its speed (set to the number of unreal units to move each second. Mine is at 300), and the following nodes that make it move from its start location to the TargetLocation destroying itself and running its custom OnHit event dispatcher when it has reached its destination (note that this is not the best way to move something at a constant speed, but it is something I threw together quickly. Replace with any other method of moving something to somewhere else)



                                For the skill I've made a duplicate of Skill_Laser that I've called Skill_Homing. All I've done in this new blueprint is to replace the nodes that normally spawn and destroy the laser emitter with ones that spawn a homing missile and continues once the missile has hit. Like so:



                                If you cope the above you should have a missile that spawns when you click the target to shoot, travels to the target and then deals damage and disappears. Hope that is close to what you were after.



                                Thanks for the helpful reply. I had a go at implementing that solution but somehow the blueprint library that i have doesnt have the node 'call onhit'. Instead i implemented the 'spawnActor class blueprint' which then executes the 'move component to' and then executes 'destroy actor'. For the input pin 'over time', got the result of 'find distance (in tiles) between indexes' and did a float div (common factor) of 6. I notice that in previous thread someone mentioned about the 3d widget multi health bars. Ive tried to integrate along side the 'constuction script - setup the health bar', but the methods seems to be different to that of the progression bars of 3d widget. So far i have created the simple 3d widget then added a widget component to the 'unit' pawn then selected wiget class to reference that 3d widget. I would then need a event tick in the actual 3d widget for facing the camera and upon test progression bars seem to initialise on starting Jungle raid map. Now, when i make a custom event in 3d widget, and then calling that event from the 'unit' pawn, the map starts up with the uninitialised 3d widget. I'll go back to just a single progression bar to see where the error is, but if someone has a solution then it would be great.

                                I've tried to initialise the 3dwidget in the 'setup references' of pawn 'unit', but upon starting the jungle raid map, each unit is not in their proper grid position but are sequentially spawned at position 0,0 after ending each units's turn. I have only executed the 3d widget initialisation after the last node of the 'setup references' section and think i may have disrupted something or maybe need to re-initialise something else for it to go back to normal.

                                After this occurrence, i loaded up the backup of jungle raid and now it initialises with the 3d widget. Strange, but it now seems to be operating as intended.
                                Last edited by miketv23; 12-06-2017, 04:04 AM.

                                Comment

                                Working...
                                X