[SUPPORT] Advanced Turn Based Tile Toolkit

Hey there! I purchased this toolkit awhile back and have had tons of fun playing with it and manipulating it in various ways. Thanks so much for your work!

As of right now, I have your toolkit imported into my 3rd person game. The way your toolkit works by default, I have to load a new level for combat to begin. I would like to be able to walk around the map in 3rd person and trigger combat without loading a new level. Basically, player walks into a trigger box, the grid spawns and the player snaps to their nearest grid tile, and combat begins. I would like it to be as seamless as possible, if possible.

Do you have any tips on how to implement this? Thanks again for any help you can provide!

Check out the Hybrid map located in the experimental folder. Does exactly what your looking for.

Hey . I just got the toolkit and Iā€™m also totally new to Unreal. I was wondering how I can make static characters with the new puppet system. The youtube videos are outdated and Iā€™m really not sure how to go about it. Thanks.

Hi, tutorials for adding units are next on my list, but until then here is the event graph for a puppet with a static mesh. This is a basic starting point without any animations. You could set up animations within the AnimatePuppet event here similar to what is done in the old tutorial:

https://i.imgur.com/VGI3oDj.png

Hope that helps :slight_smile:

Thanks, got it working now!
BTW Iā€™m one of the guys who made Legend of Grimrock 1 & 2, so it was pretty cool to see you mentioning LoG on your Dungeon Crawler Toolkit description :slight_smile:

Great that it worked out, and awesome to hear that you are one of the Finns from Almost Human and Ctr Alt Ninja! It goes without saying that your teamā€™s work has been a massive inspiration :slight_smile: Both Grimrocks were fantastic games and I found it hard to improve upon your stellar UI work, which is modern and flexible while still feeling like its old-school inspirations. I also played quite a bit of Druidstone, which I believe you were the art director on. Excited to see what youā€™ll be doing with my toolkit :slight_smile:

Awesome to hear you liked the games. I did all the 2d & 3d graphics for LoG1 and Druidstone and had one guy helping with LoG2, so that means Iā€™m a graphics artist and basically donā€™t know how to code :smiley: Iā€™m playing around with UE just to learn new stuff, so I may be here often with my stupid questions. But thanks for this toolkit, itā€™s great to have a solid base to play with.

Well, Iā€™m honored :slight_smile: These days I think it is a lot easier for an artist to branch off into programming than the other way around, and blueprints make this doubly so. Hope you have fun with the toolkit. If you have quick questions or just want to chat, the toolkit has a pretty active Discord channel (link in my signature). For more involved questions this support thread is a better fit.

Hello again! This time I have a question about unique ability ranges. I currently have an ability that targets a straight line in front of the user in any of the four directions, hitting every unit in that line. I got it to work perfectly for the player, but Iā€™m having trouble with the AI not using it correctly. I implemented this by setting the range on any AOE ability to 1 with diamond visibility, allowing the user to essentially select a direction for the ability to be performed. I then added a function within BP_Ability called ā€œFind Connected Targetsā€, which outputs a set of indexes based off what direction the attack is used in. On a single target ability, this would simply return a set with nothing in it. With the line ability, it would return all indexes in a separate ā€œline rangeā€ variable for that direction. It is loosely based off of the ā€œFindSurroundingPossibleTargetsā€ function in the grenade ability, but without the collision capsules.

When the AI tries to use this ability, it sometimes fails to find any targets or it uses the ability in a completely different direction. I believe the issue is with the ā€œFind Potential Targetsā€ function in BP_Ability. Iā€™ve tried overriding it based on how the grenade ability has it, among other setups, but nothing worked. This is probably due to the strange line range and how I have the range variable set to 1 to choose a direction. However, when I originally tried to use the included range variable, I had trouble getting the line to work.

My question is, is there a way to alter ā€œFind Potential Targetsā€ so that it could work with the ā€œFind Connected Targetsā€ function that I created, or is there a better way entirely to implement these kinds of unique ranges? (more than likely the case as I am not a very experienced coder)

