Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Monokkel Hey - now things work quite well - we can trigger and stop combat from anywhere in the world - but as soon as combat reached game over state we're doing something wrong with resetting . we set currentTurn back to zero, reset TurnState to Turnbased - clear the GridUnits array and disable the GameOver widget - but somehow no unit want's to start it's turn when a new combat begins after the previous combat reached GameOver state - do you know anything regarding this problem?

    Comment


      Originally posted by Dan.Ott View Post
      Monokkel Hey - now things work quite well - we can trigger and stop combat from anywhere in the world - but as soon as combat reached game over state we're doing something wrong with resetting . we set currentTurn back to zero, reset TurnState to Turnbased - clear the GridUnits array and disable the GameOver widget - but somehow no unit want's to start it's turn when a new combat begins after the previous combat reached GameOver state - do you know anything regarding this problem?
      Are you setting bGameOver in the turn manager to false?
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        Monokkel Hi, an update and a new question on creating a random damage system. We finally came through with a solution that seems to work just fine but I would appreciate a quick look at the solution to make sure we are getting it right.

        We will probably have more variables that can effect the damage in the game so created a function in BP_Unit called Calaculate Damage. For now it just take two variables, Damage Min and Damage Max, and set the variable Damage via Random Float in Range.

        This function we call in the BP_Abillity_MoveAttack before the QueueAction and set a local variable DamageTaken to the value in Damage. This value we then use in QueueAction and as input to the TakeDamage function.

        Now to my question. As input to Target in the Calculate Damage function we use Owning Unit and it's seems to work just fine. When I look at the the input to Target in the TakeDamage function, and some other functions, you use a Grid Manager Ref. Is it because the Target is the targeted unit or should we use the same syntax as input to Target in our Calculate Damage function for some reason? If you have any other input to the solution feel free to point us right. I'm still trying to get the right feeling for working with blueprints.

        Click image for larger version

Name:	RandomDamage.PNG
Views:	6
Size:	170.0 KB
ID:	1642608

        Comment


          Originally posted by TrasanTheHero View Post
          Monokkel Hi, an update and a new question on creating a random damage system. We finally came through with a solution that seems to work just fine but I would appreciate a quick look at the solution to make sure we are getting it right.

          We will probably have more variables that can effect the damage in the game so created a function in BP_Unit called Calaculate Damage. For now it just take two variables, Damage Min and Damage Max, and set the variable Damage via Random Float in Range.

          This function we call in the BP_Abillity_MoveAttack before the QueueAction and set a local variable DamageTaken to the value in Damage. This value we then use in QueueAction and as input to the TakeDamage function.

          Now to my question. As input to Target in the Calculate Damage function we use Owning Unit and it's seems to work just fine. When I look at the the input to Target in the TakeDamage function, and some other functions, you use a Grid Manager Ref. Is it because the Target is the targeted unit or should we use the same syntax as input to Target in our Calculate Damage function for some reason? If you have any other input to the solution feel free to point us right. I'm still trying to get the right feeling for working with blueprints.

          Click image for larger version

