[SUPPORT] Advanced Turn Based Tile Toolkit

@ At now, I’m ok. No problem. Thank you!

If you’re using BP_Ability_MoveAttack as a base, when the ability is activated 2AP means the unit can move and attack and 1AP means that it can only attack. If you want it to be able to do both after an attack, make sure that the unit’s current AP is set to at least 2.

Great :slight_smile:

From a standard topdown template project how would I go about adding a turn
based encounter?

Take a look at the “Hybrid” map in Maps/Experimental. It shows how to set something like that up using the Third Person template. You should be able to do something very similar with the top down template. Try following that approach and let me know if you run into any difficulties.

Heya ,

I am using the hybrid/experimental version of ATBTT to create my game with free roam until combat. I would like to use a radial wheel to have the player select possible actions (movement, attack types, magic, etc…). Can you suggest a good spot in the code to insert my radial wheel creation? Any other suggestions for this type of game would be greatly appreciated.

Thanks,

Sounds kind of like the ability bar used in the Advanced map, but displayed on a wheel and that can be hidden/shown by clicking? If this seems right use the ability bar as a starting point, but change the layout to a radial wheel. Then in the player controller you can tie an input event to showing and hiding the wheel.

You can access the ability box like so:

Hi @ !

Because your help, my work is going good:D! Thank you!

Today, I got a suggestion. Of course, decision is yours. But consider this once please.

This is function “SetupTileMarkers” in BP_Ability

It check if grid manager is hex, then set the tile marker mesh and decal to hex.

I changed like this

In yours, for checking grid manager is hex or not, you use name of grid manager by GetClass.
Because of this, When I use new grid manager with inheritance, I have to change name of those parameter of GetClass functions.
To check if grid manager is hex or not, using the class name of grid manager looks not good in flexibility.

Especially, if I use many different grid managers in same game, this can be problem.

In here, I use casting to BP_GridManager_Hex, but I don’t think it’s best way. Maybe gameplay tag will be good option. Or, there will be more better way that I can’t imagine now.
(There are simmilar things in ATBTT. From now, I have to modify all of them.)

How do you think about changing the way to check if grid is hex or not? And, If you have more good idea about this, please tell me:)
I want to use your toolkit when you upgrade ATBTT continually, So I suggest this:)

Thank you!

Thanks for the suggestion :slight_smile: I agree that this part is one of the ugliest hacks in the toolkit, but it is mostly there for debugging purposes. In a real game I would probably not use that code at all, and it is set up so that it is ignored if the ability does not use the default hover marker mesh. In an actual game I expect people to either use only hexagonal grids or only use square grids, so there is no reason to have code that checks what type of grid you are using. So when making abilities for your game I recommend just selecting the components directly in the ability’s component hierarchy and assigning the mesh manually. The code is simply there for simple testing and debugging, so I don’t worry too much that it is not extendable, as I would not recommend extending on this code unless you’re making a very uncommon TBS that utilizes both hexagonal and square grids using the same abilities. Regardless, what you have changed might be a cleaner solution than what is currently in the toolkit and I will consider adding it in a future update.

Hey ,

Thanks for the tip on the ability bar to radial wheel switch. For my game, I like the free roam till combat trigger of the hybrid system, but I would like the combat (ability bar/or wheel) that is set up in your advanced map. Is there a way to combine the two?

Thanks

I cannot see any reason why it should not be able to combine the too. The advanced example differs only in the blueprint components added to the grid manager and units, while the Hybrid map differs from default by its turn manager and unit. If you add the CoverSystem and/or StealthSystem to the GridManager you’re using and UnitAbilitySystem, UnitExtraAbilities and UnitStealthSystem to the units you are using that should be enough. Let me know if you run into any difficulties.

, combining the hybrid and advanced worked like a charm. I have another question though, after reparenting the BP_ThirdPersonCharacter to my own custom character has caused the attack part of the turn based combat not to engage. I can click the movement icon and move, but neither the AI character or the player controlled character can attack. I once again thank you for any and all advice you may have.

Thanks,

P.S. The problem occurs when i click the attack icon, the blue(movement) squares disappear and the red (attack) squares never appear.

Hmm, odd. Could be any number of things happening, really. I’ll have to ask you to look into it a bit more if I am to give you a solution. What abilities are you using? If you’re using BP_Ability_Laser (the one from the advanced example), red squares only appear under enemy units in range and not on empty tiles. Might this be what is happening? If this is not the case you can try using breakpoints to see at what point the execution chain fails. For example you can add a breakpoint to OnClicked in WBP_Ability and then use FrameSkip to step through the execution chain. See if anything seems wrong here. Does the correct ability get activated? If so, is FindTilesInRange called etc. Give me a description of what seems to happen and I’ll try to help you out.

,

After making a few changes, I think my problems are related to changing the BP_ThirdPersonCharacter’s skeletal mesh and anim class to my own for use with the Advanced Locomotion System. I am unsure of how much using this anim class and skeletal mesh affects the ATBTT. Any advice would be greatly appreciated.

