[SUPPORT] Advanced Turn Based Tile Toolkit

Not sure. Can you show me what exact values you are putting into the function?

I’m following the beginner tutorials and I can create my own tile and change the edge costs, and all works well. The move cursor shows up fine on the GridManager tiles, but is does not display on my new tile. Any idea what I could be doing wrong?

I’ll have to guess, but perhaps the mesh of your new tile doesn’t have collision geometry? Or it doesn’t block PathTrace in its collision settings?

It has collision (simple) and collision is set to Block All which includes Path Trace. Anything else come to mind?

Yes of course, I have tested it with: MinDam=9 MaxDam=14 Critchance=100 Multiplier=1,5 Current Health=14 / Should be 100% killchance I think.

How do you handle a case where the levels have doors that can be opened/closed, as this will change the navigable area?

On further testing, the Move To square does not show up on top of any derived BP_GA_Tile or BP_GA_Tile_Square. Therefore, I must be doing something wrong

Hello Mono using the Experimental only thing I have changed is the name of the Enemy’s to GridEnemy and added to the main player the laser, sprint and grenade ability’s BP by adding the blueprint to main player but always run into the following Errors. got any ideas?

Blueprint Runtime Error: “Accessed None trying to read property CallFunc_GetComponentByClass_ReturnValue_2”. Blueprint: BP_Ability_Laser Function: Find Hit Chance and if Hit Graph: FindHitChanceAndIfHit Node: Calculate Hit Chance
Blueprint Runtime Error: “Attempted to access HealthBar via property HealthBar, but HealthBar is pending kill”. Blueprint: GridEnemy Function: Setup Health Bar Graph: SetupHealthBar Node: Create Dynamic Material Instance
Blueprint Runtime Error: “Accessed None trying to read property HealthBarMaterial”. Blueprint: GridEnemy Function: Setup Health Bar Graph: SetupHealthBar Node: Set Scalar Parameter Value
Blueprint Runtime Error: “Attempted to access ThirdPersonChild via property ThirdPersonChild, but ThirdPersonChild is pending kill”. Blueprint: GridEnemy Function: Construction Script Graph: UserConstructionScript Node: Cast To BP_ThirdPersonCharacter
Blueprint Runtime Error: “Accessed None trying to read property CallFunc_GetComponentByClass_ReturnValue”. Blueprint: BP_Ability_Laser Function: Find Hit Chance and if Hit Graph: FindHitChanceAndIfHit Node: Calculate Hit Chance
Blueprint Runtime Error: “Accessed None trying to read property CallFunc_GetComponentByClass_ReturnValue_2”. Blueprint: BP_Ability_Laser Function: Find Hit Chance and if Hit Graph: FindHitChanceAndIfHit Node: Calculate Hit Chance
Blueprint Runtime Error: “Accessed None trying to read property CallFunc_GetComponentByClass_ReturnValue”. Blueprint: BP_Ability_Laser Function: Find Hit Chance and if Hit Graph: FindHitChanceAndIfHit Node: Calculate Hit Chance

also odd glitch when combat starts a 2nd time the camera seems to be way off and does not lock on to the correct spots

Sorry for the late answers, but my wife gave birth yesterday so I have been quite preoccupied. I have a tiny bit of time now, so I’ll answer briefly, but it might potentially take a few days until I can reply properly.

Seems like same issue, different number? Critchance should be 1.00, not 100.00

Hard to know what you are doing wrong, but that means that the issue happens during grid generation. You can try to debug the grid generation functions yourself, wait for me to come back in a few days, or perhaps try to ask for help on the ATBTT discord.

The UpdateTilesInRange function can be used for this. I answered a similar question a few pages back in this thread if you need details.

Not sure about the second one, but the first erros happen because the abilities in the JungleRaid example for the most part assumes that your actors have some components. Namely that your unit have the ExtraAttributes and StealthUnit component and your GridManager has the stealth and cover components.

Thanks @. I apologize, I worded my question poorly. Even when I add a square that comes with the toolkit, the move cursor displays underneath it rather than on top. If I add a toolkit wall, it behaves as expected. I have not make any changes to the base code that you provided with the toolkit. Congrats, BTW! Is it a boy or girl?

Edit: I just tried your SplitAnimations level and the cursor doesn’t show on top of the teleporter either. Something you recently changed, maybe?

Congrats to you and your wife.