Name:	RandomDamage.PNG
Views:	6
Size:	170.0 KB
ID:	1642608
          Hi again, I think your setup looks very reasonable Using a function that you can easily override or modify for getting damage is good practice when you expect you need this in the future. This also means you can easily add completely different damage calculations to different types of units.

          For your last question, all that matters is that you reference the correct unit. BP_Ability holds a reference to the owning unit that is set on activation, just to simplify operations such as this one (though you could do it through getting it from the grid manager to the same effect). I do not store the target unit in a reference variable by default in BP_Ability, since not all abilities will have a unit as a target. You could of course add such a variable to your ability if you're going to reference this unit a lot, to simplify things (and make the operations insignificantly quicker for the cost of an insignificant amount of memory), but it does not really matter.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Originally posted by Monokkel View Post

            Are you setting bGameOver in the turn manager to false?
            Yes - maybe it has something to do with the initiative order?

            Comment


              Originally posted by Dan.Ott View Post

              Yes - maybe it has something to do with the initiative order?
              Try testing it using break points. You could for instance add a break point to whatever code you are running to restart turn based combat and then step through the execution chain as it executes to see at which point it stops up. This will give us more to go on.

              Edit: incidentally this was my post number 1337! I feel this is really the point where I should have gotten the Elite forum tag.
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                Monokkel Thank you for this amazing toolkit! I'm trying to get the online multiplayer working but I have hit a little bit of a wall. The multiplayer works great in the editor so I've got that first step down. But when I try to make a build and connect to another player online the two instances of the game can't find each other. I believe a read a comment in this forum last year about someone who managed to get Steam Multiplayer working. Can you help identify the steps I need to take to get multiplayer working. It's our last big hurdle before doing our closed alpha testing. Thanks so much in advance.

                Comment


                  Originally posted by BlueAlchemyGame View Post
                  Monokkel Thank you for this amazing toolkit! I'm trying to get the online multiplayer working but I have hit a little bit of a wall. The multiplayer works great in the editor so I've got that first step down. But when I try to make a build and connect to another player online the two instances of the game can't find each other. I believe a read a comment in this forum last year about someone who managed to get Steam Multiplayer working. Can you help identify the steps I need to take to get multiplayer working. It's our last big hurdle before doing our closed alpha testing. Thanks so much in advance.
                  If you want to run ATBTT in multiplayer through steam you need to setup the Steam Online Subsystem. There is no specific setup required for the toolkit beyond what is described in the Unreal Engine documentation. Here is the link. Let me know if you run into any issues.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                  Comment


                    Originally posted by Monokkel View Post

                    Try testing it using break points. You could for instance add a break point to whatever code you are running to restart turn based combat and then step through the execution chain as it executes to see at which point it stops up. This will give us more to go on.

                    Edit: incidentally this was my post number 1337! I feel this is really the point where I should have gotten the Elite forum tag.
                    Congrats to your Elite status !

                    Just noticed turnmanager - always seems to be at initiative index 0 - displayed as the sand clock remains first in the initiative bar and is stuck in it's "turn" once gameover state is reached and a new combat is started

                    Comment


                      Hey Monokkel Thanks for the prompt response. Do I have to use Steam for multiplayer in ATBTT? Or is there an easier way to get it working? Also I'm having trouble with the hover tile marker and spline. They only appear on some of the tiles seemingly at random. They also tend to lag a bit. I'm not sure what is the cause of this. I have made a lot of changes to the toolkit but I haven't been able to find a solution for this. Any idea how to fix this?

                      Comment


                        Originally posted by Dan.Ott View Post

                        Congrats to your Elite status !

                        Just noticed turnmanager - always seems to be at initiative index 0 - displayed as the sand clock remains first in the initiative bar and is stuck in it's "turn" once gameover state is reached and a new combat is started
                        Well, the Turn Manager should be at index 0 of the initiative array, as it signals the start of a new turn. Test it out with breakpoints, starting with the node you use to start a new combat, and see where precisely the execution chain stops.

                        Originally posted by BlueAlchemyGame View Post
                        Hey Monokkel Thanks for the prompt response. Do I have to use Steam for multiplayer in ATBTT? Or is there an easier way to get it working? Also I'm having trouble with the hover tile marker and spline. They only appear on some of the tiles seemingly at random. They also tend to lag a bit. I'm not sure what is the cause of this. I have made a lot of changes to the toolkit but I haven't been able to find a solution for this. Any idea how to fix this?
                        You can test out multiplayer in the engine itself (though setting number of clients), but to properly test you'll have to use some networked solution. Steam is the one I have personally used for testing, and I think it is one of the simpler one to set up. Are you having any problems with it?

                        The tiles lagging and not appearing on certain tiles could be caused by any number of things. Does this happen only on certain clients? Are you using different height levels and it only seems to happen at certain height levels? Perhaps you can record a short clip of it so I can get a better idea of what might be going on?
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          Monokkel

                          Hello, I've been having a blast with the toolkit so far and i'm slowly chewing through the base stats and added some extra's and i'm currently trying to work through and change the initiative system to suit what I'm wanting, but every time I modify the players Initiative value, it adds 100 to it, then if I change to Faction 3 it adds 200 to it and i'm having troubles finding what's causing this to happen.

                          I haven't actually edited the Initiative files yet, i'm just trying to see what happens when you set two values to the same number.

                          Comment


                            Good day Kurt. You have lelp me already alot. But i still have a question. Last time for disable selection unit at start game i did what u said:"In the "Begin new turn" comment box in the Event Graph of BP_TurnManager, at the rightmost node that calls EndActiveActorTurn set AutoNextTurn to false.".And its work nice. But only for faction Player. How can i do same for faction Enemy?

                            Comment


                              Originally posted by Monokkel View Post

                              Well, the Turn Manager should be at index 0 of the initiative array, as it signals the start of a new turn. Test it out with breakpoints, starting with the node you use to start a new combat, and see where precisely the execution chain stops.
                              It gets stuck in WaitForOngoingActions in TurnManager's BeginActorTurn with TurnManager being the active actor. Can not figure out what's the difference to the first time combat starts here.

                              Comment


                                Originally posted by OnyxBlackfire View Post
                                Monokkel

                                Hello, I've been having a blast with the toolkit so far and i'm slowly chewing through the base stats and added some extra's and i'm currently trying to work through and change the initiative system to suit what I'm wanting, but every time I modify the players Initiative value, it adds 100 to it, then if I change to Faction 3 it adds 200 to it and i'm having troubles finding what's causing this to happen.

                                I haven't actually edited the Initiative files yet, i'm just trying to see what happens when you set two values to the same number.
                                Hi there, glad to hear you're enjoying the toolkit. The initiative system is unfortunately a bit clunky at the moment, but hopefully you can modify it to suit your needs. I am currently working on an update that will improve the initiative system specifically.

                                For the initiative automatically being set to 100, 200 etc., this is because of construction script code in BP_Unit_Anim_Debug, which is a unit I've made for quick debugging. I do not recommend using this unit as a basis for your own units. Rather base them on BP_Unit_Anim (for skeletal mesh units).

                                Originally posted by Artem Saharniy View Post
                                Good day Kurt. You have lelp me already alot. But i still have a question. Last time for disable selection unit at start game i did what u said:"In the "Begin new turn" comment box in the Event Graph of BP_TurnManager, at the rightmost node that calls EndActiveActorTurn set AutoNextTurn to false.".And its work nice. But only for faction Player. How can i do same for faction Enemy?
                                A bit trickier, this one. This is also something that should be easier to implement after the next update. There is a strange tendency for support requests to show up concerning precisely the stuff I'm currently trying to fix :P That is probably a good thing, I guess.

                                Here is a quite hacky solution, but one that should do the trick (pastebin):


                                Originally posted by Dan.Ott View Post

                                It gets stuck in WaitForOngoingActions in TurnManager's BeginActorTurn with TurnManager being the active actor. Can not figure out what's the difference to the first time combat starts here.
                                Hmm, then it seems like there is some action that is started which is never ended. Try calling EndAction from the action manager. If that does not work, add this to the action manager to debug what actions are being called and see what the last one to be called was. It might give you a hint to why this ongoing action is being waited for and not completed:

                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X