[SUPPORT] Advanced Turn Based Tile Toolkit

Ah, very interesting, I didn’t consider looping animation, That is probably what it is. I will check into it. Probably the same reason why with the Ability Ranged attacks with a Delay in them, I had to save all the inputted values from FAction to local variables so not to get errors after the Delay. Makes sense now. I struggled to get those Ranged abilities with a Delay in them to work right for like 2 weeks, and it was probably just due to looping animations, sigh! Learn something new every day I guess.

EDIT: Yup, that is what it was, had Looping Animations set to On in the Unit State Machine for Get Hit, Attack, and Dying on all my characters.

Later, Loco

Good day ,

Thanks, you are awesome,
Loco

Hi all,
Is it possible to have just a quick reply on how, I can have a button to validate movement and to validate attack, like “end turn”. it is for a simple use on mobile: move and attack no other ability for instance.

Thanks,

Hi all,

Could somebody, give me a quick answer, on how, (what event to call) to have a button on HUD to validate move, and another to validate attack. It is for a simple use on mobile move, attack, no other ability.

Thnaks

hi

I manage to sort the problem. I am having few new ability that I made and almost all them use in some point the possible targets data. I didn’t want to run the function each time I switch ability, and find a way to transfer the data from the first run into the other ability.i bet you don’t understand what the hell am i talking about :slight_smile: well I will save the long explanation to more heavy and important question I will have.

anyway thanks for the help

leo

Great! I’ll do that, then.

You’re thinking about it the correct way, and indeed being able to move the move action before or after the action happening during movement does not solve the problem of having an action play while movement is still ongoing. It does however work as a marker to signal the need for calling custom logic to allow for this. The challenge of finding the best way to have actions happening within other actions is one of the issues I’m most hoping to find a better solution for. I’ve tried a few different approaches, and you’ll see them at various places and in various versions of the toolkit.

The first is my original overwatch shot implementation, where the event dispatchers called during each move step called an event in BP_StatusEffect_Overwatch. This event checked if the moving unit could be seen by an enemy unit with overwatch for each step. If it did, it ran the server side code for shooting the unit and bound a new event to the move action. Now during the move action, each step would trigger a different dispatcher, which would fire this new event in the overwatch status effect. If the grid index matched the one which was fired at during simulated movement, the overwatch shot animation would trigger.

While this worked it was pretty hacky and cumbersome, and sometimes buggy. This is why I’ve removed it temporarily while trying to find a rework. You’ll see two other implementations for actions happening during movement in the 2D example and in the experimental map, either of which might be what I end up using for a new overwatch ability.

For the 2D example map I simply treat each movement step as a separate action. This creates a potentially huge queue of actions, but it is very straightforward. In the experimental map things are a bit more involved, where I intelligently create a separate action for each part of the movement where something differs. A final overwatch implementation might involve queuing three actions: 1) Movement before overwatch shot; 2) the overwatch shot and 3) movement after the shot/death.

I’ll put it on my long list :P. The correct way is to calculate the stuff using the grid manager before calling the action and passing the output of this into the action arrays.

Should not matter in this case. Though if you have lots and lots of different such actors in your game there are better options. I would then recommend using my GridObject system, which I use for picking up items and activating switches in the 2D example map.

Yes, it is a common issue and looks quite confusing the first time it happens. I’m thinking of adding some sort of warning message if the toolkit detects that something like this is happening, though I haven’t thought of a good way to do this yet.

This could involve storing the clicked index in the ability when you have clicked, but not executing the ability completely. Then you could run an event on the UI to show a button. You could perhaps do this by getting the HUD from the player controller and calling an interface event. This button could then find the active ability through the player controller and call an event (such as ExecuteAbility) on this ability, using the variables you stored from your inital click.

So what you’re saying is that all the abilities have the same attack range, so you feel it is necessary to find the targets anew every time you activate a new ability? The functions for finding units is quite efficient, so if it is a performance reason for this I would not worry too much about it. However, if you still want to do this, I did something similar for pathfinding for the AI. If you look at the AI code in BP_Ability you’ll notice that before pathfinding is calculated it checks a variable in the ability system component of that unit to see if pathfinding has already been calculated that turn. If so it uses the pathfinding output stored in the ability system component. You could do the same thing for storing targets if you feel the need.

hi

