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.
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?
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.”
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, I love the toolkit by the way.
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
Hello, I am using the Advanced Turn Based Tile Toolkit.
I have a question.
How can I use the ActionManager to play multiple animations at the same time?
For example: I have set up 20 neutral units in the scene (they only have the ability to move, no other abilities). They move from the left side of the map to the right side. According to the ActionManager, they move one after another (I have to wait for all 20 movements to complete). so No ! This situation is not suitable for my game…
I want them to play the movement animations simultaneously (so that in the scene, it looks like 20 NPCs are moving at the same time), This will speed up the process of waiting for 20 animation events… (Also, how can I trigger an event after all 20 movements are completed?)
The situation I am facing is more complex, but could you please tell me how to achieve this based on the example above? I would like you to use the (ability_move + turnManager) mechanism to explain it to me.
Let me explain my specific situation:
I placed 3 Heroes in the scene, and each Hero has 6 soldiers, making a total of 21 actors. My Hero actors are still using your original movement method, but my soldiers do not has activeState or selectStates. How should the soldiers move?
In my game, when a Hero is activated, They moved by mouse drag and drop,the final movement position is determined by dragging the mouse,I have recorded their initial and final positions as variables and will trigger the movement event later.No animations are triggered while I am dragging. After all the soldiers have been dragged, my GUI has a command button called “move all soldiers.” When I click this command, my soldiers play the movement animation simultaneously.
(I have already completed the dragging functionality and determined the starting and ending positions for each soldier. Now, after clicking the “move all soldiers” command, how can I make all 6 soldiers move at the same time? And how can I get an event when all 6 soldiers have completed their movements?)
Hi, for this particular problem I would do something like this: Make sure that for your soldiers no other actions happen between the movement of each soldier. Then within the Move actions call the “Proceed From This Action” function immediately after PlayAction is called. This will cause the actions to automatically proceed to the next one, effectively having them play out simultaneously.
See if that achieves a visual result similar to what you are after.
Now for your actual implementation you will need to do a bit more than this, since the above setup overrides movement for all units. It also will skip from the last unit moving to whatever action is queued next immediately and you probably want to delay that until the units are done moving. There are a few different ways to do this, such as passing this information along when calling Move Custom Path or peaking at the next action in the queue when playing the action and only proceed if the next action is also a move action.
Let me know if this seems to be on the right track for what you want to achieve. If so I can go into more detail on the final point.
Thank you! I used your method, but I still couldn’t get it to work. I recreated a new Advanced Turn Based Tile Toolkit project and tried using the Basic map, but it didn’t work either.
Thank you nonetheless for giving me the idea, I have already solved the problem.
I spent several hours trying various solutions. The one I think works best is this.
Three new action files, with no code inside, all simply call End Action.
call PlayAllActionSetup to wait and put 1 action(Actionstart)
add custom anim
call PlayAllActionStart to notfiy thread,and push 2 actions(Actionend + Actionreturn)
in actionManager
call the start (set playing all to true)
call the move_action
call the move_action
…
call the move_action
call the end (set playing all to false)
call the Actionreturn,( this action also running quickly,When finished ,code running to delayWhile can be waiting the last move_action calling event EndAction )
This is the best approach I’ve come up with, and I’m calling it ‘Group Animation.’ Initially, I tried handling it in 3 action files, but the results weren’t ideal because new group animations might be created during the playback of ‘Group Animation.’ So, I decided to change it like stack,It can manages its own order, similar to the turnManager.
Please forgive my poor English, it was translated using GPT.
Thanks for sharing your solution here. While that will work I’ll suggest some possible improvements. Switching on name like this is a bit clunky and hardcoded and is not flexible if you want to add other similar actions.
Here is a slight change you can make while keeping your general structure: Create a new enum variable in BP_ActionManager that represents your various “play all actions” states. It can have states for play all actions playing, starting etc.
Then you create a new type of action that on PlayAction sets that enum variable to a value specified in an Expose to Spawn variable of the new enum type.
I have reverted my previous code. When I used your ladder actor, after using the ladder, it added action_climb after action_move. If four soldiers move simultaneously and trigger the ‘ladder actor’ during movement, the actionManager gets confused (since there’s no sequence).
Now, I’ve made significant modifications and feel like I’ve fallen into an abyss.
I turned all parameters in the code—ActionQueue, ActionCounter, OngoingActions, BlockingActions, FillCounter, and QueueCounterClient, GarbageCounterClientMap in BP_ActionQueueCounter—into arrays, and made changes to many files.
I’m not very familiar with the code
I’ve changed a lot of code. What I’m aiming for is to keep the delayWhile part of your code single-threaded, changed it not checking its own queue property, it will now check a property from a map. This way, each soldier will have its own queueStack. After debugging for a long time, I’m left with one last issue that I haven’t yet resolved. When I add multiple actions to the new thread_form, it seems that it doesn’t clear all actions; one action seems to remain. I’ll continue working on this tomorrow.
why in ActionDestructionLoop function. the Hero used 0 thread It works fine! but soldiers used 1 thread , 2 thread…10 thread heave are some issues with the code when it runs.
When I was debugging, I found that it seems to be caused by the system defaulting to keeping one action. Is there a quick way to fix this?
I finally solved it! I reverted the previous code as well. Although it felt like a waste of time, I found a much simpler way to modify it. The code looks minimal, which suits my style better, but you need to have a deep understanding of your actionManager and bp_action for it to work.
Now, all 6 soldiers can play their animations simultaneously, and they can each insert bp_climb and bp_jump at different times without any issues.
Although the performance is still a bit lacking, I will continue to optimize and improve it tomorrow.