Hello! Been working with this awesome kit for the last week or so and have been enjoying diving into it, and these posts. I seem to be running into a problem with adding units at runtime and wondering if anyone has a VERY CLEAR and concise way to do so for absolute utter morons like myself.

I’d like to randomly spawn enemies across the entire grid each time the player gives an input, (X) in this case. I’ve duplicated the BP_Unit_Anim, just changed its color and thats it. Next, I’m running add some baddies from the grid manager (hopefully the right place to call it from). Everything seems cool so far. They spawn, move around, attack (for a while), then i get:

With no Ability component added to the BP_Unit_Anim_Enemy bp copy, i get:

Infinite loop detected. Blueprint: BPFL_ActionGetters Function: Get Action Name


Script call stack:
Function /Game/AdvancedTurnBasedTileToolkit/Core/Abilities/BP_Ability.BP_Ability_C:ReturnValue
Function /Game/AdvancedTurnBasedTileToolkit/Core/Abilities/BP_Ability.BP_Ability_C:ExecuteUbergraph_BP_Ability
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_TurnManager.BP_TurnManager_C:BeginNextValidActorTurn
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_TurnManager.BP_TurnManager_C:ExecuteUbergraph_BP_TurnManager
Function /Game/AdvancedTurnBasedTileToolkit/Core/Units/BP_Unit.BP_Unit_C:DeselectActor
Function /Game/AdvancedTurnBasedTileToolkit/Core/Units/BP_Unit.BP_Unit_C:ExecuteUbergraph_BP_Unit
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_TurnManager.BP_TurnManager_C:RunOnActorDeselected
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_TurnManager.BP_TurnManager_C:ExecuteUbergraph_BP_TurnManager
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_PlayerController_ATBTT.BP_PlayerController_ATBTT_C:ActivateAbility
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_PlayerController_ATBTT.BP_PlayerController_ATBTT_C:ExecuteUbergraph_BP_PlayerController_ATBTT
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:InitializeQueuedActions
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:ExecuteUbergraph_BP_ActionManager
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:MulticastInitializeQueuedActions
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:ExecuteUbergraph_BP_ActionManager
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:RunNextAction
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:ExecuteUbergraph_BP_ActionManager
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:EndAction
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:ExecuteUbergraph_BP_ActionManager
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:RunNextAction
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:ExecuteUbergraph_BP_ActionManager
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:EndAction
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:ExecuteUbergraph_BP_ActionManager
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:RunNextAction
Function /Game/AdvancedTurnBasedTileToolkit/Core/BP_ActionManager.BP_ActionManager_C:ExecuteUbergraph_BP_ActionManager
Function /Game/AdvancedTurnBasedTileToolkit/Core/Abilities/BP_Ability_MoveAttack.BP_Ability_MoveAttack_C:AnimateAction
Function /Game/AdvancedTurnBasedTileToolkit/Core/Abilities/BP_Ability_MoveAttack.BP_Ability_MoveAttack_C:ExecuteUbergraph_BP_Ability_MoveAttack
Function /Game/AdvancedTurnBasedTileToolkit/Core/Abilities/BP_Ability.BP_Ability_C:AnimateAction
Function /Game/AdvancedTurnBasedTileToolkit/Core/Abilities/BP_Ability.BP_Ability_C:ExecuteUbergraph_BP_Ability
Function /Game/AdvancedTurnBasedTileToolkit/Core/BPFL_ActionGetters.BPFL_ActionGetters_C:GetActionName



With Ability component added to the BP_Unit_Anim_Enemy bp copy, i get:
Blueprint Runtime Error: “Attempted to access index 0 from array CallFunc_GetIntegerArray_Integers of length 0!”. Blueprint: BP_Unit Function: Update Ability Box Graph: SplitArray Node: Add

And no enemies move. I’ve tried nearly everything I can find in these threads, (including the other attached fix) and I very well may have missed something really obvious. Any insight would be infinitely appreciated!

Ok sorry for the delay, people. Turns out newborns are quite time consuming. Who woulda thunk?

For the teleporter I think it is simply the case of its mesh not blocking PathTrace, meaning that the tile the teleporter is placed on is added as a GridLocation at startup instead of the top of the teleporter. As the hover marker shows up at the GridLocation, it will be hidden by the teleporter.

Hard to know what might be going wrong in your setup. Perhaps you could share a screenshot or short clip of what is happening?

Thanks ! These last few days have been pretty intense :slight_smile:

