Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Hello! I just downloaded and am having a little trouble getting the friendly character to traverse heights (walking up a flight of stairs). I've been watching the tutorials and they said to set "auto calculate costs based on height" to true, but that option isn't available for me. Any help on this would be nice, and thank you!

    Comment


      Hey knut, I upgraded to 4.23, and I was wondering if you could help me out. I noticed the movement is now based on AP, which I LOVE. But, I would like to change it so the amount of spaces the unit moves costs 1 AP per tile. So if a unit has 3 AP, then the unit can only move 3 tiles. Do you know how I can achieve this easily? Thanks!

      Comment


        Originally posted by Zennisin View Post
        Hey knut, I upgraded to 4.23, and I was wondering if you could help me out. I noticed the movement is now based on AP, which I LOVE. But, I would like to change it so the amount of spaces the unit moves costs 1 AP per tile. So if a unit has 3 AP, then the unit can only move 3 tiles. Do you know how I can achieve this easily? Thanks!
        Hey Zennisin, can't recall changing anything like that from 4.22 to 4.23, but this has been an option for a while. I guess I must have changed the defaults of one or more abilities while testing. If you set MoveCostType of BP_Ability_Move to FromPathfindingCost, the AP cost of the ability will be based on the pathfinding cost of the tile you move to. If you give a unit a move of 1 and AP of 3 you'll then achieve the results you want.

        Edit: Support thread page 200!
        Last edited by Monokkel; 10-12-2019, 06:54 AM.
        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

        Comment


          Woohoo! Page 200!

          I have another question for you. I am trying to do some testing on my Android device, specifically the galaxy s7, and I am trying to double tap to move my characters, but they are not moving. Am I missing something to make it run on mobile?

          I have abilities for my units if that matters.

          Also, it seems to have some controller movement sticks on each side of the screen. Any idea on how to remove those?
          Last edited by Zennisin; 10-12-2019, 01:08 PM.

          Comment


            Originally posted by Monokkel View Post

            Have you run into performance issues or are you anticipating future issues? 18-24 tiles should be well within what the toolkit has been designed for. If you have encountered performance problems make sure you are testing in a packaged project. Blueprints run significantly faster in a packaged project compared to playing in editor.

            If you do need a performance boost, blueprint nativization does not play well with the toolkit's pathfinding. This is due to Engine issues with blueprint structs and TMaps. The best approach is generally to manually convert what you need to C++ in any case. The good news is that I've already done this for many of the toolkit's expensive functions. So when you need it let me know and I'll format the code and share it.
            The game thread was starting to stall quite a lot at 18+ tiles i thought even in a packaged build it would still be noticeable but i will check and let you know, maybe its fine. I have added in extra checks to stop things like diagonal movement through 2 other units so perhaps thats making it worse. Moving multiple units at once is more of a future thing i am expecting problems with.

            Would love to see your C++ versions of expensive functions, i would certainly be using them to save where ever i can. Think i will still want to keep a BP only project and add the C++ functions in via a plugin though im not sure how sensible that is.

            Comment


              Sorry for so many questions! But I'm using the experimental grid manager, for the interrupt feature, and I have units on both the Player faction, and the Enemy Faction. They all have the same initiative. But, when its each of their turns, I can't seem to switch between the characters so I can play them in a different order. Am I missing something? Thanks!

              Edit: Clicking the icon in the initiative bar gives me this error:

              Blueprint Runtime Error: "Accessed None trying to read property Unit". Blueprint: WBP_Initiative_Icon Function: Execute Ubergraph WBP Initiative Icon Graph: EventGraph Node: Branch
              Last edited by Zennisin; 10-12-2019, 03:58 PM.

              Comment


                Originally posted by Zennisin View Post
                Woohoo! Page 200!

                I have another question for you. I am trying to do some testing on my Android device, specifically the galaxy s7, and I am trying to double tap to move my characters, but they are not moving. Am I missing something to make it run on mobile?

                I have abilities for my units if that matters.

                Also, it seems to have some controller movement sticks on each side of the screen. Any idea on how to remove those?
                Probably my bad. Mobile controls is not something I test every update, so I might have made some change that has disrupted touch input as a side effect. In that case thanks for making me aware of it. I will try to look into it soon.

                Here is a guide on how to remove the touch joysticks. This should be how the toolkit is by default, but I guess it must have been reset somehow.

                Originally posted by Zennisin View Post
                Sorry for so many questions! But I'm using the experimental grid manager, for the interrupt feature, and I have units on both the Player faction, and the Enemy Faction. They all have the same initiative. But, when its each of their turns, I can't seem to switch between the characters so I can play them in a different order. Am I missing something? Thanks!

                Edit: Clicking the icon in the initiative bar gives me this error:

                Blueprint Runtime Error: "Accessed None trying to read property Unit". Blueprint: WBP_Initiative_Icon Function: Execute Ubergraph WBP Initiative Icon Graph: EventGraph Node: Branch
                Hmm, odd. Not able to replicate this. What game mode are you using? How have you set up the level more generally?

                Originally posted by elec2ron View Post

                The game thread was starting to stall quite a lot at 18+ tiles i thought even in a packaged build it would still be noticeable but i will check and let you know, maybe its fine. I have added in extra checks to stop things like diagonal movement through 2 other units so perhaps thats making it worse. Moving multiple units at once is more of a future thing i am expecting problems with.

                Would love to see your C++ versions of expensive functions, i would certainly be using them to save where ever i can. Think i will still want to keep a BP only project and add the C++ functions in via a plugin though im not sure how sensible that is.
                Hmm, odd. I'm not seeing any stalling on much higher move ranges, even for regular PIE. I have a pretty powerful rig, but even with much weaker hardware I would not expect any visible frame drops for 18 tile movement. Not to worry, though. For anyone experiencing such issues I intend to share the C++ converted functions fairly soon. But if you're not planning to release your game within the next few weeks I hope you can have a bit of patience so I can do more testing, optimizing and commenting.
                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                Comment


                  Originally posted by Monokkel View Post


                  Hmm, odd. Not able to replicate this. What game mode are you using? How have you set up the level more generally?

                  I think it has to do with the ability system? I gave both of my units the Move ability, and the Attack ability separately. Once I gave them both the singular MoveAttack ability they were able to swap between each other again. Any idea how I can fix this for if I want to split it back to 2 abilities instead of just the 1?

                  Comment


                    Hey Knut! I fixed the Move ability! Turns out it didn't have the Default Click ability tied together when determining if its a valid target to move to.

                    I also added a change to the Default Click Ability, as I don't want my player to be able to switch to the opposing faction's unit.

                    Click image for larger version

