Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    [MENTION=16997]Selentic[/MENTION]: I'll need to try packaging when I get back home again to see if I get the same warning. I cannot remember ever adding a vehicle blueprint, so that warning is quite odd. I'm trying to get rid of any and all warnings in the log for the next update. Do you get the same warnings with a fresh project or could they be related to your own additions?

    ps thanks! Enjoying my stay here so far
    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

    Comment


      Originally posted by Monokkel View Post
      [MENTION=16997]Selentic[/MENTION]: I'll need to try packaging when I get back home again to see if I get the same warning. I cannot remember ever adding a vehicle blueprint, so that warning is quite odd. I'm trying to get rid of any and all warnings in the log for the next update. Do you get the same warnings with a fresh project or could they be related to your own additions?
      It's possible, but I can't think of anything I added they would have come from either. I was also chasing down another warning previously about a tile grid actor i think it was called, and the only information I could find was a thread you made last year ish on answerhub with the same warning where you said it was some ancient asset that had been out of the toolkit for years. Since it doesn't say where the reference is coming from I can't tell, but I can't imagine what it's from.

      I'll give a fresh project a check, but it's not like it matters much anyway since as far as I can tell it causes absolutely no issues, just triggers me to see it in the log.

      hey while im here, have a picture

      Last edited by Selentic; 08-10-2017, 12:45 AM.

      Comment


        Hello [MENTION=4318]Monokkel[/MENTION]

        It Seems like there is a minor error in your project regarding waking units that I was wondering if you can help me with some insight on where it is actually happening and maybe how to fix it. Its nothing major, but would like to remove it as it is annoying to see haha.

        So this error happens if you one shot someone before they wake from the player. What seems to happen is that the enemy tries to wake itself, but since its destroyed, it has no reference to the enemy and some errors appear. The "!" still appears over where the enemy use to be and the sound goes off, but once I stop the project, that is when all the errors appear.

        It looks like somehow the find wake units get called before the enemy is destroyed, so it is stored in the wake units array, but when it comes time to actually wake the reference is change to null because it was destroyed. I just can't seem to pin down when it actually happend because sometimes the debugger on blueprints seems to not work and I can not see when things get called even though I know they do at some point (Debugger just completely skips and does not stop at breakpoint). I see that there is some code in the kill unit where it says if enemy's health is less then 0, dont wake it. Unfortunately it seems not to work and ive tried putting that in many different areas.

        Anyways, I figure I let you know, because I did alot of adjustments to the code, so to make sure It was not because I changed something I created a new project with just your template and recreated the scenario on the Jungle Raid Map (Same erros appear). I was hoping that maybe you could check it out and see what you think. Any Assistance would be appreciated.

        Thanks

        Comment


          Hello [MENTION=4318]Monokkel[/MENTION],

          i have a few questions about your ATBTT:

          1. Is it possible to use the ATBTT without pathfinding, and just using the WASD-direction-keys instead, for realtime grid based movement like up and down, left and right?
          The player should walk from tile to tile and push or pull objects from tile to tile
          2. Is it possible to locate a single tile in the world, to check, on which tile the player or a mesh is located right now for undo movement purposes?

          Thanks in advance!

          Comment


            Hi Monokkel,

            Thanks for answering my previous questions.

            I have another one, though. Is there any way to make the cost of moving to a tile truly zero? I think you set "0" as a shorthand for increasing the cost, somehow.

            I ask because I created portals, and I want the cost to jump between portals to be zero. I did this by making it so that if two tiles are portals, then I add each of them to the other's respective "edge array" and "edge array integer" elements. In those edge array element values, I set the cost to 1, so it takes one move point to jump from one portal to the other, which I don't want. However, if I set the cost to 0 then, for some reason, it costs two movement points to jump the portal.

            Comment


              Again, apologies for for the late answers. I've been serving as best man in my brother's wedding in France and the past few days have been very busy. Things should return to normality very soon and I'll be back to giving prompt replies.

              Originally posted by Selentic View Post
              It's possible, but I can't think of anything I added they would have come from either. I was also chasing down another warning previously about a tile grid actor i think it was called, and the only information I could find was a thread you made last year ish on answerhub with the same warning where you said it was some ancient asset that had been out of the toolkit for years. Since it doesn't say where the reference is coming from I can't tell, but I can't imagine what it's from.

              I'll give a fresh project a check, but it's not like it matters much anyway since as far as I can tell it causes absolutely no issues, just triggers me to see it in the log.

              hey while im here, have a picture

              Looks fantastic! Looking forward to seeing it in motion.

              I'll need to look at this myself when I return home at the end of this week. I do no have any likely guesses for the error message without checking. Good that it does not cause any actual issues, but I will of course still need this find a fix to prevent message log spam.

              Originally posted by MatthewDouglas View Post
              Hello [MENTION=4318]Monokkel[/MENTION]

              It Seems like there is a minor error in your project regarding waking units that I was wondering if you can help me with some insight on where it is actually happening and maybe how to fix it. Its nothing major, but would like to remove it as it is annoying to see haha.

              So this error happens if you one shot someone before they wake from the player. What seems to happen is that the enemy tries to wake itself, but since its destroyed, it has no reference to the enemy and some errors appear. The "!" still appears over where the enemy use to be and the sound goes off, but once I stop the project, that is when all the errors appear.

              It looks like somehow the find wake units get called before the enemy is destroyed, so it is stored in the wake units array, but when it comes time to actually wake the reference is change to null because it was destroyed. I just can't seem to pin down when it actually happend because sometimes the debugger on blueprints seems to not work and I can not see when things get called even though I know they do at some point (Debugger just completely skips and does not stop at breakpoint). I see that there is some code in the kill unit where it says if enemy's health is less then 0, dont wake it. Unfortunately it seems not to work and ive tried putting that in many different areas.

              Anyways, I figure I let you know, because I did alot of adjustments to the code, so to make sure It was not because I changed something I created a new project with just your template and recreated the scenario on the Jungle Raid Map (Same erros appear). I was hoping that maybe you could check it out and see what you think. Any Assistance would be appreciated.

              Thanks
              I believe your assessment of the cause of this issue is correct. I've fixed this bug in my internal build already. To fix this you will need to properly remove the reference to the unit in the woke units array when the unit is destroyed. You can use the OnDestroyed default event in the unit blueprint for this. You also need to remove the awake status effect actor. Also OnDestroyed loop through the status effects array of the unit and destroy all actors referenced in the array. I believe that should do the trick.

              Originally posted by AceD View Post
              Hello [MENTION=4318]Monokkel[/MENTION],

              i have a few questions about your ATBTT:

              1. Is it possible to use the ATBTT without pathfinding, and just using the WASD-direction-keys instead, for realtime grid based movement like up and down, left and right?
              The player should walk from tile to tile and push or pull objects from tile to tile
              2. Is it possible to locate a single tile in the world, to check, on which tile the player or a mesh is located right now for undo movement purposes?

              Thanks in advance!
              Hello AceD,

              sure, it should be possible to use WASD-movement. If your game has a locked camera view you could do something like this:

              When pressing W, get the index variable of the player unit. From the vector field array in BP_Grid_Manager get the vector at this index - GridSizeX. Move the unit to this location through a lerp or other means. At the end of movement update the index of the unit to the index of this location (index - GridSizeX). For moving right use index + 1, left index - 1 and down index + GridSizeX.

              If you have a rotating camera you will need to double a bit of math to translate the forward vector of the camera into a direction on the grid, but after that the process is similar.

              For your second question, use the Vector to index function in BP_Grid_Manager to translate a location into a grid index.

              Originally posted by Bridgeburners View Post
              Hi Monokkel,

              Thanks for answering my previous questions.

              I have another one, though. Is there any way to make the cost of moving to a tile truly zero? I think you set "0" as a shorthand for increasing the cost, somehow.

              I ask because I created portals, and I want the cost to jump between portals to be zero. I did this by making it so that if two tiles are portals, then I add each of them to the other's respective "edge array" and "edge array integer" elements. In those edge array element values, I set the cost to 1, so it takes one move point to jump from one portal to the other, which I don't want. However, if I set the cost to 0 then, for some reason, it costs two movement points to jump the portal.
              Hmm, good question. In older versions of the toolkit I used 0 to represent adjacent tiles that could not be moved between. Back then what you are asking would be difficult to implement.

              With the current toolkit I don't see why this should not be doable. With any such basic changed to toolkit functionality I have to be careful, though. So many other processes depend on the pathfinding function that it is som hard to predict the consequences of making such alterations.

              I'm not sure what is causing edges with a cost of 0 to act like having a costly of two, but I will look into it. I think this should be solvable.

              Again apologies for the delay in replying providing support. My life will soon return to normal and I'll be able to provide quicker and more thorough support.
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                Originally posted by Monokkel View Post
                Depends on the exact effect you are after, but if you remove a unit from the InitiativeOrderArray in ATBTT_GameMode its turn will never come up, which effectively disables it.
                I mean , let's say i want to have a skill that will disable/enable a unit (friendly or an enemy) permanently or temprorary (like a stun for several turns etc).
                Is there a boolean for that ?

                Comment


                  Originally posted by RC_Malokai View Post
                  I mean , let's say i want to have a skill that will disable/enable a unit (friendly or an enemy) permanently or temprorary (like a stun for several turns etc).
                  Is there a boolean for that ?
                  No, I've not made anything like that. To achieve this effect you could either manipulate the initiative order array like I've mentioned, or you can add your own stun variable (maybe an integer so you can create your multi-turn stun effects). Then in the game mode where a new turn is started you check the stun variable of the next unit to be activated. If it is 0 you proceed as normal. If it is higher you subtract it by one and immediately end its turn.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                  Comment


                    Spawning emitter on receive damage

                    I have a question in the melee character BP I would like to spawn an emitter when I take damage what is the easiest way to do it ? Thanks your work has been great so far

                    Comment


                      Originally posted by Monokkel View Post
                      Looks fantastic! Looking forward to seeing it in motion.
                      Soon, hopefully.

                      Originally posted by Monokkel View Post
                      I'll need to look at this myself when I return home at the end of this week. I do no have any likely guesses for the error message without checking. Good that it does not cause any actual issues, but I will of course still need this find a fix to prevent message log spam.
                      I solved the error, it was an engine bug related to leaving an integer array output within a function blank. The warnings about missing a vehicle bp happen in every project, even totally fresh blank ones, so I have no clue what that is.

                      Comment


                        Originally posted by Monokkel View Post
                        Hmm, good question. In older versions of the toolkit I used 0 to represent adjacent tiles that could not be moved between. Back then what you are asking would be difficult to implement.

                        With the current toolkit I don't see why this should not be doable. With any such basic changed to toolkit functionality I have to be careful, though. So many other processes depend on the pathfinding function that it is som hard to predict the consequences of making such alterations.

                        I'm not sure what is causing edges with a cost of 0 to act like having a costly of two, but I will look into it. I think this should be solvable.
                        Actually, as a correction, when I set the cost to 0 it takes all the remaining move points to move to that tile, not just 2. I figured out the problem, so here's how I solved it.

                        In "Search Adjacent Tiles (Pass Through Friendlies)" (because that's the default movement type I'm using) at the beginning you check if "current search step == array elem cost" (from open list array), and if false, you add the current pathfinding element to "delayed search list". I think this is because you're anticipating this being a tile that you can't move to now, but may be able to move to later. However, if you can't move to it now, then the cost of moving to it should be greater than the current search step. In my case, because I set the cost to 0 the cost of moving to it was less than the current search step. So what was happening was that the search step kept increasing, and the cost kept staying the same, so it forever puts it to "delayed search list" until the pathfinding loop is over. So I replaced "==" with ">=" (if current search step is >= array element cost it should be okay to add this element to the open list instead of delayed search list).

                        Also, I increased the upper limit of the loop over "search and add adjacent tiles" . The loop upper limit is currently "Pathfinding Move". However, if a step costs zero, then the search step should involve more steps than the pathfinding move. (E.g. if a unit has 2 move, and can move 3 tiles because one of those tiles has zero cost, then this should involve 3 pathfinding steps, but only cost 2 move.) I have an "integer set" variable called "portal" which keeps track of the indices of active portal tiles, so I simply add the length of that set to "pathfinding move" and make that the last index of the for loop in "Custom Pathfinding" macro. Also, in "Pathfinding", near the end, in the "Decide whether to end search or prepare to continue" comment box, I change "pathfinding move" to the same upper limit as before, to make sure the loop doesn't break. (I wonder, is that step necessary? It seems redundant with setting the loop upper limit.) In principle, the path finding works just fine if you increase the upper limit to an arbitrarily high value (at first I used 100 just to check if it works) but that adds unnecessary computational cost. Still, it might be worthwhile to add a buffer, for general use of zero cost tiles.

                        I used this to fix my problem with portals, but I think it should fix any scenario where you have adjacent tiles with zero move cost. I don't know if it's true that you don't need to add a pathfinding element to "DelayedSearchList" if the current search step is greater than the cost, so please let me know if changing that might break something else down the line.

                        On a separate note, I wanted to point out something to do with the "pass through friendlies" pathfinding type. There's a small bug where, when moving the selected unit, other friendly units have a "move range marker" on them. If you click on that unit (to try and move to them) it just cancels the current unit's turn and goes to the next. You could just tell yourself to ignore it and never click there. However, it's also the case that if all of your ally pawns are within movement range then you can't switch to their turn by clicking on them, without cancelling the current pawn's turn.

                        This was an easy fix for me. In the "spawn tiles in move range markers" function, at the beginning of both "foreach" loops I put a branch to check if the current index of the pawn array is not equal to empty "select asset" (a small bit of logic I copied from your "search adjacent tile" function). The logic only moves forward if the condition is "false". However, I don't know if that will have other consequences. So I thought I'd bring it to your attention. An alternative fix might be to not add those tiles to "can move to array" in the "search and add adjacent tiles" function.
                        Last edited by Bridgeburners; 08-14-2017, 02:56 PM.

                        Comment


                          Originally posted by Monokkel View Post
                          Hello AceD,

                          sure, it should be possible to use WASD-movement. If your game has a locked camera view you could do something like this:

                          When pressing W, get the index variable of the player unit. From the vector field array in BP_Grid_Manager get the vector at this index - GridSizeX. Move the unit to this location through a lerp or other means. At the end of movement update the index of the unit to the index of this location (index - GridSizeX). For moving right use index + 1, left index - 1 and down index + GridSizeX.

                          If you have a rotating camera you will need to double a bit of math to translate the forward vector of the camera into a direction on the grid, but after that the process is similar.

                          For your second question, use the Vector to index function in BP_Grid_Manager to translate a location into a grid index.
                          Hello Monikkel,

                          thanks for your answer but it seems you have to walk me through this a little bit.
                          For my kind of game all i need is just a grid, a simple character, who can move freely up and down, left and right (WASD) and objects i can push and pull around from tile to tile. And like i said before the possibility, to undo steps the character and objects have made. And the mouse should be still enabled.
                          So i would like to get rid of all the other stuff, but i'm not sure, what things i can or/and have to delete or turn off from your toolkit.
                          I have already set up my own camera in the level blueprint and i can toggle it to different views, which works fine.
                          But i'm struggeling with all the rest.
                          How can i turn off or use my own hud? When i start the game there's always "empty turn" shown in the upper left corner..
                          I duplicated one of the player_unit to set up my own character. But i couldn't find out, how and in which blueprint i have to set up the WASD-movements. I would have gone for my own character but it seems like i have to set it up inside the ATBTT_PlayerController and cast to my own character. And how and where i can get the index of my player unit, or how to translate a location into a grid index. I have already looked into you blueprints tutorial but their is way to much going on for me and most of it i don't need for my game
                          I know it's a lot, but i would really appreciate it, if you could help me with a few things here.
                          Thanks in advance!

                          AceD
                          Last edited by AceD; 08-15-2017, 03:15 PM.

                          Comment


                            I'm answering questions on mobile at the airport. I will try to answer all of them, but I'll do so one at a time and edit this post as I go to make it a bit simpler.

                            Originally posted by Deftones4 View Post
                            I have a question in the melee character BP I would like to spawn an emitter when I take damage what is the easiest way to do it ? Thanks your work has been great so far
                            Something generic for all attacks or something specific to some attacks? For the former, the Receive Damage event in the Unit blueprint makes the most sense, I think.

                            Originally posted by Selentic View Post
                            I solved the error, it was an engine bug related to leaving an integer array output within a function blank. The warnings about missing a vehicle bp happen in every project, even totally fresh blank ones, so I have no clue what that is.
                            Ok, glad you solved it. Is the vehicle BP error only for ATBTT projects?
                            [MENTION=855265]Bridgeburners[/MENTION]: Your solutions make sense as if read through them. Illustrate need to look through the blueprints myself when I'm back to find out whether they might cause any errors. The reason for keeping a separate max move from the loop limit is to have pathfinding treat edges with very high costs as equivalent with blocked edges, so that they are not unnecessarily re-checked every loop iteration. This should not matter for most games and I'm considering changing this for the coming update. I'll look through all of this when I'm back. Thanks for reporting what you've found so clearly.
                            [MENTION=4589]AceD[/MENTION]: Sorry, plane is boarding. I'll get to you when I land.

                            Edit: again sorry, got home pretty late. I'll give you a proper answer tomorrow after work.
                            Last edited by Monokkel; 08-16-2017, 07:36 PM.
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              Originally posted by Monokkel View Post
                              Is the vehicle BP error only for ATBTT projects?
                              No. It happens in every project. Even literally blank ones with nothing in them beyond the base content required. So yeah, not a toolkit problem.

                              Comment


                                Originally posted by AceD View Post
                                Hello Monikkel,

                                thanks for your answer but it seems you have to walk me through this a little bit.
                                For my kind of game all i need is just a grid, a simple character, who can move freely up and down, left and right (WASD) and objects i can push and pull around from tile to tile. And like i said before the possibility, to undo steps the character and objects have made. And the mouse should be still enabled.
                                So i would like to get rid of all the other stuff, but i'm not sure, what things i can or/and have to delete or turn off from your toolkit.
                                I have already set up my own camera in the level blueprint and i can toggle it to different views, which works fine.
                                But i'm struggeling with all the rest.
                                How can i turn off or use my own hud? When i start the game there's always "empty turn" shown in the upper left corner..
                                I duplicated one of the player_unit to set up my own character. But i couldn't find out, how and in which blueprint i have to set up the WASD-movements. I would have gone for my own character but it seems like i have to set it up inside the ATBTT_PlayerController and cast to my own character. And how and where i can get the index of my player unit, or how to translate a location into a grid index. I have already looked into you blueprints tutorial but their is way to much going on for me and most of it i don't need for my game
                                I know it's a lot, but i would really appreciate it, if you could help me with a few things here.
                                Thanks in advance!

                                AceD
                                If all you need is the grid and you don't need things like turn order, input from ATBTT_PlayerController or anything like that, then changing the game mode to something other than ATBTT_GameMode should disable most stuff. However, I wonder what you mean when you say that the mouse should still be enabled. Do you want to have all the default pathfinding functionality, such as clicking to move? If so, then you should still keep the game mode the same. The HUD is set up in ATBTT_GameMode quite early after Event Begin Play. Just skip the node adding the HUD to the viewport and it should disappear.

                                Your character needs to be a child actor of the Unit blueprint if you want it to automatically be assigned an index and movement code. I'm not entirely sure how you imagine your end product to look, so if you could describe it in some more detail it would be easier for me to help you find the best solution. Are you trying to emulate the functionality in some game I might know about?

                                [MENTION=16997]Selentic[/MENTION]: Ok, good to know. I was scratching my head trying to figure out when I imported a vehicle blueprint.
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X