[SUPPORT] Advanced Turn Based Tile Toolkit

Hi, terribly sorry for the late reply. It seems the forums no longer sends me e-mail notifications. Which Discord link does not work? The one in the OP and the one on the store seems to work well for me. See if this new invitation works: ATBTT / DCT / RLDB

A round world is a bit tricky. Do you want it to be properly round or to just loop around on both sides? Either will require quite a bit of custom work.

For a proper sphere you can follow this guide for the math and then use that to create a new child of the GridManager. It won’t be a simple conversion, though.

For a wraparound you can add edges (connections) between the tiles on either side of the map. This will get you there mechanically but not visually. You might be able to project one side of the world next to the other using a render target. After that you would need to do modifications to how the movement spline and movement is done when moving across the wraparound point. You might need to do some custom checks there to see if you are hovering over the render target at which point you will display the spline/drive movement off the grid instead (and teleport the Unit when it crosses the threshold). Something like that might work but having it not look janky could prove difficult.

New update is out for UE5.3 which fixes several bugs. Changelog:

v3.5.3 (live 16.09.23)

  • Decoupled all blueprints in example maps from core functionality.
  • Replaced all hard references to hybrid classes from the Hybrid Turn Manager with interfaces and other indirect references.
  • Removed dispatcher hub dummy variables (no longer needed in UE5.3)
  • FIXED: The way the attacking and target unit was passed through the PostUnitAttacked event was inconsistent in different blueprints, causing Retaliate not to work in the base stats map.
  • FIXED: ClickType input in BP_AbilityBase_Idle was not correctly connected, causing it to read all mouse input as Primary.
  • FIXED: GetMovePathData in BP_Ability_Sprint incorrectly got the Move value directly from the OwningUnit instead of getting the PossibleMove of the ability.
  • FIXED: Enabled camera lag on GridCamera spring arm component fixes a touch control jitter issue.
  • FIXED: CollisionPlaneHex component blocks placement of grid objects on index 0.
  • FIXED: The camera jumps if pressing somewhere else on the screen while holding down touch.
  • FIXED: “Find Close Valid Overlapping Grid Index” in Grid Manager returned as false if Multilevel was not true.
1 Like

Hi. Is it possible to create a grid larger than 100x100? If so, how can this be achieved?

There are a few different ways depending on your needs. The limit is reached because Unreal Engine’s inifnite loop checker for blueprints is quite sensitive. You can increase the loop iteration limit in your engine settings if your map is just a bit larger than the limit. The longer you push this the longer the loading times for your map will be, however, so it is not a good solution for very large maps.

If the maps of your game do not need to be solidly traversible for the entirety of the rectangular area covered by the grid you can define what ares you want to include by using Subgrids (BP_Subgrid). This will not techincally increase the total number of tiles you can use but for many types of maps this will let you increase the actual area of your map by quite a bit.

If neither of these work then you will need to do some more work. I have made C++ versions of the grid generation logic that I send to developers on request. This will let you make substantially larger grids. Implementing it is not plug and play, though, and will require a bit of knowledge of C++. A final thing you can do is to spread the blueprint grid generation logic out over multiple ticks, but this will require some moderately complex modification of the blueprints.

Let me know if you want to try any of these approaches and need more details.

Hi all! I looked at the tutorial on the plugin and can’t find the Use Decals item in details. Please help me, how to make decals in the shape of a landscape?

This is the problem:

The creator of the asset responded to me in discord - I’ll duplicate it here:

Now it works like this: “NOTE: Setting the grid manager to use decals to display range has changed. Now you should set GridUIClass in BP_GridManager to BP_GridUI_Decals.”

Thanks for reposting my reply here, Sive :slight_smile:

Hi! I have a fire system that keeps track of tiles that are on fire through an integer array in the grid manager. I would like the AI to still be able to pass through the fire tiles if walking around it would delay travel time significantly but go around them if it won’t delay travel time significantly. I would like it to behave basically like how the 3 cost tile behaves except that it does not slow movement. How could I implement this?

Hi, that is actually a deceptively difficult thing to achieve. You can’t really just treat the burning tiles as having higher cost because the pathfinding algorithm has no way of remembering which of the paths it has generated that might have passed through fire and which haven’t. Based on how you adjust this you can end up a problem where you either have tiles counting as in range that should not really be or the other way around.

The only way I know how to achieve what you are suggesting is to run pathfinding twice. The first pathfinding would use a version of BP_Path that overrides the “AddTileIfValid” function and adds 3 to the cost if it finds a burning tile for the input EdgeIndex in your custom integer array (which should probably be a Set and not an Array for faster lookup if you can have lots of burning tiles at once).

You would run through the whole AI code in your ability using this custom pathfinding types and store the Estimated Values generated by the calculations. Then you would run it again with a pathfinding class that does not check for burning tiles. You could then weight the estimated values differently for the two types of calculations before picking a move target.

That is the generat approach I would try for something like this.

Thanks for the quick reply, I’ll look into that. Worst comes to worst my AI will be a little reckless when it comes to fire, :slight_smile: I love the toolkit by the way.

Happy to hear that and best of luck! Let me know if you need input on anything else :slight_smile:

I suggest add this feature.

Player in grid A, the enemy in grid B, I can move player to B, then the enemy at B will die and disappear. Just like Chess game.Thanks!

Hi akbot, you also asked the question on Discord and it has been resolved there. For future readers, in this case the solution was to add conditional movement into the enemy’s tile within the attack ability if the attack resulted in killing the unit.

New update is out for UE5.4 with several fixes. Changelog:

v3.6 (live 29.04.24)

  • FIXED: Many abilities could not be executed with touch controls
  • FIXED: The loop to check if a puppet should be destroyed after its parent unit was killed could be triggered while the Unit was still alive
  • FIXED: Potential infinite loop for AI units using BP_Ability_Move if they are searching for an enemy but all units on the map are allies
  • FIXED: Stat Puppets used in maps with heightmaps would change their pitch rotation if targeting units on different elevations (instead of only yaw as intended)
  • FIXED: Clients could attempt to access the GridUI on hover for an ability before it was replicated, causing a warning
  • FIXED: Update max stats only updated one stat instead of all input
  • FIXED: Replaced material Demo map ladders, which were causing a warning
  • FIXED: Abilities in SRPG map had AP cost set to 8 (this was unused by default, so was not normally causing issues)
  • FIXED: Collision plane now blocks all by default in BP_GridManager_Hex
  • FIXED: QueueDisplayVisibleTilesInAbilityRange in BP_Ability was getting DiamondShapedAbility directly from the OwningUnit instead of using its own (overridable) variable
  • Preventing extra abilities from being added multiple times in stats ability manager
  • Moved OnPostLogin logic into Begin Play of Player Controller, as the old approach did not support seamless travel"
  • Fixed BP_ATBTT_Strategy blueprint description
  • Early exit added to event hub if attempting to unbind an event that was not bound
  • Removed hard reference to Hybrid puppet from NotifyReady in hybrid turn manager
  • Turn start event is now called on each individual unit when their turn starts also in the SRPG Turn Manager