Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    [MENTION=4318]Monokkel[/MENTION] Hi, I am back with more questions. Can you give me an idea as to what would be the best way to go about spawning a dynamic blocker for X period of time?

    Say for example the player throws an incendiary grenade which sets a certain area on fire upon impact making it impassable for X number of turns. How would I designate that area is blocked from player/enemy movement until the fire has burnt out?

    Comment


      Hi [MENTION=250146]SpineRazor[/MENTION]. There are a few ways I can think of doing this, though the simplest and most flexible (though a tiny bit less performant than some other methods) is to create a new grid sized array designating tiles as blocked/unblocked. I'll show you how with some screenshots.

      First, initialize the new array:
      Click image for larger version

Name:	HsPDUyD.png
Views:	1
Size:	123.8 KB
ID:	1128002

      Then make pathfinding skip tiles that are blocked:
      Click image for larger version

Name:	b52MmHq.png
Views:	1
Size:	199.8 KB
ID:	1128003

      Now you can set any tile index to impassable by setting the appropriate index in the GridBlockedTiles array to true. When you do so, make sure to store the tiles you modify so you can revert them later (I do it in a very simple way here, but in your game you could store separate CurrentBlockedTiles arrays in your various incendiary grenade blueprints so that when one fire goes out it does not remove all other fires on the map):
      Click image for larger version

