Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Originally posted by Luna2442 View Post
    Hello again,

    I would like to change the hover decals to new meshes, but nothing I change seems to have any effect. Do I change this on the grid manager or the ability? Both? I'm certain I've tried it all and hunter down any mentions in the BP. Any help is appreciated. Thank you!
    Hi, you can override it directly in the components of the ability. Like this:

    Advanced Turn Based Tile Toolkit (Marketplace - Support)

    Dungeon Crawler Toolkit (Marketplace - Support)

    Discord

    Comment


      hello!
      1、The design of the evaluation system is great, but it’s a bit difficult for a novice like me,so I want to change the existing AI mechanism into a simple board game-style drawing card system.
      How can I safely change the BP_AbilitySystem evaluation system to sequential execution of Ability

      about evaluation system ,I watched the youtube and said that would explain it in the following video, but I waited for a long time and didn’t see the follow-up, including big units. It’s sad .
      I don’t understand the principles of big-scale units.


      2、I am modifying pathfinding, what should I do if I want to achieve the following effects, I am now using passthroughfrindly to modify, I don’t know if there will be any problems,In other words, the player may not be able to move in because a unit occupies the tile. Can AI ignore the unit and force it in?
      “Take the red circle as the target, ignoring the unit on the targetindex will also move in and knock it back”
      Click image for larger version  Name:	2.jpg Views:	0 Size:	23.6 KB ID:	1825756
      there may be a BUG problem (or I may have made it myself). When the unit uses pathfindingtype "Pass throughfrindly" to traverse two units, it will cause one of the grids in the path to become an accessible area.
      Click image for larger version  Name:	1.jpg Views:	0 Size:	23.4 KB ID:	1825757

      3、What does “use tile values ”​​and “use slow loop” in AI-Assess ability value mean?How does suggest target (custom event) trigger?

      Thank you very much!
      There are a lot of questions, sorry
      Last edited by 猫狗乱舞; 10-26-2020, 05:34 AM.

      Comment


        Hi, Monokkel!

        First of all, I want to thank you for your support and suggested decision: it almost works like a charm (however, has the small issues, but we'll speak about it a little bit later).

        So, since I was not able to write to you past 2 days (I'm very sorry ), I want to share with you some "undone" code, which was done on my own:



        (if this thumbnail would not open properly, here's a full-sized screenshot at the Google Drive).

        What I was trying to do:

        1. find, in what direction an active unit is watching;
        2. find, what tiles with what indices lies behind the active unit;
        3. remove those found tiles (or indices).

        So, the articles "1" and "2" was done (you can see it on the screenshot), but I couldn't found out, how to execute the article "3". And this is where I stopped for now. I've tried to use "Remove Tile Edge" function, but I was doing it wrong, because of the buggy result.



        Why I decided to choose a "directional/compass point" system (operate with a function "Get actor forward vector"):

        1. there is no any necessary in creating some additional actors;
        2. in my case, unit's movement cannot be more than the 6 points (tiles) per move;
        3. a structure of my main plane (GridManager) is almost the same, as it was in your previous answer (like in "Monopoly" game, if I can say).

        What about the "small issues" with your suggestion. I repeated your code, it works, yes, but units can go though the walls, despite a "bTraceForWalls" bool in the GridManager was set to "true" ("Heightmap" was set to "One Level"). I've placed a "Cube" static mesh as a wall, and I've got this issue, even with its changed collision profile to "BlockAll" (clean project, working with UE4.25.3 - maybe, this information might be useful).

        The next issue is when I switch from one unit to another, your suggested code become a half-working: one unit has a straight-forwarded movement, yes, but the other still has a bi-directional moving ability.

        Both of this issues you can see on the screenshot:



        (if this thumbnail would not open properly, here's a full-sized screenshot)

        So, in the end, I have two questions:

        1. what function(s) do I need to add to remove all the tiles that lies behind the unit's back (talking about my code);
        2. are those issues (ignoring walls and not so correct movement) are really issues, or am I just dumb?

        Thank you!
        Attached Files
        Last edited by kup guitarplayer; 10-25-2020, 07:56 AM.

        Comment


          猫狗乱舞 and kup guitarplayer: Between you this is quite a lot to answer, and in many cases questions I will need to do some testing to figure out the best answers to. I have a very pressing deadline at work by the end of this week, so I cannot promise to answer these questions in depth before early next week. Sorry about that, but deadlines + having a small kid = very little time remaining. But I have some follow-up questions to you that will make it easier for me to help you as soon as I get the time:

          猫狗乱舞: I don't understand your first figure. So the two blue circles are friendly units and the red circle is an empty tile that the player clicks to move to? And when you say that the units are pushed, where do you want each of the two units to end up?

          and sorry about the lack of tutorials on the ability system. I hope to make a lot of new tutorials for all sorts of things as soon as I'm done with the next update.

          "use tile values" means that the ability will calculate a value for each tile in move range (determined by things like if they have cover, if they are close to a lot of enemies etc.) and take this into account when deciding what to do. "use slow loops" is for optimization. Determining the value of all tiles relative to all targets is a costly operation, so using slow loops allows the AI to calculate it over multiple ticks.

          As for big units. the underlying code there is pretty complex. I generally suggest people not use big units unless they really need to, since it is the sort of thing that makes everything else more complicated. If you are determined to use them anyway, please specify what parts of the system you are struggling to understand and I will try to explain.


          kup guitarplayer: The suggestion I came with only works if the map consists of paths that are 1 tile wide (like the path along the edge of a Monopoly board). In your screenshot it seems like all tiles are open to be moved to, and it will not work. If you are not making a game similar to Monopoly I would appreciate if you could explain your game in detail so I know what assumptions I will have to keep in mind. Is there a game with similar rules you can point to? How exactly does the board look? What can a player do during their turn?

          For your first question you do not want to remove tile edges when you simply want to remove tiles from a specific unit's pathfinding result. Removing edges will remove these tile connections from the grids permanently, not just for the current unit. But if you already have a list of all the tiles you do not want the unit to reach, put the Paths output of RunPathfinding in a local variable, loop over the keys and check them agains your list of tiles to remove and remove these from the local variable when you find a match.
          Advanced Turn Based Tile Toolkit (Marketplace - Support)

          Dungeon Crawler Toolkit (Marketplace - Support)

          Discord

          Comment


            unitA chooses unitC as the target of attack, so unitA ignores the existence of unitB and enters his position, and Knock unitB back several Grid (by the way, is there a preset function to determine the direction?For example, front, back, left, and right based on the character coordinates, backstabs can be achieved)


            The unitA pathfindingtype I use now is "PassThroughFriendly", but since unitA is controlled by AI, I am not sure if it will enter the Index of unitB

            unitA is an AI enemy, unitB and unitC are player characters, they are from different factions
            Click image for larger version  Name:	2.jpg Views:	0 Size:	25.1 KB ID:	1826106

            I found the triggering method of the following content. It was actually in "moveattack-click". Is this a player behavior? I thought it was related to AI. I will read and learn.

            Click image for larger version  Name:	QQ图片20201026195537.png Views:	0 Size:	120.5 KB ID:	1826107


            "QueueAction" works great and reasonable, but I don’t understand a problem. I set a QueueAction and select Queued as QueueType. How to send it from Actions to CurrentAction? I use "signal ability executed". He executes it, but I think as a phased action, maybe I should choose "immediate", whether your idea is Queued is to "signal ability executed" to execute

            Thank you very much, it is really hard for a child
            Last edited by 猫狗乱舞; 10-26-2020, 11:20 PM.

            Comment


              This is the ability range1 of the size2 unit.
              I don't know why the big unit modifiy doesn't take effect.
              Click image for larger version  Name:	1.jpg Views:	0 Size:	68.8 KB ID:	1826459
              The correct size2 and range1 should be the blue area of ability_move.I want to combine them.

              Click image for larger version  Name:	2.jpg Views:	0 Size:	60.8 KB ID:	1826460


              But this is from the player’s view. The point is that the big unit is AI, so it seems that the range of it is different from the player’s range. I don’t know if he will find the target correctly.


              It seems that the AI activate range of ability has no big unit modify,
              Functions such as "find closest unit in move range" seem to be searching for targets based on a single grid

              for example,If my move is 1, range1, then AI should be able to target the unit in the red cross instead of based on gridindex4003 move+range(Find PotentialTargets-Find Unit in Range)
              Click image for larger version

Name:	QQ图片20201027214211.png
Views:	58
Size:	372.4 KB
ID:	1826464

              I imagine that the AI’s mov1,range1,current target range ,this is wrong.

              Click image for larger version

Name:	3.jpg
Views:	56
Size:	42.2 KB
ID:	1826465


              Sorry, the question is more complicated, maybe my understanding of the operation mechanism is wrong
              Last edited by 猫狗乱舞; 10-27-2020, 09:57 AM.

              Comment


                Originally posted by 猫狗乱舞 View Post
                ...
                Thanks for the detailed description. That will be very useful when I try to solve this for you. As I mentioned I have a deadline at work coming up this weekend, so I will not be able do test this out personally until early next week. These questions are complicated and not something I can answer without doing some testing, so I hope it is fine for you to wait a few days until I can get back to you.
                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                Dungeon Crawler Toolkit (Marketplace - Support)

                Discord

                Comment


                  Originally posted by Monokkel View Post

                  Thanks for the detailed description. That will be very useful when I try to solve this for you. As I mentioned I have a deadline at work coming up this weekend, so I will not be able do test this out personally until early next week. These questions are complicated and not something I can answer without doing some testing, so I hope it is fine for you to wait a few days until I can get back to you.

                  Thank you very much, it involves basic logic, so I am confused

                  Comment


                    Hi, Monokkel!

                    I have a very pressing deadline at work by the end of this week, so I cannot promise to answer these questions in depth before early next week. Sorry about that, but deadlines + having a small kid = very little time remaining.
                    It's alright, no worries, answer as soon as you'll have some free time. As for me, your answer's delays gives, at least, me an additional time to think .

                    The suggestion I came with only works if the map consists of paths that are 1 tile wide (like the path along the edge of a Monopoly board). In your screenshot it seems like all tiles are open to be moved to, and it will not work.
                    Yes, you're absolutely right: your suggestion works for the game like "Monopoly" (so, my project has almost the same mechanics and closely looks like the "Monopoly", but a little bit different).

                    If you are not making a game similar to Monopoly I would appreciate if you could explain your game in detail so I know what assumptions I will have to keep in mind. Is there a game with similar rules you can point to? How exactly does the board look? What can a player do during their turn?
                    So, as I said before, my project almost the same, as the "Monopoly". And what am I trying to create is an universal, code-based only function. "Universal" means: using it for the all types of games, based on ATTBT, without any additional meshes at all. And it almost works, but the last and the only thing I need to goal is to mark unwanted tiles as unreachable. Here I did some pics for better understanding (hope it helps):

                    Doesn't matter what wideness of the grid is using:


                    OR



                    As you can see, I've already got a map with unwanted tiles, separated them, and I've already got a map with needed tiles (they're printed on screen). The only thing I need is to mark unwanted tiles as unreachable. It's a pity, but the last part of your suggestion:

                    remove these from the local variable when you find a match.
                    was a little bit confusing to me. I thought about using "RemoveUnreachableTiles", tried to changing it, but, unfortunately, I failed in my tries.

                    So, the main question is: what function/macro - whatever - do I need to use to reach my goal (the goal is - let me repeat myself - to mark unwanted tiles as unreachable)?

                    Starting from the "RunOnACtorSelected" event:


                    Getting all the tiles, according to the unit's move range:


                    "PreventBackwardsMove" macro:


                    By the way, I'm starting from the "RunOnActorSelected" event, because when I try to refer to the "ActiveUnit" var of the "BP_TurnManager" from the "BP_GridManager", it returns nothing. Seems to me, when the game starts, a unit has no direct player controller focus (it's a little "broken"). You can try it by yourself: place some units to the map and try to press "E", "Q" or event "Tab" buttons right from the start, and you'll see no result. But, when you click anywhere, all of the controls becomes active. But, again: maybe, it's just me a clumsy dumbass?

                    Note: I'm using UE4.25.4 (if it matters).

                    Thank you!
                    Last edited by kup guitarplayer; 10-29-2020, 07:48 AM. Reason: links updated

                    Comment


                      Finally, seems to me, I've found what I was looking for:



                      I changed the code of my macro "PreventBackwardsMove" a little bit, so now all the tiles I want to be as "unreachable" becomes marked as impassable, according the function (how ironic, isn't it ). The only problem is now no any decals drawing on the impassable tiles. I suspect, it's all about a "RemoveTileEdges" function, situated inside the "MakeTileImpassable" function.
                      So, the question is: am I using this function correctly (for now, I don't see any other variations of this problem solution), or what do I have to do to change its behaviour (marking tiles, but not removing underlying edges)?

                      Comment


                        I'm sorry I have another small question


                        I made a Fear Status,in enemy turn gave the target player a Fear Status Effect to move it to the farthest Index.

                        An error was reported when running.


                        In this Fear Status BluePrint, use "Run pathfinding" to find the range that the Player can move

                        Click image for larger version  Name:	22.png Views:	0 Size:	86.2 KB ID:	1827505
                        Since I turned on the big unit, the player unit size is at least 1, and pathfinding is forcibly set to "big"

                        Click image for larger version  Name:	33.png Views:	0 Size:	72.7 KB ID:	1827507


                        The error appears in this "Branch"

                        I guess it’s because the role currently executing the action is not the "ActiveUnit" of this round(in enemy AI's Turn)


                        I’m not sure how to fix this, I can even break this branch without any problem

                        even if there is an error report, I can still get the correct result in the end
                        Last edited by 猫狗乱舞; 10-31-2020, 11:18 PM.

                        Comment


                          Hello! I ask for help! Sorry in advance for my english. The path of the character's movement is not shown for me, from this error (as it seems to me). Also, the characters do not move along the designated path, but somehow randomly. I recorded a video and showed errors.
                          https://drive.google.com/file/d/1HZm...ew?usp=sharing

                          Comment


                            Hi, orlovpavel!

                            Are you using UE4.24?

                            Comment


                              Originally posted by kup guitarplayer View Post
                              Hi, orlovpavel!

                              Are you using UE4.24?
                              hi! UE 4.25.4

                              ERROR:
                              Blueprint Runtime Error: "Attempted to access NODE_AddSplineMeshComponent-0 via property CallFunc_Array_Get_Item, but NODE_AddSplineMeshComponent-0 is pending kill". Blueprint: BP_Grid_Manager Function: Destroy And Clear Previous Spline Path Graph: Destroy and clear previous spline path Node: DestroyComponent

                              Comment


                                Hm-m-m... All the input/output pins connected correctly to all the nodes? Check if you've missed some?
                                By the way: seems to me, you're using a "BP_Unit_Anim_Debug"? If so, AFAIK, it's not a really good idea (Monokkel will correct me, if I'm wrong).
                                Last edited by kup guitarplayer; 10-31-2020, 05:16 AM.

                                Comment

                                Working...
                                X