its funny, that is almost exactly what i did in the end for my solution. if only i explained it better for you in the beginning i would have saved a lot of time with your solution :)but i guess i heaved learned a lot during this process.

again thanks a lot for your time

cheers
leo

Can’t edit the post for some reason in this machine; “error_information_x” keeps popping. I’ll try again in another machine today and if that fails too I’ll delete the post and make a new one with the updated info.

Ah, ok. Reading your earlier comments again I’m sorry I didn’t pick up on your meaning. Glad you figured it out and learned something in the process, at least :slight_smile:

Try again a bit later. If not, people following the link will likely also see my comments.

Yeah, post updated successfully. If you want me to change anything later do tell and I’ll be happy to do so. The problem must have been something with the PCs at work where they don’t like us much posting anything online.

Looking forward to more ATBTT news! winkwink :^)

Edit: I see you posted the link in the 3/3 video description. Most of what I wrote came from video 2/3 though, which was more about the theory and graph explanations, in case you want to add the link to the description there too.

Edit2: Just thinking about your comments saying you still needed to apply satisfactory solutions to certain points in the toolkit. This might be a silly idea, but if it helps, maybe you could download xcom 2’s mod source code which contains all the game’s logic commented by the engineering team behind the game. It’s all in chinese for my skill level, but in your case it could hopefully spark some new ideas for solutions, in case you wanted some.

@monokel thanks for your reply. I will try it, but seems not so clear for me, Will let you know, if I succeed

Hi, I searched the thread but I may have missed the answer: How to scale grid size? Like, what is the official way of doing that? Because I want to shrink it to a very small level.
In a post you mentioned this could be achieved by adjusting the default tile static mesh, and you were going to give some formal solution to that.
Plus, I found “tile bounds x” and y in grid manager, but they are in “DO NOT EDIT” category.

Thanks in advance!

Thanks, I’ve moved the link to the second video. I have considered downloading the source code before, and I’m sure there is stuff to learn there. I have this weird thing that I want to solve every problem on my own from the ground up, which is sometimes counterproductive.

Ok, sorry if I was not as clear as I could be. See how far you get from my description and if you get stuck again I’ll try to go more in depth.

In the newer versions of the toolkit you should be able to just scale the grid directly (setting the scale of the grid manager). I try to correct for the transform of the grid manager in all relevant parts of the code. There might potentially be a few cases I’ve missed, as I do most of my testing on a normally scaled grid, so if you see any weird scaling issues after doing this, please let me know.

Understood. Please see whether this one reproduces on your side: after scaling the grid manager, and scaling the unit melee player pawn at the same amount, the unit does not snap to grid properly. Also, if scaled pawn, the health bar doen’t scale with it.
If it’s just me, maybe I modified something accidently. If this also appears on your side, you can tell me where to look into, or where to modify, so I can more quickly position the issue, thank you :slight_smile:

Also I want to ask this, although it’s not necessarily about ATBTT: when I’m trying to debug snapping, and (I thought it might be within the construction script) press F9 on a construction script node, and move the pawn/ start the game, the breakpoint is not hit. Any ideas?

ok, thanks for letting me know I’m currently traveling so I won’t be able to look at this until tomorrow but it will probably be a quick fix. It is likely I’ve forgotten to adjust for the grid manager’s transform in the grid snapping functionality in the construction script of BP_GridActor.

@FuTou: Okay, managed to test this. Grid snapping seems to work fine on my end. Are you able to replicate this issue with a fresh project, and if so how? Also, I think construction script code might not work well with break points in UE4 generally.

Hope you had a good trip :slight_smile: These days I’ve been looking into the issue in my tiny map, which is in a ArchViz scene, on the table. There are random issues, and snapping went good after I changed something (I’m not sure which one). Now it’s having other odd issues, which I’m still checking. I’ll ask you when I’m exhausted in finding the issue, haha.
For construction script, yes, I saw Unreal said only when it’s ran at PIE state can it be hit with breakpoints, thanks.

As now I’m thinking, because I imported atbtt assets into a c++ project which had other setup, maybe there are some stuff that didn’t come along well with asset migrating, do you think it could be the reason? I manally fixed the project input settings, but there could be other stuff that I’m missing?

FYI, yesterday I added grid manager actor location into account when dealing with “check outer Bounds” of BP_grid_camera. Guess maybe you can also check that