Name:	djsW6NC.png
Views:	1
Size:	183.5 KB
ID:	1128004

      Remember that if you do something to the grid to affect pathfinding it will first affect pathfinding the next time the Pathfinding function is run. If you have already run pathfinding and then detonate an incendiary you would have to re-run that pathfinding for the change to take effect.

      Hope that helps!
      Advanced Turn Based Tile Toolkit (Marketplace - Support)

      Dungeon Crawler Toolkit (Marketplace - Support)

      Discord

      Comment


        Thanks [MENTION=4318]Monokkel[/MENTION]! I'll give this a shot this weekend.

        Comment


          Originally posted by SpineRazor View Post
          Thanks [MENTION=4318]Monokkel[/MENTION]! I'll give this a shot this weekend.
          Good luck! Let me know how it turns out
          Advanced Turn Based Tile Toolkit (Marketplace - Support)

          Dungeon Crawler Toolkit (Marketplace - Support)

          Discord

          Comment


            Small update. I've decided to split the next update into two separate ones to get the new features to users more quickly. I will be including networked multiplayer and transform-independent grids in the first update, and then add multi-tile units in the update after that one. This does not mean that you guys will have to wait longer for multi-tile units, but that you will get the rest of the features earlier.
            Advanced Turn Based Tile Toolkit (Marketplace - Support)

            Dungeon Crawler Toolkit (Marketplace - Support)

            Discord

            Comment


              Hello, [MENTION=4318]Monokkel[/MENTION]!
              I need to develop few features and could use some directions where to start.
              Features come from games like Jugged Alliance and Fallout:Tactics, where you move your units RTS style untill you see enemy (or enemy sees you), after that it's turn based.
              Turn based part is already pretty good in ATBTT, but RTS part is missing.

              1. Realtime movement while player doesn't see any enemy.
              I've found "free roam" boolean, which makes pawns move without switching turns. But i can't change destination while moving. Pawn recalculates path only after it reaches his destination. What's best way to implement immediate path recalculation if clicked while moving?

              2. Group selection and moving in formation, while we don't see any enemy.
              Right now, as far as i can see, movement is initiated and calculated by PlayerController blueprint, meaning that for group movement i need to move this logic to Unit_parent blueprint, so it's run separately and simultaniuosly for each pawn. Or, maybe, more easy way would be to change CurrentPawn variable in GridManager to CurrentPawns array?
              Last edited by Dimitry Prolygin; 05-22-2017, 04:15 AM.

              Comment


                Originally posted by Monokkel View Post
                [MENTION=151429]Rockhopper[/MENTION]: Thanks! It will be quite some time until the next update is done, so if time is of the essence using your own solution is the best idea anyway.

                For having a unit go a custom path, here is a simple solution. In this case I'm calling it from the player controller, though it could be called from anywhere. You would probably use a less hard-coded way to make the int array, but you get the idea.

                [ATTACH=CONFIG]140651[/ATTACH]

                Your explained solution for networked multiplayer seems reasonable. I'm not sure if you have solved all the issues you were asking about, though. Do you have any remaining questions?
                Hey [MENTION=4318]Monokkel[/MENTION], I've done a lot of work on my basic multiplayer setup and am trying to port it all over to work in the "Jungle_Raid" map. For some reason, the above seems to have difficulties with the multi-level platforms, where a specific tile has two separate locations to stand at two different levels. The remote player isn't always walking at the correct level. Is there some other piece of information I should look at to try and tell a unit what path and what tile to take? (As some example, go from 0, to the bottom tile of 1, to the bottom tile of 2, to the top tile of 3). Thanks!

                Comment


                  Originally posted by Rockhopper View Post
                  Hey [MENTION=4318]Monokkel[/MENTION], I've done a lot of work on my basic multiplayer setup and am trying to port it all over to work in the "Jungle_Raid" map. For some reason, the above seems to have difficulties with the multi-level platforms, where a specific tile has two separate locations to stand at two different levels. The remote player isn't always walking at the correct level. Is there some other piece of information I should look at to try and tell a unit what path and what tile to take? (As some example, go from 0, to the bottom tile of 1, to the bottom tile of 2, to the top tile of 3). Thanks!
                  Are you using the same indexes for each level? The index of a tile at level 2 is equal to the index of the tile directly below it + GridSizeX * GridSizeY, so for a 3*3 grid with two levels, the tile above tile 5 would be 14, for instance. If you want to display the tile indexes in the viewport select the grid manager and check PregenerateGameplayGrids and ShowTileIndexes.
                  Advanced Turn Based Tile Toolkit (Marketplace - Support)

                  Dungeon Crawler Toolkit (Marketplace - Support)

                  Discord

                  Comment


                    UE4.16 is out and I've checked the latest version of ATBTT as compatible with the new version, so it should now be available through the launcher. There are no differences between this version and the 4.15 version of the toolkit, so if you are working with ATBTT in 4.15 and want to continue in 4.16 simply open a copy of your 4.15 project in UE4.16. The next feature update is still in the works.
                    Advanced Turn Based Tile Toolkit (Marketplace - Support)

                    Dungeon Crawler Toolkit (Marketplace - Support)

                    Discord

                    Comment


                      Originally posted by Monokkel View Post
                      Hi [MENTION=151429]Rockhopper[/MENTION]I've got it more or less working like I want at this point, though it is still a bit rough around the edges. In general terms, what I'm doing is do most things on the server, including all calculations such as pathfinding, visibility, whether a clicked tile can be moved to etc. (this is essential to prevent cheating). Input is handled from the player controller, but unlike the version of ATBTT currently on the marketplace I do not do things like check the cost of the clicked tile, the move value of the current tile or anything like that. I just convert the clicked location into a grid index and do the rest on a server only event in a separate, replicated actor.
                      Does this mean future versions of the toolkit will only work if you have a server? We have decided to not use multiplayer in our first game because balancing would take too much focus away from our game's story, however we would still like to use multi-tile units. Will these two features be optional in the updated toolkit? Or would we need the server only version to have the multi-tile units as well.

                      Originally posted by Monokkel View Post
                      Small update. I've decided to split the next update into two separate ones to get the new features to users more quickly. I will be including networked multiplayer and transform-independent grids in the first update, and then add multi-tile units in the update after that one. This does not mean that you guys will have to wait longer for multi-tile units, but that you will get the rest of the features earlier.
                      Sounds like you're making great progress!
                      Last edited by Mewbits; 05-26-2017, 12:33 AM.

                      Comment


                        Originally posted by Mewbits View Post
                        Does this mean future versions of the toolkit will only work if you have a server? We have decided to not use multiplayer in our first game because balancing would take too much focus away from our game's story, however we would still like to use multi-tile units. Will these two features be optional in the updated toolkit? Or would we need the server only version to have the multi-tile units as well.
                        By no means. If you are making a single player game the computer the game is running on counts as the server, so this has no impact on single player. The toolkit works just as it always has, but with the added possibility of networked multiplayer if so desired.

                        Originally posted by Mewbits View Post
                        Sounds like you're making great progress!
                        Certainly There is still much to do, but I'm getting there.
                        Advanced Turn Based Tile Toolkit (Marketplace - Support)

                        Dungeon Crawler Toolkit (Marketplace - Support)

                        Discord

                        Comment


                          hi, really awesome kit, excelent to place the tiles.
                          but personally i really don't like the restrictives rules and seek something more freely like fallout or wasteland:
                          free select and move of the pawn if have no visible enemis, attack or select another pawn dont finish the turn, select a pawn when click on it (not only when click on the tile), separate attack and move mouse buttons (to avoid the fails clics).
                          i try to by myself but it's really difficult to turn the game rules of this template to do that. ^^'

                          Comment


                            Originally posted by Drackart View Post
                            hi, really awesome kit, excelent to place the tiles.
                            but personally i really don't like the restrictives rules and seek something more freely like fallout or wasteland:
                            free select and move of the pawn if have no visible enemis, attack or select another pawn dont finish the turn, select a pawn when click on it (not only when click on the tile), separate attack and move mouse buttons (to avoid the fails clics).
                            i try to by myself but it's really difficult to turn the game rules of this template to do that. ^^'
                            Hi Drackart, glad you like the toolkit. The things you are asking about are all fairly straightforward to implement. I'm away this weekend visiting the in-laws, so I cannot explicitly show you how to implement this, but I'll do my best to describe it, and if you find it difficult to implement I'll show you using screenshots when I get back.

                            For having free movement uninterrupted by turns you need to set the FreeRoam boolean in ATBTT_GameMode. When this variable is set to true the current unit has infinite move and never ends its turn. Whenever you want to return to turn based combat you need to set it back to false and run the EndTurn event in ATBTT_PlayerController.

                            For selecting units when clicking the unit mesh, not just the tile it is standing on, you could run a line trace for objects specifying Unit as the class in the filter. Run this trace in the event graph of ATBTT_PlayerController before the line trace by the channel PathtTrace is run. If it returns true, get the index of the clicked actor and set the Clicked Tile variable to this value. Then skip the regular line trace and jump right to the part of the event graph where the faction of the clicked unit is examined to determine the appropriate action. Make sure that your units have collision enabled and do not block PathTrace or RangeTrace (as this will disrupt pathfinding and line of sight calculations respectively).

                            For separating attacking and moving by different clicks you can add a new right-click input and add this in the same place as the left click event in ATBTT_PlayerController. Connect it to the same spot, but for each click event set a boolean so that you know which button was just clicked (for instance add a bLeftClick boolean that is set to true when LMB is clicked and false when RMB is clicked). Later down the execution chain check if the value of this boolean is set to the appropriate value before executing the nodes associated with movement or attacking.

                            I hope my description was clear enough for you to implement your desired changes. If not I'll try again once I have access to my home computer.
                            Advanced Turn Based Tile Toolkit (Marketplace - Support)

                            Dungeon Crawler Toolkit (Marketplace - Support)

                            Discord

                            Comment


                              Originally posted by Monokkel View Post
                              Small update. I've decided to split the next update into two separate ones to get the new features to users more quickly. I will be including networked multiplayer and transform-independent grids in the first update, and then add multi-tile units in the update after that one. This does not mean that you guys will have to wait longer for multi-tile units, but that you will get the rest of the features earlier.
                              That's incredibly cool that it sounds like multiplayer is coming along nicely! I'm rooting for you, great job!

                              Comment


                                Hello! Sorry if this has already been asked before but I'm planning on making a few maps ahead of buying your toolkit on the marketplace so I have to ask; Is there is a set "distance" or "size" that the automatically generated grid will be using that I can use as a measurement when making the map? Or does it scale according to the textures? Rather new to the programming side of things, mostly done level development, so any information on this would be incredibly helpful. Thanks in advance.

                                Comment

                                Working...
                                X