[SUPPORT] Advanced Turn Based Tile Toolkit

Thanks that worked!
I think I may have found another bug, this time with that character switch: Switching units on the same faction back and forth works as a player 1, but when player 2 (faction doesn’t matter here, it’s always the faction that goes second) does it, it gets a stuck after one switch. Is this intended?

EDIT: While I’m at it here is another bug:
PassThroughFriendly movetype messes something up in pathfinding. If you have some way of moving twice in a single turn like the sprint command => pass through an ally with the first part of the move, your unit is able to move into the same tile as the ally unit. Sometimes the ally gets another move after “merging” with an ally too. [GIF]](https://imgur.com/a/EjMMDmj)

Thank you very much for this! :slight_smile: I got it working so when I step on this specific tile the unit loses health! :smiley:

I have another question for you, do you have somewhere I can attach to in order to trigger this tile at the start of every turn? So for each unit the user has, if it is still standing on the tile at the start of the their turn, each of them that are standing on one will take damage?

[quote=“, post:2649, topic:21930”]

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.

@, Thanks for your proposal, I am stuck. Sorry, but I have not enought skill to do that by my self. But I ask for this solution (to add a button), because on mobile (android), touch input is not working well, I saw on trello that you mentionned there is a bug, and need to disconect event tick to allow touch input to work. But no result on my side. I am surprised not to see more comments on issue with mobile, am i the only one ?

Thanks for your help.

Hey ! First off, I’d like to say I’m loving this toolkit so far. You did a great job with it.

I’ve been trying to create an ability that allows a unit to spawn new AI units during a game and found a bug in the BP_Unit ConstructionScript. The link is missing from Sequence 1 to the Branch. It resulted in new units not being properly added to the grid and initiative order. Was there a reason this link is not there? I’m guessing it was deleted by accident.

Hey guys, sorry for the late reply. I’ve been busy. I’ve decided to upload the latest version after all, just without the incomplete overwatch stuff. Will hopefully be sent to Epic today.

Fingers crossed!

Thanks for letting me know about these issues. I was not able to replicate any of these bugs on my current build. Hopefully this means that I have fixed the problems as part of my more general changes. If you are able to replicate the problems after I’ve uploaded the new update, let me know, and I’ll get it fixed along with the next “overwatch” update.

@, Thanks for your proposal, I am stuck. Sorry, but I have not enought skill to do that by my self. But I ask for this solution (to add a button), because on mobile (android), touch input is not working well, I saw on trello that you mentionned there is a bug, and need to disconect event tick to allow touch input to work. But no result on my side. I am surprised not to see more comments on issue with mobile, am i the only one ?

Thanks for your help.

[/QUOTE]

It should not be necessary to do anything more than disconnect the EventTick in the player controller. In what way is touch input not working well for you?

Oops, seems like I forgot to reconnect that after I did some testing. Again, this is fixed in my current build which should be live in a few days.

@ I have disconnected event tick, the path is not workink now, and input touch is randomly working. I try on different mobile (all android). I am a bit upset, because my game is nearly ready, but not palyable on mobile. have you any idea what is going wrong. I just make the test with your project, changing nothing. kind regards.

Ok, I’m sorry that you’re experiencing these issues. Last time I checked touch controls they worked fine, but I might have changed something that had an impact I did not expect. Testing touch controls is a bit more cumbersome than testing other features, but I will try to make the time for testing this out tomorrow and report back my results. Sorry for the inconvenience.

Thanks, I will wait you, tell me when you think it should be ok, I will make some try.

I’m carefully holding back my development, and looking foward to releasing of new version ATBTT. Great asset.

good day,

can I get tips/advice on making 2 units move at the same time(or almost at the same time) different paths, different locations.

ive tried using the functions but if i issue a pathfinding/move instruction on one unit… and then issue another unit movement, the “old path” is ignored, and both units end up in the “end point” of the 2nd pathfinding. How would I approach “modifying” the toolkit to allow 2 simultaneous units to move at different paths in just 1 turn. ? Im trying to setup a “cinematic” thing, where units move (pre set locations) … and it would look strange if they move one after another… Like for example i want to move 2 guards(units) like a “parade”

im using the old toolkit (for unreal engine 4.18)

thank you… im just looking for advice on how i would approach it. as Im at a loss (i tried getting local copies of the :Can Move to array", path index array, unit path spline etc… in the hopes of having each unit have their own variables, and not getting overwriten by another call to the “pathfinding” function in the grid manager

Sorry for my very late replies these days, guys. My thesis defense is in just over a week, so I have little time for anything else than preparing for that. Things will be a lot better after, I promise. Until then I cannot afford to do any extensive testing for any questions. I will answer what I’m able to answer off the top of my head, but until after the 8th of May my support will unfortunately be pretty minimal. I hope you all understand, and I will prioritize solving the problems that have been asked when I’m done.

I did try to test this out today. Unfortunately there seems to be something wrong with how I set up the Android SDK on my new computer, so I was not able to launch the toolkit on mobile to test. Unfortunately, troubleshooting why Android is not working takes too much time for me right now, due to the reasons mentioned above. I will prioritize your request after I’m done with my thesis defense. I know you said your game was basically done except for touch, so sorry about the delay. I hope you can work on polishing some other features in the meantime.

Thanks! The new update is live. I’ll write the notes on it when I have the time. Until then you can see here: Trello

This does not include the overwatch ability yet, but several other changes.

For this I would really recommend using a newer version of the toolkit. Making simultaneous actions easier is one of the major benefits of the action system. Using the action system you can select “withPrevious” for your second move action and they should play simultaneously. Are you so far along in your project that updating is not an option? Since you’re using a version that is more than a year old and before I did my biggest refactoring I’m not sure how this could be done off the top of my head. If updating is impossible for you I will download the old version and take a look after the 8th of May.

Hola , he vuelto. I was a bit absent because my brain kept repeating “you havent done any art in a while so get yo as$ back to Zbrush!”, but now that the itch is over I can return to studying the toolkit. So I rewatched the Turn Manager video (timestamps in the comments), and made some notes and questions. Anyone feel free to address them if you have any comments or remarks, I would super appreciate it; specially the questions, since those are obviously my biggest doubts I came upon when watching the vid.

My plan would be to do the same with the Ability system videos next before returning to full-on experimenting with the ATBTT again. Good luck with your thesis too ! Best of luck to you.

**Turn Manager

Sort Objects in Order **

  • Unless shuffled, the array is not ordered entirely randomly - their order will vary depending on which was the last element modified in the viewport, which is undesirable.
  • The** Local Sorted Objects** array will initially be empty. Because of this, the first time an actor passes through the ForEachLoopWithBreak it’ll go through the Completed route and add itself to the empty Local Sorted Objects array. By the end of the function though, this array will include all the actors that have initiative, and whatever is at index 0 is the unit that’s currently active (or about to be).
  • The Turn Manager itself is also added to the initiative array, in order to keep track of the current rounds/turn number. It’s default initiative value is set to a super high value (1000000) so as to always be first when the game starts.

Begin Actor Turn Event

  • This event is called by the Start Match event.
  • There are two similarly named variables here: Active Actor, an Actor Object Reference, and Active Unit, a BP Unit Object Reference. Usually the AA variable will contain the next Actor in-line coming with the highest initiative at the time, after which it also becomes the AU, which will let variables contained within to be accessed more easily. Exception to this would be when the Turn Manager is the AA for example - it will never become an AU too.

1- (7:29) I understand these as safety checks, though I wonder if they are really necessary, like the IsValid pin here (or the isValid pin in the End Turn function). In which situation would this prove useful? If I had an invalid actor, I’d imagine I’d encounter issues way before here, like in the Sort Objects in Order function that sorts actors into the initiative array…?

2- (09:12) Set w/ Notify - What is this kind of node? I understand it calls a function and sets a variable (which comes first though I do not know), but what is this blueprint pin type called so as to investigate it a little more in the unreal docs? Given that I create it by simply selecting Set Active Actor (picture below), I would normally think it is no different than a simple Set pin, yet this one comes out saying Set w/Notify. I’ll chalk this one up to BPs being sometimes a bit confusingly designed…

https://forums.unrealengine.com/core/06cfdf0e-35db-4ab6-b806-1b0b34e94c51

pastedImagebase640.png

3- (09:48) “If it is a unit, we set the BP Unit as the new Active Unit. If not, we set the Active Unit as empty.” Why/What would be the point of setting it as empty? Won’t that cause problems later?
4- And speaking of Active Unit, is it really that necessary to create it as a separate variable from Active Actor? Using the Search function I only found it being used in the Set w/Notify, where you only set its value, and then in the Swap To Unit function, where it is admittedly reference multiple times. Still, is it worth creating this variable for just this rare scenarios, or is it another modular-kind of convenience you created to accommodate for potential needs and projects in the future?
5- (11:20) I don’t fully understand the queueAction StoreTurnInfo’s purpose. To sum it up in one sentence without going into the nitty-gritty, is it correct to say it is something that waits till all Client are ready to see it, and gives the green light for that unit to start animating (by setting the Active Actor Animate variable)?

Turn Manager - Activate Actor

  • Keeps track of the number of rounds/turns. It also serves as a good function to add in turn-related events.

BP_Unit - Activate Actor

  • This event was designed to be called first when activating the unit, and its main purpose is to keep track of abilities’ cooldowns and status effects, if there are any.
  • It will check if the unit is using the Ability System - something which would allow the unit to have various abilities to select and choose from. At the end of this function, the Run on Turn Start function is called to activate any status effects that should occur at the beginning of the unit’s turn. Basic units lack an Ability System, so none of this applies to them.

BP_Unit - Reactivate Actor

  • Whenever a unit is activated or reactivated, if it still has action points, it will queue the Select action which will get the Player Pawn, the camera, to focus on the active unit.

Turn Manager - End Turn

6- (24:13) Why do you call the Player Controller by calling the Owner of the Active Actor instead of simply using the Get Player Controller pin? What’s the difference?

pastedImagebase642.png

https://forums.unrealengine.com/core/f7458015-a5c9-4b57-b59f-911bcb588fb2

Move Actor in Initiative

  • Moves Actors in the initiative array in various ways for different needs. It’s function will change according to the Selection enum states:

End: Moves actor to end of array. Default state. This actor will not move again until all others get a turn first.
First: Moves actor to top of array. Used for example in the BeginActorTurn Event, to put the next-in-line unit as the active actor.
Second: Moves actor to second to top of array. In what practical examples would this be needed? Is this currently being used in the toolkit at any point for example? *
Last in Faction: Moves actor to the end of its faction group of initiatives, before opposing faction starts. Could this be used to replicate Tab-switching between your team members in an firaxisXCOM-like game for example?
Remove: After the actor ends its turn, it will be removed from the array. Useful for elements which we only want activated once.
Any examples?*
First in Next Round: Moves actor right after the Turn Manager, which normally marks the division between rounds.

Check if Actor Will Act This Turn
7-(28:25) If I understand correctly, CheckIfActorWillActThisTurn’s result is really only needed for the forementioned firaxisXCOM-like Tab-switching?

And that’s it! Thanks for reading.

Dear ,
Good day! :rolleyes:

I have a quick question! It just blew my head off, but I was able to get a result! :smiley:
However, in order to make it clear I want to clarify how best way to add a unit to an already running game?

Our hero will get into the transport and be removed from the map (there is no problem with this), and then get out and continue the game.

I did as shown in the screenshot, that works, but there is a feeling that there is a simpler way. What I did with the PlayerID is not quite right?

Main Problematics:

  1. Owner // When spawning a character, I had to tie it to the owner // PlayerController
  2. From point one, the following problem appears. BPML_ATBTT // OwnsActor // PlayerController / PlayerState / PlayerID != ActorID**, **blocks spawn tiles when animate action starts.

Apparently, you need to bind the created unit to the owner and assign the owner ID for management, but I did not understand how to do it correctly.

There is no problem with the initiative and the grid! Everything is good here!)

Thank you in advance!!!
Best wishes, Kon.

P.S. I apologize for my English again :frowning:

Hey ,

Thanks again for everything you do!

I took your advice on putting InteractWithObjects in the SimulateMove function so I can have a character take damage when running across tiles. But, it seems the unit takes all the damage at the end. Is there anyway I can make the unit lose damage as its walking across the tiles?

Here’s a video to show you what its doing:

Thanks!

Hi , I remember you were working on a “climb ladder” feature. Now I’ve got the new version from marketplace, how to play with the new “climb” animation?

In order to avoid misunderstanding, one time you posted a gif, where the mannequin “climb” with hands, instead of slide up. This is what I’m talking about.

Hey all, as noted in my last post, time is in extremely short supply for me these days, for one more week. I’ll give you what answers I can give off the top of my head. If you need more in-depth answers please prompt me again from May 9th and onwards.

Thanks for the new writeup, ! This will undoubtedly be useful for other people, and certainly for me personally. It helps me see how clear I make my points and what I should go into in future videos. I do not have time to read through now, but I’ll return next week.

Are you using the very newest version? One of the things I added was automatic assignment of ID. It is in the construction script and looks like this:


And don’t worry about your English. It is good and you explain yourself well. English isn’t my native tongue either :wink:

This has to do with the action system. Even though damage is applied at the correct time according to game logic, when it comes to animations it will appear after movement as it is the next action in the queue. Making actions play well within other actions is one of the things that is really quite cumbersome in the current version of the toolkit. One way to do this is to bind the damage display effect to when the unit enters the appropriate tile during movement animation (when it call the OnUnitEnter event dispatcher), but it is a bit awkward to do. However, if you have a bit of patience, the very next thing I will be adding to the toolkit is an improved solution for animating actions within other actions.

The climb animation stuff can be found in the Experimental map in maps/Experimental. Be warned that it is not very polished yet, but it should provide a good starting point.

That’s awesome! It also depends on how much patience we’re talking about here :wink:

But also, I think you might have missed a question of mine from page 180, do you know of a place in the code that signifies its the start of a faction’s turn? A spot I could add some logic for the very start of that players turn? I’m wanting to InteractWithObjects at the start of every faction’s turn.

Thanks again! And good luck with your thesis :slight_smile:

Thank you for the reply @. Yes, unfortunately we are about 8 months in development and have very heavily modified the toolkit (custom dialog system, events before turns(for Regen, and Damage-Over-Time events, attack grid patterns-for magic attacks etc).

anyway, thank you if you ever do get a chance to check the old version and have an idea/solution to my quesition

off the top of my head, a solution for (multiple units moving with different paths) is to maybe send copies to all variables generated in the grid manager(when the pathfinding event is called) to the UNIT itself and have its movement base it on its own copy of the variables provided with the grid manager. so probably the path/spline etc.

Ill dig into this eventually. thank you

I’m at work right now but if you have a chance before is done with his thesis I’m pretty sure there was another user who was able to get two units to move at the same time (seperate paths for each unit) quite a few pages back. That user posted a few gifs showing his progress. If I get a chance when I’m off of work I’ll take a look and see if I can find it. I do remember this was after 's major refactoring he did of the tool kit so some info on how to do this should still be relevant.