Hi, so this is a pretty challenging problem. I think your reasoning is good here and there are likely many different decent solutions to the problem. If you want to keep this all in blueprints you have to be pretty mindful of performance for these sorts of things. Here are the steps I would try first if I wanted to achieve this:

  1. Iā€™d start by filtering out units I know I will not be able to hit. This is what I use Find Potential Targets. Iā€™d keep this as an initial filter as it is really cheap. You can always loop over the output of this function to further filter the targets.
  2. Next Iā€™ll want to figure out if any of the targets have a straight line between them. Iā€™d loop through the targets and compare their GridIndexes. If The X or Y part of the index number is identical this means there is a straight line between them (check out my video on Grid Indexing if this seems unclear).
  3. Next I would check if the player could actually get to any of the indexes that would enable them to target multiple targets on a line in this way. Iā€™d check grid indexes on a line in the opposite direction of the other targets and look for them in StoredPaths.
  4. For targets where I found a valid index to attack from Iā€™d check if there are even more targets between the two targets. Iā€™d either loop over the grid indexes between them and check for units or use the collision capsule + line trace method, depending on which turns out to be more efficient.
  5. Iā€™d rate the possible targets and tiles based on the number of targets hit and/or remaining health of these targets.

That was my first idea of how to do this. Many of these steps are not trivial and will require much deliberations and testing, I suspect. But those are my initial thoughts.

Good day hou to find: Can split up move. ? for moving not all mov point. from video [Old] UE4 - Advanced Turn Based Tile Toolkit Tutorial - 4 - Using the new features in update 1.4 - YouTube

Thank you very much for your suggestions. I tried implementing what you wrote with no luck, as I couldnā€™t quite wrap my head around the logic and where to fit everything into the existing code.

I noticed that the grenade ability has ā€œUsePregeneratedSafetyValuesā€, ā€œUsePregeneratedPathsā€, ā€œUseTileValuesā€, and ā€œUseSlowLoopsā€ ticked by default. I was wondering if those would be of any use to me on an AOE ability, but I couldnā€™t figure out what the difference in using them is. Would you be able to shed some light on their use?

Hi, you can achieve the same result by changing the MoveCostType variable (name might be slighly different. cannot check right now) in the move ability you are using to ā€œFromPathfindingCostā€. This makes it so the AP cost of moving is based on the move cost calculated during pathfinding. Next set the Move variable of your units to 1 and increase their AP to compensate.

My suggestions were just my immediate thoughts on how I would first try to approach the problem. I might try my hand at it some day, but this is a difficult problem and it is hard to find much time these days.

So UsePregeneratedSafetyValues means that the ability will utilize tile safety values that have been added by previous abilities of that unit this turn. This is to avoid repeating the same expensive check for each ability that uses them if the abilities are generating them the same way anyway and the unit has multiple abilities. It is just there for performance. UseTileValues means that it does generate these tile safety values (which makes tiles in cover and tiles not close to multiple enemies have a higher priority). UseSlowLoops means that the value calculations are done over multiple ticks to avoid dropping frames if the ability is one that requires complex calculations (which is the case for the Grenade ability). I imagine your beam ability might also fall into this category.

Hello,

i have a problem with spawning units in a running game. I let spawn units by the task " spawn actor from class" in the level blueprint by pressing the key x, as test. everything works fine but, i can click on the fresh spawning unit, which is AI controlled and in the enemy team, and the unit make his move. But its not the enemys turn. Also by clicking the spawned unit i dont get the hatched fields to indicate the range of motion. So my question, is there a right way to spawn the units in the middle of a running level, without these problems? In 2019 it worked out for me.
Hope you can help me and best wishes

Hi Kuhmachtmuh, thank you for letting me know. I have reproduced the issue and this is not the intended behavior. This has to do with which player is set as the owner of the unit, which is currently being set incorrectly to the player for spawned AI units. Iā€™ll make sure to fix this in an upcoming hotfix. When I have the time to implement a fix to this particular issue I will post about it here.

@Kuhmachtmuh: Ok, got to look at it now. Turned out to be a simple fix. Add the highlighed nodes to HandleUnitSpawning in BP_ATBTT_State:

Hello ,

My Puppets are animating fine in Play in Editor when i build the game they are stuck in a T-Pose could you please help Cheers.

Hmm, well that is odd. Are you using the default included puppets or have you added your own?

Two new videos on adding and animating puppets are up:

Hello ,
I worked out my issue the puppet mesh is made up of a series of skeletal meshes so i can customize each puppet. I assigned my UnitMesh a custom Anim Bp but i did not assign all of my attached meshes the same Anim BP. I went back to the editor and set them to the same Anim Bp rebuilt the game and everything is working. I hope this makes sence S