Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment


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

      Comment


        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

        Comment


          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.

          Originally posted by E-tales View Post
          Thanks, I will wait you, tell me when you think it should be ok, I will make some try.
          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.

          Originally posted by FuTou View Post
          I'm carefully holding back my development, and looking foward to releasing of new version ATBTT. Great asset.
          Thanks! The new update is live. I'll write the notes on it when I have the time. Until then you can see here: https://trello.com/b/FlK7ccYO/advanc...d-tile-toolkit

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

          Originally posted by chriscast View Post
          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
          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.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Hola Knut, 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 Knut! 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...
            ‚Äč
            Click image for larger version  Name:	pastedImagebase640.png Views:	1 Size:	17.3 KB ID:	1613396

            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?

            Click image for larger version  Name:	pastedImagebase642.png Views:	1 Size:	30.9 KB ID:	1613397

            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.
            Last edited by Justo; 04-29-2019, 05:54 PM.
            Artstation | 3D Artist | Krakow

            Comment


              Dear Knut,
              Good day!

              I have a quick question! It just blew my head off, but I was able to get a result!
              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

              Last edited by Konruseyd; 04-30-2019, 12:27 PM.

              Comment


                Hey Knut,

                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: https://www.dropbox.com/home/ShareX/...lmnNC6XDGx.mp4

                Thanks!

                Comment


                  Hi Knut, 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?

                  Comment


                    Originally posted by FuTou View Post
                    Hi Knut, 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.

                    Comment


                      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.

                      Originally posted by Justo View Post
                      Hola Knut, 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 Knut! Best of luck to you.
                      Thanks for the new writeup, Justo! 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.

                      Originally posted by Konruseyd View Post
                      Dear Knut,
                      Good day!

                      I have a quick question! It just blew my head off, but I was able to get a result!
                      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
                      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

                      Originally posted by Zennisin View Post
                      Hey Knut,

                      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: https://www.dropbox.com/home/ShareX/...lmnNC6XDGx.mp4

                      Thanks!
                      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.

                      Originally posted by FuTou View Post
                      Hi Knut, 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?
                      Originally posted by FuTou View Post

                      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.
                      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.
                      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                      Comment


                        Originally posted by Monokkel View Post
                        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.
                        That's awesome! It also depends on how much patience we're talking about here

                        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

                        Comment


                          Thank you for the reply Knut. 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

                          Comment


                            Originally posted by chriscast View Post
                            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 knut 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 knut's major refactoring he did of the tool kit so some info on how to do this should still be relevant.

                            Comment


                              Hey Knut, I have ANOTHER question for you, sorry for so many..

                              But in the example map you're able to switch between your units freely during your turn, and they can all act in a different order. I'm trying to do the same thing in a new level using the Medic actor, and the Heavy Actor. But, during my turn I'm only able to switch from Heavy to Medic, and can't switch back. Any idea on how to fix this? I tried searching this forum first but couldn't find anything.

                              Thanks!

                              Comment


                                Again have to give super quick answers, guys. It will be better late next week. This might be my last post here until Thursday, though maybe I'll have time for one more before then.

                                Originally posted by Zennisin View Post

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

                                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
                                Hopefully it should not take very long to implement. I had already come pretty far, but had to put it on hold because of my thesis defense. If it takes longer than expected I'll cook you up another solution. There are two somewhat hacky ways to do this; one hackier than the other. The first is to bind an event in your trap blueprint to the OnUnitEnterTileAnimate event dispatcher and play the trap effect and apply damage when the event is called and the unit that called it is at the appropriate tile (which you can store from when the unit enters the tile and triggers the trap during simulation). The other is to add a collision volume to the trap and have both it and the unit overlap the same collision channel. You can then visualize the damage on collision.

                                Originally posted by chriscast View Post
                                Thank you for the reply Knut. 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
                                Ok, I see. I'll try to think up something once I have the time, then. What you are describing is pretty close to what I'm doing. In fact the action system added after the refactoring is partly a system for storing variables for various things to animate separately. You could achieve something similar by having each unit have their own spline and array of location vectors, set these on start of movement and then reference them during movement animation.

                                Originally posted by Methosborgoff View Post

                                I'm at work right now but if you have a chance before knut 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 knut's major refactoring he did of the tool kit so some info on how to do this should still be relevant.
                                Thanks for chiming in. This is indeed pretty different after the refactoring. In the newest version you should be able to get most of the way just by checking bWithPrevious on the movement animation of the second unit to move.

                                Originally posted by Zennisin View Post
                                Hey Knut, I have ANOTHER question for you, sorry for so many..

                                But in the example map you're able to switch between your units freely during your turn, and they can all act in a different order. I'm trying to do the same thing in a new level using the Medic actor, and the Heavy Actor. But, during my turn I'm only able to switch from Heavy to Medic, and can't switch back. Any idea on how to fix this? I tried searching this forum first but couldn't find anything.

                                Thanks!
                                No worries about the questions. I'm just sorry I can't answer them properly yet. Unit switching and turn order stuff is a part of the toolkit that I still feel is unnecessarily complicated and ripe for a small refactoring. I'm guessing the reason for what you're seeing is that you're using a different ability in each example? The code for switching to other units is defined within the abilities (since they are the interface through which clicking and hovering the mouse is interpreted). If you use the same ability as in the first map, does the same thing happen? Another possibility is that it is caused by a bug that prevents unit switching when there is only one faction in initiative and you are on the last unit. I thought I had fixed this bug, but maybe not. Do you have units of another faction on the map where you are unable to switch?
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X