Thanks,

The animation blueprint interacts with the default abilities quite a bit. Mainly they handle the execution of actions called mainly from abilities and units. If you create a new animation blueprint using the default abilities you need to set it up so that it handles those abilities properly (such as calling EndAction). Take a look in ABP_Unit_Anim and see if it makes sense to you. I recommend seeing my tutorial videos on Custom Units as well as the Action System if you have not done so already. If you are still confused after looking through this, please describe your setup in more detail and I’ll try to point you in the right direction.

I’m trying to follow the teleporter tutorial on youtube but I can’t get the animations to work. I double checked it a few times but I can’t get it to work. Thank you.

Edit: Ignore that the event was unplugged from bind event in my screen.

Hey, hope all is well! I was wondering what’s the best way to customize the Grid Camera for the start of the game. Probably fairly simple but have been sort of lost on how to do it. The camera location is a bit offset and at an angle in relation to my grid, as well as more zoomed in than I would like. I’m looking to have it start more zoomed out and be in a relation to the grid aligned with one of the axes.

Additionally, if I wanted to have it switch to the other player’s side of the board when their turn starts could I simply set a static location to switch to on Begin Active Faction Turn?

Thanks!

Hey ,

I am making progress but I have run into a bit of a snag. Under BP_ThirdPersonCharacter I created a skeletal mesh and animation swap. I am able to get the swap to occur post combat in the BP_TurnManager_Hybrid by inserting LocoMesh before the LerptoThirdPersonandPossess node in EndTurnBasedMode. The problem I am having is finding the right spot to insert the switch back to TurnMesh(the original ATBTT mesh and anim) so the turn based system operates normally. I appreciate your time and consideration.

Thanks,

I’ve just tried the asset out after picking it up last week and I’m having an issue.

Tested this in my project and a new empty project.

Create landscape, create BP_GridManager_Hex. Align the two roughly. Place a BP_Unit_Anim on the grid. Play. Works OK
Same thing but sculpt the terrain a bit and enable… Procedural → Heighmap set to One Level. Does not work, the movement grid is offset and the guy wanders off the map when you click to move.
If I do the same test with square grid using BP_GridManager there are no problems. But I want a hex grid not a square one. So not really useful except to show that there seems to be a problem with the Hex version and not just a problem with what I am doing.

Hey everyone, UE4.23 is officially out and I’m working on an update. This might take a bit longer than usual as the update seems to cause a few more issues than what I’ve become used to. Should still not take terribly long, though.

Speaking of issues, private messages on the forums do not seem to work properly. I can only see the titles of the messages people send me, and the same seems to go for the messages I send to them (I can only see the preview text in my e-mail notifications). So if you need to get in touch, and have a reason not to post it in this thread, send me an email to [EMAIL=“knuteiliv@gmail.com”]knuteiliv@gmail.com. I hope @Fireskelet and @kjmccloud see this, as I have not been able to read their messages.

Happy to hear you figured it out :slight_smile:

Change the length and rotation of the camera spring arm component. Setting the yaw rotation to 0.0 should work for your purposes. Also, adjust the ZoomFloor and ZoomRoof variables for the max and minimum zoom distance. Make sure the SpringArmLength is initially set to something that is not outside these bounds.
For your second question you can call the PanToLocation event in the grid camera. You might have to disable bUseFollowCam or at least clear ActorToFollow before doing this to prevent the camera from following an actor.

Not sure I understand. You just want a sensible point for when to switch to the turn based mesh? Are you trying to do something different from what I am doing or are you simply struggling to replicate what I have done? A good point to call your event would likely be somewhere in the BeginTurnBasedMode event in BP_TurnManager_Hybrid, but I might be misunderstanding your question.

I’ve been able to replicate this issue. Thanks a lot for letting me know. It seems to be a specific bug for OneLevel heightmaps for hexagonal grids. With Multilevel or heightmap disabled there is no issue. I’ll make looking into this a priority and will let you know as soon as I have a solution. Probably a simple fix.
For the time being I recommend setting the grid manager to location 0,0,0 and moving the rest of the landscape in relation to the grid manager. This prevents the issue from occurring. I generally recommend doing this anyway, as it makes adding your own custom functionality simpler, as you do not have to correct for the transform of the Grid Manager (which I have obviously forgotten in this case)

Edit: Found the issue. Add the following to BP_GridManager_Hex:

Thanks for the quick fix. My terrain is about 3x3km and I’ve got the grid scaled up so each hex is around 100m. I’ve got everything offset so the center of the landscape is at 0,0 to minimize any floating point in inaccuracies at the extremes (considering going larger at some point, but using this as my minimum viable size). Having this issue now is a little serendipitous, as I’ve now learnt that the functions needed to convert to and from grid and world space exist :slight_smile: