Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    What would you say the best way to work out the lowest Resource Index is?
    Making a similar function to Get Pawn with Lowest Health from Choice Array
    or manipulation the ResourceArray?

    Comment


      @LDodds: 'Min of Int Array' will get you the lowest value of an Array.

      I would highly suggest watching Monokkel's tutorial videos, most notably the ATBTT Blueprint Tutorial. It may be long, but you will definitely learn a lot more about the toolkit in a much faster pace than relying on replies from the Forum. Should help you get a better grasp on Blueprinting as well.

      Comment


        Cheers, I have tried it several times before in chunks when i needed specific things.
        But yes your right I really need to sit down and try to get a general better grasp of the kit.
        One final question though as im still experiment with AI settings, I would use what you suggested in terms of.
        ResourceArray- Min Of Int Array - IF - Index of Min Value < Get Pawn with Lowest Health?

        Comment


          If you are actually trying to make the AI go for the Resource Tile instead of attack the pawn/unit with the lowest health, you probably want to do something along the lines of this;

          Click image for larger version

Name:	check_consumable_tiles_before_enemy.JPG
Views:	1
Size:	298.4 KB
ID:	1086787

          Untested and you will want to clean it up for sure, but the concept is there.

          Comment


            Hey, thanks a lot isthisbad! While I've slept you've provided exeptional support, and pretty much exactly the same way as I would have suggested (isnotbad :P ). Work is crazy this week, so that you stepped in to relieve me is highly appreciated

            LDodds, like isthisbad suggested I would very much recommend watching all the tutorials. This will give you a much better understanding of the toolkit, which will in turn make it much easier for me to help you out. Isthisbad's solution is clever and should achieve much of what you are looking for. If there are no unexpected issues (which there ofter are), this is what the code will do:
            1. The AI determines the unit in range with the lowest health as normal
            2. It looks at all tiles in sight and sees if any of them has a resource tile on it (you can omit this if you do not require the unit to have line of sight. If so you should directly check the CanMoveToArray on the index of each ResourceTile actor)
            3. The AI checks if any of these tiles can be moved to (here you should also check the pawn array to see that there is not already a unit standing on it)
            4. It then finds the closest of these tile - if this closest tile is closer than the player unit in reach with the lowest health move to it (note that this means the unit will move to a resource tile even if there is a player unit closer to it, as long as that unit is not the one with the lowest health within reach)


            Is this what you're after, or were you thinking of something differently? Sorry that I can't really test this out myself, but work is absolutely bonkers all week, so I can only take 10 minutes to answer comments here and there until next week.
            Advanced Turn Based Tile Toolkit (Marketplace - Support)

            Dungeon Crawler Toolkit (Marketplace - Support)

            Discord

            Comment


              Good news! After a short testrun it seems that the toolkit runs just fine in UE4.9. There is one error that appears in the log because the engine no longer seems to like me changing the visibility of both decals and static meshes in the same node, but this does not have any effect on how the toolkit works. As such I'm reluctant to update until I'm finished with my next major update. I know it has taken quite a long time, but I've been on vacation for quite a while. It will be the largest update I've made until now by far, so stay tuned
              Advanced Turn Based Tile Toolkit (Marketplace - Support)

              Dungeon Crawler Toolkit (Marketplace - Support)

              Discord

              Comment


                Great to hear about the update!
                Cant wait to see it

                And yeah thats pretty much what im after, because then later down the road I can tweak it to work on non-aggressive factions too

                Comment


                  Originally posted by Monokkel View Post
                  Hey, thanks a lot isthisbad! While I've slept you've provided exeptional support, and pretty much exactly the same way as I would have suggested (isnotbad :P ). Work is crazy this week, so that you stepped in to relieve me is highly appreciated
                  No problem at all. It was a welcome escape from the custom on cursor 'Find Attack Tiles In Range' I've been working on. So much maths, so little time.

                  Excited to hear about the updates! Is this mostly just Mobile support/refactoring as you mentioned before?

                  Comment


                    Oh and speaking of my new custom function; I switched Decals off and Static Mesh Components are still going beyond the bounds of the custom grid even when the grid exceeds the viewport for all markers (Hover/Attack/Movement/Etc)..

                    Click image for larger version