Hmm, not sure exactly what is going on here. Thanks for the detailed explanation, but I’m a bit too pressed on time to test this out personally these days. I have suggestions for a few things you can test, though. If you spawn a single unit with this setup, do you get the same issue? If you spawn a significantly smaller number of units to you get the same issue? What if you add a gate, checking if GridUnits does not already an index on the tile you spawn the unit? What if you use just the regular unmodified BP_Unit_Anim blueprint, all using the default ability? If you can provide answers to these it will help narrow it down, so that I can come up with a suggestion.

Congrats on the baby you where totally right on the components thing I needed to add it to the enemies as well and needed the ExtraAttributes and that fixed everything thank you. will understand you have limited time but wondering a similar thing as above post when I use the following below in the hybrid example noting change but the trigger for combat I added the following to spawn a unit with AI checked and enemy but when it becomes its turn all I get is end turn and the unit does noting.

Hey, no worries, man, I didn’t see your last post on the new mini-human before writing, so by all means ignore silly bug questions and enjoy your time with the little one. They really do grow up crazy fast. Congratulations!!!

codeyhanson, this may or may not be helpful, but so far I’ve fallen back to randomly spawning units NON-realtime and doing a trace check if there are any top down objects in the way (trees, rocks, buildings, whatevs). One thing of note, this doesn’t correctly check if it hits another editor-added unit and also doesn’t guarantee a fixed number of enemies are actually spawned. Still have to work on that this afternoon, but planning on re-looping over the grid until the enemy unit count meets the desired number, then breaking the loop).

Best to you all!

So here is a video link for the camera problem if anyone else has any ideas basically in the experimental build if you add the ability’s component to the player character it will cause the camera on the turn base mode to get out of place on the 2nd combat u can see this is the video below. first go in video is the glitch or error 2nd go around I remove the ability’s and it works just fine.

https://www.youtube.com/watch?v=y5L8…ature=youtu.be

Also thank you for the reply darthje5u5 but in my case it did not help.

Congratulations ! I hope your baby is doing good and mother is recover good as well. Hope you enjoyed sleep while you could. About my last question regarding ai and the hybrid map. I have my ai tree set to stop when combat begins but in order to do this I have to use my own ai controller. What I would like is to switch npc’s from my ai controller to yours for when combat starts and back again to mine after combat. Any ideas how/where I can do that or do you think it’s best to use my ai controller for both (that’s gonna be quite some modifications but I’m ok if I cant avoid it). Thanks and welcome to being a dad.

Hmm, hard to know for sure without testing (and time is a bit tight atm), but I can tell you what I would test first. Does this work with regular BP_Unit_Anim units? If so, this might be tied to the ability system.​

Thanks! I’ll try to respond when I’m able, but my responses will likely take longer for a while, and I might only rarely have the time to test stuff myself in engine.

Thanks for chiming in with the suggestion. Personally I would keep it to arrays as much as possible. Checking the GridUnits TMap before spawning would ensure you don’t spawn on top of any existing units. Checking GridLocations ensures there is a valid tile there. Checking GridEdges you can check that there is a tile there and that it is connected to at least one other tile.

Thanks for providing the video. Unfortunately I’m still not sure what the issue could be here. Some unpredicted interaction between the experimental hybrid code and the advanced ability system that I have not tested for. I would have to test this out myself. I will try to get to it as soon as possible, but it might take a few days before I have the time.

I think shutting off the AI Controller and starting it up again should be simple, though I cannot be sure without knowing your exact setup. Isn’t a simple UnPossess call working?

Thank you so much and take all the time you need with the Baby no rush really this is a hobby of mine till I get further in we are a small team of 5 trying to make a 3D stardew valley like game with your combat system.

to answer your question it works fine with the debug units yes. its only units with the ability system on it.

Heyho, congratulations from my site aswell, I can feel with you, my mini-human is 1,5 years :slight_smile: What I can tell you is, that everything gets easier with every month till now.

Chance to kill is now working fine though it needed some more modifications too, big thanks again.

Is there any chance to make it 100% sure for AI turns in a row, that the next AI unit will only start calculating/acting by any meanings when the first AI unit is completely done (exhausted). I am using the turnmanager initiative without modifications and sometimes the next AI unit starts calculationg things even when the first one is still moving f.e. I tried a bit with the macro “waiting for ongoing actions” but have no success till now.

Maybe you can give me a quick hint what you would do to make this 100% sure.
Thanks in advance and enjoy your time with the mini one :slight_smile: