Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Monokkel, thats exactly what I'm looking for. Just something that gets the AI to take a more defensive stance when guarding a city tile.

    Comment


      Originally posted by Monokkel View Post
      @Bradform_hinkle: I cannot see anyone named Nateight who has posted in this thread. Did you post in the wrong thread?
      Hey Monokkel, thanks for the quick reply. Sorry, I didn't quote Nateight's post properly or notice you responded already.
      His post is from way back on page 4. Click image for larger version

Name:	Nateight.png
Views:	1
Size:	499.3 KB
ID:	1099235

      Also, Thanks so much for putting this together Monokkel. Its a great resource so far. I've just begun learning UE and your toolkit has been a great resource, especially for how to us arrays.
      Right now I would like to be able to cycle through the units in the player faction with say, arrow keys or an in-game button without ending their turn and selecting enemy units. Similar to Xcom unit selection. I have tried triggering the "ChooseNextPawn" event in gamemode with an input and it sort of works in that it changes to the next unit in initiative order, but it also ends their turn. I'm not sure how to do this without cycling through enemy units as well. So I'm wondering if a better way to do this would be to create separate initiative arrays for both player and enemy factions as the basis for 2 distinct turn cycles.
      Or maybe i am over complicating this. Not sure, I'm pretty new to this.

      Comment


        Originally posted by MicahM View Post
        Monokkel, thats exactly what I'm looking for. Just something that gets the AI to take a more defensive stance when guarding a city tile.
        Ok, that should absolutely be doable. If you intend to use my newest update, however, I am tempted to wait until Epic upload it. I've changed AI a lot, so telling you how to do this in the old system will not be as helpful. The marketplace guys told me they would have it up very soon more than a week ago, and I sent them the update before Christmas so they are quite a bit overdue. I'll pester them some more and then I will try to help you implement the guarding functionality after it is uploaded. In short though, what you want to do is to check all tiles in move range for defendable tiles (possibly using an array to designate which tiles should be defended). If one is within range, make the unit move to this tile; then check tiles in sight range for targets to attack from its new position.

        Originally posted by Bradford_hinkle View Post
        Hey Monokkel, thanks for the quick reply. Sorry, I didn't quote Nateight's post properly or notice you responded already.
        His post is from way back on page 4. [ATTACH=CONFIG]75549[/ATTACH]

        Also, Thanks so much for putting this together Monokkel. Its a great resource so far. I've just begun learning UE and your toolkit has been a great resource, especially for how to us arrays.
        Right now I would like to be able to cycle through the units in the player faction with say, arrow keys or an in-game button without ending their turn and selecting enemy units. Similar to Xcom unit selection. I have tried triggering the "ChooseNextPawn" event in gamemode with an input and it sort of works in that it changes to the next unit in initiative order, but it also ends their turn. I'm not sure how to do this without cycling through enemy units as well. So I'm wondering if a better way to do this would be to create separate initiative arrays for both player and enemy factions as the basis for 2 distinct turn cycles.
        Or maybe i am over complicating this. Not sure, I'm pretty new to this.
        Ok, not too surprising I forgot about that Synchronous resolution is pretty tricky and not something I have thought of very good ways to solve. I might put my mind to the task at a later point, but it is too big of an undertaking to solve with a quick brainstorm. I have solved your other question, though. I thought making it possible to cycle between your units would be very easy, but it turned out to be a much bigger challenge than I anticipated. Here is my solution which uses both ATBTT_GameMode and ATBTT_PlayerController:

        In ATBTT_GameMode (a new function):
        Click image for larger version

Name:	cuF6cFW.png
Views:	1
Size:	480.2 KB
ID:	1099269

        In ATBTT_PlayerController (in the event graph):
        Click image for larger version

