Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Thanks the invisible unit worked out pretty well.
    I remember earlier in the year I spoke to you about multiple factions,
    would one of the ways to do that to add more factions to the enum and add more into the game mode/ai controller?

    Comment


      Originally posted by LDodds View Post
      Thanks the invisible unit worked out pretty well.
      I remember earlier in the year I spoke to you about multiple factions,
      would one of the ways to do that to add more factions to the enum and add more into the game mode/ai controller?
      Yeah, that's absolutely one way to do it. The relevant places would be where units are added to the Pawns In Sight and Pawns In Range arrays in Pathfinding and Find Tiles In Range respectively, as well as the part of ATBTT_PlayerController that decides what action to perform when a tile is clicked depending on the faction contained in that tile. For the first two you could either make it so only the relevant factions are searched for during these functions or you could add every single unit found of every faction and then afterwards decide to keep only the relevant targets (similarly to how I do it in the last screenshot in post #639)
      Advanced Turn Based Tile Toolkit (Marketplace - Support)

      Dungeon Crawler Toolkit (Marketplace - Support)

      Discord

      Comment


        If i was doing your latter example, would that be essentially removing the faction variable from pathfinding and then doing some switches later into the graph to determine how to act?

        Comment


          Indeed. The player controller doesn't care about the Pawns in Sight and Pawns in Range arrays, only the regular Pawn Array. For the AI controller you simply add all potential tiles and then sort out which ones you need to keep; probably using for loops like in the post I mentioned above. This way you do not have to add several switches to Pathfinding and Find Tiles In Range, which can quickly become quite a bit slower if they perform several operations for every tile checked.
          Advanced Turn Based Tile Toolkit (Marketplace - Support)

          Dungeon Crawler Toolkit (Marketplace - Support)

          Discord

          Comment


            When your referencing your previous images, is that a for each loop before based on all units in game before pathfinding
            or a for each loop after pathfinding based on the reachable pawns array?

            Comment


              The second one. One for each loop for pawns in move range from pathfinding and one for pawns in sight range from Find Tiles in Range.
              Advanced Turn Based Tile Toolkit (Marketplace - Support)

              Dungeon Crawler Toolkit (Marketplace - Support)

              Discord

              Comment


                Something akin to this?
                Reachable is after pathfinding and pawn in sight is after find tiles

                Click image for larger version

Name:	Screenshot 2015-11-11 17.14.59.png
Views:	1
Size:	103.0 KB
ID:	1093165


                Click image for larger version

Name:	Screenshot 2015-11-11 17.17.26.png
Views:	1
Size:	108.7 KB
ID:	1093166

                Comment


                  Pretty much, though you forgot an array. You can actually just do exactly what I suggested in the first screenshot of #639.
                  Advanced Turn Based Tile Toolkit (Marketplace - Support)

                  Dungeon Crawler Toolkit (Marketplace - Support)

                  Discord

                  Comment


                    Cheers for your help again!

                    Comment


                      If you were interested about my invisible unit, in player controller i do this check if you select another player unit
                      Click image for larger version

Name:	Screenshot 2015-11-09 22.46.44.png
Views:	1
Size:	60.2 KB
ID:	1093181

                      If the cast succeeds thats where my base is and there isnt a unit already there so you can move a unit onto the base
                      if it fails then its not the base tile

                      Comment


                        @Monokkel - Thank you for the great explanation. I find the logic interesting and while what I am working on the check would be much better served on the entering tile that is a different issue for another time. If I upgrade my project to the newer version when released I will have to adjust to it. It will come done to what additional features are in the newer version and if I feel I need any of them. My biggest suggestion is putting in functions with well documented in and out flows so people can understand what they need to do on the surface level. If I had a function that I could put a wall or a block down and pass it the location and maybe a few other items then I think that would be extremely useful.

                        I think the major key is that I want to make use of the great work you have already done. This is why I make only child objects and call back to the parent functions or override them is I really need to through I try to avoid that as well. I have no temptation to change what you have done because I do not look at it all the time. I only look at it when I need to understand how something was implemented so I can call it correctly. Honestly I am not happy with my 2D array for my platforms because I feel there are better ways to keep track of where things are. I also feel that it is going against the grain of what you have already done.

                        Long and short of it I look forward to your new release and how that will effect what I am working on.

                        Comment


                          @LDodds: Thanks for the screenshot! Glad to hear the invisible unit solution worked. I might hit you up when I get around to making my 4X example game.

                          @Anzak: I'm already doing my best to include useful utility functions for these sorts of things. I won't be able to cover all cases, but they should serve as handy examples also for users who want to modify the toolkit heavily.
                          Advanced Turn Based Tile Toolkit (Marketplace - Support)

                          Dungeon Crawler Toolkit (Marketplace - Support)

                          Discord

                          Comment


                            Yeahh I would appreciate that, would be really useful!
                            I will obviously keep an eye on here and a look out for updates

                            Comment


                              Any news when this will be updated to 4.10?

                              Just curious

                              Comment


                                Originally posted by HeadClot View Post
                                Any news when this will be updated to 4.10?

                                Just curious
                                I've tested it out, and it seems like ATBTT 4.9 works almost without issue on UE4.10. The only problem that seems to possibly be of any significance is that Get Hit Result Under Cursor seems to return the wrong location in the Height Map example sometimes. Other than that the default the default height for tiles in range need to be set about half and unreal unit higher to prevent them from clipping through terrain (can be done in the public variables of Grid_Manager). So for those of you who want to use 4.10 I would recommend just taking a copy of your 4.9 project and opening it in 4.10. I'll test it out some more and send an update to Epic soon, but that process usually takes a while.
                                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                                Dungeon Crawler Toolkit (Marketplace - Support)

                                Discord

                                Comment

                                Working...
                                X