Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Hey Knut!
    whats the best way to do cinematics using the ATBTT units?
    I tried to move them around in sequencer and encountered some issues.
    Do you have experience with ATBTT cinematics which you could share?

    Thanks!

    Comment


      Originally posted by leo bar View Post
      hi monokkel

      The current problem continues even after I exit the editor and fire again - restarts. I tried to put "is valid" after GetAllActorsOfClassnode - didn't help.
      I also tried with a new project I created and there (without any change of mine) log gives the same warnings

      if you want to see it happening just create a new project and every time you compile the bp_gridactor blueprint you will get lot of warning (same as I worte before).
      I do not know the reason for this, but it is even worse when trying to modify some blueprints.

      Sorry for the headache

      cheers
      leo
      No worries. I try to hunt down and remove any warning messages, so it is great that you gave me the repro steps for this. Checking for validity was not the correct thing to do in BP_GridActor, where one should rather check whether the array of BP_GridManager actors has a size of one. For the child actors of BP_GridActors we can just check if the GridManager reference is valid, however. Like so:







      I've added this to my WIP branch, so it will be fixed in the next update. These are not warnings that should have any effect on gameplay.

      Originally posted by RobinZinser View Post
      Hey Knut!
      whats the best way to do cinematics using the ATBTT units?
      I tried to move them around in sequencer and encountered some issues.
      Do you have experience with ATBTT cinematics which you could share?

      Thanks!
      Hmm, not sure. I have not really worked with cinematics in UE4 at all. You can create actions for the action queue and set them to play "WithPrevious" to create some cinematic-like stuff, but I have not really tested this out. I imagine the easiest would be to create cinematics using sequencer the old-fashioned way and not use any toolkit-specific stuff for it other than passing tile locations. What specific issues did you encounter?
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        hi monokkel

        thanks a lot for the fix.

        I understood that this was not a warning that would be a problem with gameplay, but I have a "disease" that I can not see these warnings and not understand what they originate from. So many thanks

        cheers
        leo

        Comment


          Originally posted by Monokkel View Post

          Hmm, not sure. I have not really worked with cinematics in UE4 at all. You can create actions for the action queue and set them to play "WithPrevious" to create some cinematic-like stuff, but I have not really tested this out. I imagine the easiest would be to create cinematics using sequencer the old-fashioned way and not use any toolkit-specific stuff for it other than passing tile locations. What specific issues did you encounter?
          To be able to explain better what exactly happens I recreated the bug quick. So when doing any kind of transform animation in the sequencer, the unit gets kind of teleported at begin play to a far spot. There the sequence then plays.
          And then I had the idea to delay the ATBTT init process. Since my cinematic has to be a kind of opening sequence on begin play, this would be a solution.
          I added a delay of a few seconds (enough for my cinematic) to the BP_ATBTT right after the Begin play event. So it delays all the init stuff.
          Basically this works great, the cinematic is playing and all looks good. The project is a vr project btw.
          The issue is now after the cinematic is done, the init seems to happen and everything looks fine, but I cant do any button input at all for some reason.

          Is there happening some stuff in the atbtt init which could lead to something like that?
          Maybe like some logic which handles posessing the unit and this then fails due to bad timing in my delayed case?

          Comment


            Hello Knut,

            I have added abilities to my game that change the height of tiles during gameplay and it has become apparent I need to update the heightmap and tile locations each time my abilities change the height of a tile.
            What would be the best way to handle this?

            Kind Regard,
            Drewbie.

            Comment


              Originally posted by leo bar View Post
              hi monokkel

              thanks a lot for the fix.

              I understood that this was not a warning that would be a problem with gameplay, but I have a "disease" that I can not see these warnings and not understand what they originate from. So many thanks

              cheers
              leo
              A very healthy disease to have, I would say

              Originally posted by RobinZinser View Post

              To be able to explain better what exactly happens I recreated the bug quick. So when doing any kind of transform animation in the sequencer, the unit gets kind of teleported at begin play to a far spot. There the sequence then plays.
              And then I had the idea to delay the ATBTT init process. Since my cinematic has to be a kind of opening sequence on begin play, this would be a solution.
              I added a delay of a few seconds (enough for my cinematic) to the BP_ATBTT right after the Begin play event. So it delays all the init stuff.
              Basically this works great, the cinematic is playing and all looks good. The project is a vr project btw.
              The issue is now after the cinematic is done, the init seems to happen and everything looks fine, but I cant do any button input at all for some reason.

              Is there happening some stuff in the atbtt init which could lead to something like that?
              Maybe like some logic which handles posessing the unit and this then fails due to bad timing in my delayed case?
              Hmm, hard to know exactly what might be causing it. Last I checked delaying startup should work fine. I will look into it when I have the time.

              Originally posted by drewbiegames View Post
              Hello Knut,

              I have added abilities to my game that change the height of tiles during gameplay and it has become apparent I need to update the heightmap and tile locations each time my abilities change the height of a tile.
              What would be the best way to handle this?

              Kind Regard,
              Drewbie.
              The location of each tile is (including its height) is contained in the GridLocations TMap in BP_GridManager. If you Add a vector to that array using the appropriate GridIndex you will update the location of that tile. If all you want to change is the height and not change the connections between tiles it is as simple as that. If you want this to affect walkability it becomes a bit more complicated, as you also have to alter the GridEdges array, which is a bit more finicky. Could you explain the desired result in a bit more detail so I know precisely how you want it to work in game?
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                Originally posted by Monokkel View Post
                The location of each tile is (including its height) is contained in the GridLocations TMap in BP_GridManager. If you Add a vector to that array using the appropriate GridIndex you will update the location of that tile. If all you want to change is the height and not change the connections between tiles it is as simple as that. If you want this to affect walkability it becomes a bit more complicated, as you also have to alter the GridEdges array, which is a bit more finicky. Could you explain the desired result in a bit more detail so I know precisely how you want it to work in game?
                That helps a great deal for the initial problem.
                A character will have an ability to raise or lower a tile a maximum of three height increments or "levels". The cost of walking to a tile would change depending on the difference in the "levels" between the tiles. So, I would need to alter the edge costs. Could you shed some light on how that would be implemented?
                I just need a function which updates the edge costs of a tile and it's neighbours.

                Many thanks.
                Last edited by drewbiegames; 09-17-2018, 12:30 PM.

                Comment


                  Originally posted by drewbiegames View Post

                  That helps a great deal for the initial problem.
                  A character will have an ability to raise or lower a tile a maximum of three height increments or "levels". The cost of walking to a tile would change depending on the difference in the "levels" between the tiles. So, I would need to alter the edge costs. Could you shed some light on how that would be implemented?
                  I just need a function which updates the edge costs of a tile and it's neighbours.

                  Many thanks.
                  No worries For modifying tile connections (edges) it so happens that I helped another developer with this not so long ago. Here is a link to the start of our conversation (it continues over a couple of pages). See if reading that helps you add the feature you want. If not get back to me and I'll help you along.

                  In other news I had some fun experimenting with changing the move animation based on properties of the grid. In the gif below the unit jumps if there is a height difference between tiles on the move path over a certain threshold. Also it crouches if it finds a custom blueprint (the blue frames) in the GridObjects TMap. Early experimentation, but it looks promising:

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

                  Comment




                    In other news I had some fun experimenting with changing the move animation based on properties of the grid. In the gif below the unit jumps if there is a height difference between tiles on the move path over a certain threshold. Also it crouches if it finds a custom blueprint (the blue frames) in the GridObjects TMap. Early experimentation, but it looks promising:

                    That's awesome
                    Knut
                    , just what I need !!
                    I am now working on something similar and having difficulty implementing it.
                    I'll wait patiently until it's ready

                    Comment


                      Originally posted by drewbiegames View Post

                      That helps a great deal for the initial problem.
                      A character will have an ability to raise or lower a tile a maximum of three height increments or "levels". The cost of walking to a tile would change depending on the difference in the "levels" between the tiles. So, I would need to alter the edge costs. Could you shed some light on how that would be implemented?
                      I just need a function which updates the edge costs of a tile and it's neighbours.

                      Many thanks.
                      Your suggestion worked well, although with a bug.
                      The tile gets raised and all the location variables are correct, but the movement decals are floating above the tiles. Also, when the units move it moves along this floating path when moving across raised tiles.

                      On reading your conversation with Studder, you sent him the project with the fixes for this issue. Could you screenshot the fix for me please?

                      Click image for larger version  Name:	Untitled.png Views:	1 Size:	230.5 KB ID:	1529480Click image for larger version  Name:	Untitled1.png Views:	1 Size:	233.5 KB ID:	1529481

                      Have you got a fix for me?

                      Regards,
                      Drewbie.
                      Last edited by drewbiegames; 09-18-2018, 05:31 PM.

                      Comment


                        Originally posted by leo bar View Post

                        In other news I had some fun experimenting with changing the move animation based on properties of the grid. In the gif below the unit jumps if there is a height difference between tiles on the move path over a certain threshold. Also it crouches if it finds a custom blueprint (the blue frames) in the GridObjects TMap. Early experimentation, but it looks promising:

                        That's awesome
                        Knut
                        , just what I need !!
                        I am now working on something similar and having difficulty implementing it.
                        I'll wait patiently until it's ready
                        Be warned that I can take quite a while before something like this is added in an update. If you want to try it yourself it basically boils down to having the movement to each tile be a separate action. In SimulateMove, I add an ActionQueue for each move step instead of queuing the single, large move action. For each step in SimulateMove I check whatever properties of the grid I want for the tile that is being exited and the one being entered and use that to choose the specific move step action and/or input variables to modify the movement.

                        Originally posted by drewbiegames View Post

                        Your suggestion worked well, although with a bug.
                        The tile gets raised and all the location variables are correct, but the movement decals are floating above the tiles. Also, when the units move it moves along this floating path when moving across raised tiles.

                        On reading your conversation with Studder, you sent him the project with the fixes for this issue. Could you screenshot the fix for me please?

                        Click image for larger version Name:	Untitled.png Views:	1 Size:	230.5 KB ID:	1529480Click image for larger version Name:	Untitled1.png Views:	1 Size:	233.5 KB ID:	1529481

                        Have you got a fix for me?

                        Regards,
                        Drewbie.
                        Seems the issue here is that you are setting the height change in the GridLocations TMap to twice the height of what you are moving the tile meshes. Check your code and see if there is any reason why it would be doubled for one or halved for the other. Are you running anything twice by accident, perhaps?
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment



                          Be warned that I can take quite a while before something like this is added in an update. If you want to try it yourself it basically boils down to having the movement to each tile be a separate action. In SimulateMove, I add an ActionQueue for each move step instead of queuing the single, large move action. For each step in SimulateMove I check whatever properties of the grid I want for the tile that is being exited and the one being entered and use that to choose the specific move step action and/or input variables to modify the movement.



                          hi knut

                          Thank you very much! That's exactly the lead I needed
                          You are a ace

                          cheers
                          leo

                          Comment


                            hi knut


                            I think there is another bug (or maybe I did something wrong):

                            1. Warning: Script Msg: Attempted to access index 6 from array 'InitiativeArray' of length 6 in '/Game/AdvancedTurnBasedTileToolkit/Core/BP_TurnManager.BP_TurnManager_C:MoveActorToInititativeIndex' - it happenes when enemy unit awake.

                            2. When I mark in the editor in the Multiplayer option - the number of players to 2 (it does not happen in another mode), there are a few log warning saying: that in blueprint - bp_unitstealthcomponent (envent begin play) cant read callfun turnmanager - remove item.

                            its not happenes all the time, but a lot of the time. you have a delay node set to 0 (just after the isvalid for the gridmanager) , so when I set it to 0.5 there is no warning.

                            I know you don't have much time know so its not that important, just check it when you can.

                            cheers
                            leo
                            Last edited by leo bar; 09-19-2018, 09:16 PM.

                            Comment


                              Originally posted by Monokkel View Post
                              Seems the issue here is that you are setting the height change in the GridLocations TMap to twice the height of what you are moving the tile meshes. Check your code and see if there is any reason why it would be doubled for one or halved for the other. Are you running anything twice by accident, perhaps?
                              Thank you. It was a quirk of blueprint scripting that it ran twice when attaching from a "float + float" node. I set a local variable to the result and used that in both cases and it worked.

                              In my game, I can also lower the tiles using the abilities. So that the tile can go below 0 in the Z position. I have set the height map to be -500 to 500 on the Z-axis and the tiles are clamped within -150 to 150. Is there any reason would stop pathfinding from working for tiles below 0 in the Z-axis?

                              Just in case it is problem with the way I am handling updating edges, here is my UpdateTileEdge function: https://blueprintue.com/blueprint/kurkxopb/

                              The second problem, I am doing an AOE raising of a tile. If I do this close to the edge of the gird it raises tiles on the other side of the grid. I am currently using the GetTilesInRange function to find the indices of the tiles that need to be raised. Any tips on how to fix this?

                              After these are fixed my next venture is to have a unit which does not count toward the victory condition. This unit will be off the grid, will have a turn, not be attackable by other units and only usable by players. How would you suggest I remove the unit from the victory/lose condition?

                              Kind Regards,
                              Drewbie
                              Last edited by drewbiegames; 09-20-2018, 12:34 PM.

                              Comment


                                Originally posted by Monokkel View Post
                                1. Not seeing anything like that. Does this happen only for the new version? What error are you getting?
                                2. The ability icon display and clicking can be found in WBP_AbilityBox and WBP_Ability.
                                1. Nevermind, seems my version of Visual Studio lacked some parts needed for compilation. It's sorted out now and has nothing to do with the toolkit.
                                2. Thank you!

                                Comment

                                Working...
                                X