Name:	wuxZBc4.png
Views:	1
Size:	146.1 KB
ID:	1099270

        So what I am essentially doing is moving every player unit in the Initiative Order array one step to the right or left, moving the one that either gets to index -1 or to the index of the firs AI unit to the other side of the player's "half" of the array, then activating the unit on index 0. Hmm, not the best explanation, but you can hopefully figure it out from the graphs. Seems to work really well, though!
        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

        Comment


          @ Monokkel
          Woah, this is above and beyond what i expected as an answer. I tried a few different options but I got pretty stuck. thanks man
          Do you think you will include this in your next update? I'm sure a lot of people would like this as an option.

          As far as synchronous resolution, ya it seems really difficult. In addition to distinct movement turns and storing each units individual spline prior to animating the movement, I think I would at least need to store different conditional commands at each tile in the Units path way. Im going to tinker, and I'll keep you updated on progress.
          Thanks
          -Brad

          Comment


            @ Monokkel
            Thanks man, that's worked perfectly! Wasn't expecting it to work in unison with the preferred range, but it does
            Your new AI really is great!

            Comment


              @Bradford_hinkle: You're welcome I might indeed include this in a future update, but I'm unsure if I will add it as a general feature or as part of a game example. Probably the latter. Looking forward to hearing your progress on the synchronous resolution.

              @Bankworthy: Glad it worked! When you say it works in unison with preferred range, does that mean that your units still take their preferred range into account when searching for cover? How exactly did you end up implementing my suggestions?

              In other news I've kept on adding new features. Heightmaps are basically complete at this point, but still require quite a bit of testing and bug fixing. I have also added the option for hot-seat multiplayer, multiple allied/enemy factions and the option of having a mix of AI and player controlled units on the same team. I have also implemented the option I've talked about before of having multiple variants of pathfinding to choose from. This can be used to have some units ignore difficult terrain, be able to move through friendly units, only be able to walk on water etc. In addition I'm adding some useful debug features. I have altered the construction script so that it is possible to display the tile indexes on the tiles themselves and also which tiles they are connected to (including movement cost). Here is a screenshot:



              I'm actually beginning to run out of features that I feel should be included in the general toolkit and not just in game examples. After I have fully polished the features mentioned I think I have only muli-tile units and online multiplayer left, though the last one will probably take some time to implement. So not too far into the future I will probably be adding new features mostly through game examples. The first one will be an XCOM-like with weapons, cover, abilities etc.
              Attached Files
              Last edited by Monokkel; 01-27-2016, 08:32 AM.
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                I do indeed mean that the units still take the preferred range into account, after the part in Find Path to Tile in range function finds the Indexes with LoS, I check all these indexes, I get the victim direction from each index, and check to see if the index has appropriate cover and add the index to a new Indexes with Cover Array.
                In the Choice Candidates part, I replaced the uses of Indexes with LOS array with the new Indexes with Cover Array
                Much simpler than I thought it would be!
                They currently have trouble with LoS and full cover, but I'll be implementing corner peeking with the AI soon

                The displaying of the movement costs on the tile looks really good, would be useful in displaying cover values of each tile in my project!

                Comment


                  Monokkel, thanks so much. You've got to be one of the best all around people on the market place. It looks like a lot of the features I'm looking for are scheduled to be implemented in future game examples or in the forth coming update with the rogue-like example. I'm also trying to wrap my head around blueprints in general, I come from a unity background that included a lot of c# and javascript so translating some of that into UE4 has been a bigger challenge than I expected at first. This toolkit has been a huge help in grasping the engine itself. I look forward to working with this toolkit as it continues to evolve and expand!

                  Comment


                    @Bankworthy: Ok, cool! Can't wait to toy around with cover mechanics myself. As more layers are added to the AI's decision code they seem to become exponentially smarter

                    As for using the method used in the screenshot above for displaying cover values it will require some adjustments. Showing six or eight text renders on every tile quickly slows the game down, so it is currently better as a debug feature. If you have a limited number of values to display you can use instanced static meshes instead, which would make this less of an issue. Another possibility is to only display the numbers on tiles that are currently un move range.

                    @MicahM: Don't mention it! I think it is great that people can use my toolkit to learn their way around blueprints. When I started making the toolkit I had basically no knowledge of programming or scripting at all and within eight months it was released on the marketplace. Blueprints turned out to be the perfect development tool for how my mind works, and I'm still baffled that I was able to make something that so many people use to learn UE4 and create games Good luck in your UE4 endeavors!
                    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                    Comment


                      have you thought about pickups or items yet? I was thinking of a simple pickup that alters that the dmg,health,movement etc.. properties of the pawn that walks on the tile the item is on?

                      Comment


                        Hi Jopel. I have indeed thought about it, and it is actually included in the 2D game example in the update that should be up any time now. This includes healing potions, weapons and armor. It will require a bit of modification to implement in the regular toolkit, however, as the movement system for the 2D units is a bit different.
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          Hi Monokkel,
                          I'm going through your second video tutorial, where it shows how to turn off Display Path as Spline. I have Heightmap set to From Tiles and Auto Edge Costs Based on Height set to on, however the arrow markers are not visible on raised platforms. Is there a setting I am missing?

                          Comment


                            Hello Ariegos. Sorry for the late reply. I do not usually use instanced static meshes for displaying the path myself, so this seems to heave slipped past my bug testing. The fix is very quick, though. Modify the Display Path as Instanced Meshes function in BP_GridManager as follows (changes are highlighted):

                            Click image for larger version

Name:	KcKYigN.png
Views:	1
Size:	277.6 KB
ID:	1099702
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              I am trying to set up a teleporting tile in my game.
                              For one of my maps, I want there to be buildings of different heights but I dont want the player to be able to walk ontop any.
                              So iv set grid manager height map to tracing and impassable to 0.
                              I have set up some children of tile parent with collision events on them.
                              When a unit hits one theres a small delay and the unit teleports to the appropriate tile.
                              However once hes on there I cant select him or move him around.
                              Help?
                              Click image for larger version

Name:	In-Game Screen.png
Views:	1
Size:	493.7 KB
ID:	1099732
                              Click image for larger version

Name:	TeleportCode.png
Views:	1
Size:	178.3 KB
ID:	1099733
                              Sorry the BP screenshot is abit messy.
                              It basically checks if the unit is player, if the tile is the selected unit to move to, then sets units new index, teleports, sets new pawn array elem and clears markers

                              It quite possibly could be the height settings in the grid manager so how would I change that to work for how I want but so the units cant normally go higher without use of the teleport?
                              Last edited by LDodds; 02-02-2016, 09:19 AM.

                              Comment


                                Hello Monokkel,

                                It's been a long time since I've looked at this project and it looks like you've made many improvements. There are a couple of things that I would really like to be able to do with this. It looks like you're already working on the different heights. Another thing I'd be interested in is the ability to dynamically generate a tile grid for a particular map. For instance, what would be required to integrate this system into something like Dungeon Architect to create real time generated tile based dungeons?

                                Thanks
                                Jake

                                Comment

                                Working...
                                X