Name:	nw_e_ne_sw_w_se.jpg
Views:	1
Size:	75.8 KB
ID:	1086803

                    I will probably end up using my own path trace that excludes the bounds beyond the indexes of visible tiles, but if you are fixing this in the next update I will hold off

                    Comment


                      That's an AoE flame effect I' guessing? Looks neat! That issue should disappear with the next update. I've added a part to Find Tiles In Range that checks if it is possible to move to a tile from any angle. If not it will not be counted as visible.

                      Edit: Here's the relevant bit:

                      Click image for larger version

Name:	apbjNcW.png
Views:	1
Size:	131.9 KB
ID:	1086811

                      Click image for larger version

Name:	UC3Ff3N.png
Views:	1
Size:	93.6 KB
ID:	1086812
                      Last edited by Monokkel; 09-01-2015, 02:36 PM.
                      Advanced Turn Based Tile Toolkit (Marketplace - Support)

                      Dungeon Crawler Toolkit (Marketplace - Support)

                      Discord

                      Comment


                        Excellent, thanks

                        That was just playing around with my spells making sure that the direction ranges I included in the spell/ability would display the correct attack tiles. ie: NW=3, NE=2, E=2, SE=3, SW=2, W=2

                        Intention being that I want to be able to set any range in any direction with a 'Fill' Range for each. That way I can make any combination of spells and attack patterns relevant to that spell. (Cone/Straight Line/Star/Wall/Etc)

                        Comment


                          Originally posted by Monokkel View Post
                          Edit: Here's the relevant bit:
                          Finally home and got a chance to try this out; Implemented and working as expected.

                          For those not yet familiar with this asset; I am using my own variation of the function Monokkel is referring to, but if you need to know where it is before he puts out the patch.. it is inside the BP_Grid_Manager and either in the function 'Find Visible Pawns Step 2' or 'Find Tiles In Range Step 2' if you are not using 'Check Visibility' for 'Find Tiles In Range' check.

                          Also: To create a function like 'Is Tile Passable?' without having to run an execution line through it, you will need to make sure and select the 'Pure' option in the function defaults.
                          Last edited by EricCorso; 09-01-2015, 10:00 PM.

                          Comment


                            Any chance in the next update you can also abstract the Tiles in Range Array from the 'Get Indexes in Range' and including a local Variable for the ranges that gets cleared and then output to the Find Tiles in Range function? Currently using it to get the range from the current hover tile and set my spell markers, but unfortunately it clears the 'Tiles in Range Array' on every lookup. So if it was to output the Range Array instead, I could just use that.

                            Trying not to touch the Grid Manager as much as possible, and also re-use the functions that you include in it. The deeper I get the more I find little things like this and have to either adjust or make my own functions.

                            Hit me up on IM if you have any questions or want me to provide any examples of how/what I am trying to do here and I will be happy to assist!

                            Edit: Changed the function to look like this;
                            (Using a Local temporary 'Struct_Range' in Get Indexes In Range function)
                            Click image for larger version

Name:	get_indexes_in_range.JPG
Views:	1
Size:	94.2 KB
ID:	1086906

                            Working for the interim, but would definitely prefer it be in there by default if possible.
                            Last edited by EricCorso; 09-02-2015, 06:52 PM.

                            Comment


                              Sounds reasonable! I'll look into it at the next opportunity, and will probably include it in the update. Let me know of any other minor (or major) annoyances you might encounter
                              Advanced Turn Based Tile Toolkit (Marketplace - Support)

                              Dungeon Crawler Toolkit (Marketplace - Support)

                              Discord

                              Comment


                                Originally posted by isthisbad View Post
                                Excellent, thanks

                                That was just playing around with my spells making sure that the direction ranges I included in the spell/ability would display the correct attack tiles. ie: NW=3, NE=2, E=2, SE=3, SW=2, W=2

                                Intention being that I want to be able to set any range in any direction with a 'Fill' Range for each. That way I can make any combination of spells and attack patterns relevant to that spell. (Cone/Straight Line/Star/Wall/Etc)
                                About making a cone skill, I've actually made it by using a double for each loop with a multisphere trace array.
                                I first get all units by filling the array (multisphere trace should ignore any static mesh, self, and all unnecessary hits) and then apply receive damage event to all of them.
                                Fantasy Turn-Based Tactical Game
                                STEAM: https://store.steampowered.com/app/9...Arcane_Legacy/
                                IG: https://www.instagram.com/arcanelegacyofficial/
                                FB: https://www.facebook.com/ArcaneLegacy/
                                WEB: http://www.arcanelegacy.com

                                Comment

                                Working...
                                X