Name:	defaultClick.PNG
Views:	35
Size:	198.3 KB
ID:	1673403

                    Comment


                      Hey knut, another update! I fixed the onClick for Initiative Icon. It references the local variable Unit, but its never set. It currently has 2 places where Get Unit is called, and I just replaced it with Get Actor > Cast to BP_Unit, and it fixed it. Click image for larger version

Name:	initiative_icon.PNG
Views:	36
Size:	255.8 KB
ID:	1673414

                      Comment


                        Hey Knut, this might be a lot, but I'll go ahead and see if you have an answer

                        I am looking to create an online mutliplayer game, where units can be dragged onto the grid via a card system. Do you think this is possible with the toolkit? If so, do you have any instructions on how to setup online multiplayer testing? And possibly a way to drag units onto the grid and assign them to the current player?

                        Any information you have about these 2 things would be FANTASTIC.

                        Thanks

                        Comment


                          Zennisin: Good to see you figured it out. I really should have guessed the reason, sorry. Basically all interaction from the player to the game is done through abilities (whatever ability is active at the time). So there is not layer on top of this for unit selection, for instance. This will have to be specified within the abilities. As you found out BP_Ability_Move does not have this implemented, as it is intended as a very basic straightforward ability. Unit selection is gated through whether or not the active player owns the current unit. The same player might potentially own multiple units from different factions with the current setup. For a hot seat multiplayer sort of game, adding the sort of check you have done makes sense.

                          Originally posted by Zennisin View Post
                          Hey Knut, this might be a lot, but I'll go ahead and see if you have an answer

                          I am looking to create an online mutliplayer game, where units can be dragged onto the grid via a card system. Do you think this is possible with the toolkit? If so, do you have any instructions on how to setup online multiplayer testing? And possibly a way to drag units onto the grid and assign them to the current player?

                          Any information you have about these 2 things would be FANTASTIC.

                          Thanks
                          :

                          This is certainly possible. The toolkit is fully networked, so making a networked multiplayer game is supported. You assign a unit to a player by setting that unit's owner to a specific player's player controller. You can test out multiplayer games in engine through the number of players setting when you play in editor. Getting proper networked play set up is a bit more work, since you need to set things up to work with the specific network solution you are using. The Steam one is quite simple, and is the one I have used for testing. Check out Epic's documentation on the Steam subsystem here.

                          As for the card interaction, the basics steps aren't that difficult. You can spawn a new unit on the grid just by using SpawnActor, and BP_Unit's construction script should take care of adding the unit to the grid, adding it to initiative etc. So for your card you could have some event fire when you let go of a dragged card over the game board, get the hit location under the mouse at that point and spawn a unit actor there.
                          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                          Comment


                            Hello,

                            I have two main things that I want to achieve with the grid manager but I need some insight:

                            1/ I want the units to be able to walk through friendly units (which is already implemented) BUT when a unit is targeting an enemy and moving towards it and there is a friendly unit right next to the enemy unit it shouldn't stop on the same tile as that unit, so basically we can't have 2 units idle on the same tile.

                            2/ I want to change how the path finding spline works, right now each time you enter a new tile it clears the previous path and recreate a new one with the shortest path possible, I want it to continue moving from last hovered tile, for example I hovered a tile1 it creates the path then I moved to tile10 it continues from the existing path to tile1 and create a path from that path already created to the tile10. Is there an option to activate that result or do I need to implement it, if it's the 2nd choice then can you give me an insight on how and where to achieve this.

                            Thanks.

                            Comment


                              Originally posted by Latimed View Post
                              Hello,

                              I have two main things that I want to achieve with the grid manager but I need some insight:

                              1/ I want the units to be able to walk through friendly units (which is already implemented) BUT when a unit is targeting an enemy and moving towards it and there is a friendly unit right next to the enemy unit it shouldn't stop on the same tile as that unit, so basically we can't have 2 units idle on the same tile.
                              That sounds like a bug. I'm not able to replicate it, though. Could you give me the steps to reproduce the bug?

                              Originally posted by Latimed View Post
                              2/ I want to change how the path finding spline works, right now each time you enter a new tile it clears the previous path and recreate a new one with the shortest path possible, I want it to continue moving from last hovered tile, for example I hovered a tile1 it creates the path then I moved to tile10 it continues from the existing path to tile1 and create a path from that path already created to the tile10. Is there an option to activate that result or do I need to implement it, if it's the 2nd choice then can you give me an insight on how and where to achieve this.

                              Thanks.
                              You should be able to do all of this by modifying an ability. If you take BP_Ability_Move as a base, you could store the current displayed path when you press a key (storing the current PathIndexes array). You would also store the grid index of the marked tile and the movement cost of moving to this tile. From then on, in the hover event, you would run pathfinding from the stored grid index, with a move range equaling the move range of the unit minus the stored cost. You would then append the stored path indexes of the indexes generated in the hover event when displaying the movement spline. When choosing to move you would get the entire current path and feed this into a the MoveCustomPath event of BP_Unit. This is the general approach I would use. I know it is a bit to follow, but try it out, and if you run into difficulties let me know and I will try my hand at making it.
                              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                              Comment


                                Hey knut, did you ever have time take a look into the mobile issue of not being able to move the units I mentioned above? Any info you have would be greatly appreciated

                                Comment

                                Working...
                                X