Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Originally posted by borrowedLadder View Post
    Hey guys, is it possible to change the Grid Size X and Y of the BP_GridManager during runtime? I'm looking through the blueprints but struggling with figuring it out
    There are a few ways to go about this depending on what you're after. It boils down to adding new values to the GridLocations TMap and GridEdges TMap, but the best implementation can vary quite a bit depending on how much you are adding. Could you describe your desired end result in more detail?
    Advanced Turn Based Tile Toolkit (Marketplace - Support)

    Dungeon Crawler Toolkit (Marketplace - Support)

    Discord

    Comment


      Originally posted by Monokkel View Post

      There are a few ways to go about this depending on what you're after. It boils down to adding new values to the GridLocations TMap and GridEdges TMap, but the best implementation can vary quite a bit depending on how much you are adding. Could you describe your desired end result in more detail?
      Hey there, I'm trying to build a simple editor, that players can place/change tiles and grid during runtime . So when the game is run, they can change grid size, and place the tiles - then save that level out or play through the level immediately

      Comment


        Update: i figured out that problem but now the problem still is that anyone that dies still lives despite the damage being calculated and they're still being referenced on the grid manager. I've been trying to figure this out but the only solution i came up with was redo what i could in a separated saved file of the project but it still exist maybe i should just use the pastebin thing you linked to me to see if you can figure this out.

        https://blueprintue.com/blueprint/fntqnsrp/

        https://blueprintue.com/blueprint/me1i_a3m/

        Thanks, EagleEyeGamma.

        Comment


          Another Update, it seems the ability with the repeating and damage modifier is somehow ignoring the ability to destroy the unit. I ran it through some more testing and figured it out the problem as the unit is not contacting the main BP_Unit to run the Destroyed Section of the Event graph or running the Animate Death Function somehow yet i ran it with the other abilities and it worked. I hope you can help me figure out why this is happening when this ability was working fine before.

          Comment


            Originally posted by borrowedLadder View Post

            Hey there, I'm trying to build a simple editor, that players can place/change tiles and grid during runtime . So when the game is run, they can change grid size, and place the tiles - then save that level out or play through the level immediately
            This should do the job, I think. Not fully tested, and if you use multi-level stuff, big units etc. you will need to clear those appropriate maps as well. If you are not using a grid of spawned instanced static meshes (say you're using manually placed meshes or terrain instead and hiding the grid), then the commented section is not necessary. Note that if you input a large grid size you are likely to drop some frames. Here is the pastebin for the code in the screenshot.

            Click image for larger version  Name:	ResizeGrid.PNG Views:	0 Size:	132.2 KB ID:	1714025


            Originally posted by EagleEyeGamma View Post
            Update: i figured out that problem but now the problem still is that anyone that dies still lives despite the damage being calculated and they're still being referenced on the grid manager. I've been trying to figure this out but the only solution i came up with was redo what i could in a separated saved file of the project but it still exist maybe i should just use the pastebin thing you linked to me to see if you can figure this out.

            https://blueprintue.com/blueprint/fntqnsrp/

            https://blueprintue.com/blueprint/me1i_a3m/

            Thanks, EagleEyeGamma.
            Originally posted by EagleEyeGamma View Post
            Another Update, it seems the ability with the repeating and damage modifier is somehow ignoring the ability to destroy the unit. I ran it through some more testing and figured it out the problem as the unit is not contacting the main BP_Unit to run the Destroyed Section of the Event graph or running the Animate Death Function somehow yet i ran it with the other abilities and it worked. I hope you can help me figure out why this is happening when this ability was working fine before.
            Ok, so I've replicated a simplified version of your ExecuteAbility function, where every attack is super effective (as I don't think any of the other conditions should affect the bug you're experiencing). However, everything seems to be working correctly on my end. Might you have changed some other part of the toolkit that is causing this? Could you try doing what I did and start a fresh ATBTT project, copy over your ExecuteAbility code and see if you get the same issue or not?
            Last edited by Monokkel; 01-28-2020, 07:24 AM.
            Advanced Turn Based Tile Toolkit (Marketplace - Support)

            Dungeon Crawler Toolkit (Marketplace - Support)

            Discord

            Comment


              I want to use this as a foundation for a tile based digital board game.

              The players will be able to move along the spaces a specific number of times, including going back to a space which counts as one of the number of times. I am happy I can turn off diagonal movement, I see that option in the video. Does this toolkit allow me to have the number of moves count when going forward and then going back to a previous space?

              I see the spline while hovering with the mouse but you can't hover with touch screens. How would navigating to a space to move work with touch on mobile?

              Comment


                Originally posted by RTE1984 View Post
                I want to use this as a foundation for a tile based digital board game.

                The players will be able to move along the spaces a specific number of times, including going back to a space which counts as one of the number of times. I am happy I can turn off diagonal movement, I see that option in the video. Does this toolkit allow me to have the number of moves count when going forward and then going back to a previous space?

                I see the spline while hovering with the mouse but you can't hover with touch screens. How would navigating to a space to move work with touch on mobile?
                This should not be terribly difficult. You could do this by defining some rules in your movement ability, increasing or decreasing the action points of your unit as appropriate depending on the tile you are moving to. You could store tiles previously moved to in a Set or Array temporarily in the ability blueprint and use this for your action point rules.

                "Hovering" over tiles on mobile is handled through double taps. One tap to show the mouse hover stuff and another tap on the same tile counts as a mouse click. You can see this demonstrated in this video.
                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                Dungeon Crawler Toolkit (Marketplace - Support)

                Discord

                Comment


                  Originally posted by Monokkel View Post

                  This should not be terribly difficult. You could do this by defining some rules in your movement ability, increasing or decreasing the action points of your unit as appropriate depending on the tile you are moving to. You could store tiles previously moved to in a Set or Array temporarily in the ability blueprint and use this for your action point rules.

                  "Hovering" over tiles on mobile is handled through double taps. One tap to show the mouse hover stuff and another tap on the same tile counts as a mouse click. You can see this demonstrated in this video.
                  Thanks for the reply.

                  I just bought the toolkit and I couldn't find an option I thought existed. Do you have the ability to connect multiple BP grids and have the playable characters move from one BP grid to another? My board game will have separate tiles that get randomly drawn and connect to the existing grid(s) and I need the players to be able to move from one grid to the next.

                  Comment


                    4.24.2 update? When?

                    Comment


                      Hey!
                      Great work as always, just checking out the newest edition of the build. Two questions
                      Now that the main index array for the grid is a Map, how would you go about calling a random tile? Something that sounds simple but anything iv tried is a flawed system that includes indexes with no tile so the unit spawns fail.

                      And two, really intrigued by the new turn managers but is there any info as to how/why they're different?

                      Thanks!

                      Comment


                        Originally posted by RTE1984 View Post

                        Thanks for the reply.

                        I just bought the toolkit and I couldn't find an option I thought existed. Do you have the ability to connect multiple BP grids and have the playable characters move from one BP grid to another? My board game will have separate tiles that get randomly drawn and connect to the existing grid(s) and I need the players to be able to move from one grid to the next.
                        The toolkit does not support multiple Grid Managers. However, the single grid manager can handle multiple, separated grids. Essentially you can get the same effect as having multiple grid managers by just having separate walkable areas within the bounds of the grid manager (which extends 1000 tiles in the X and Y axes).

                        So to add new tile pieces to the grid as you describe, you can add their locations to the grid manager in GridLocations and connect them to other tiles through GridEdges. If you see my answer to BorrowedLadder above, you can see how you can update the entire grid. However, this is overkill if you just want to add a few tiles at a time. For large grids this could also cause lost frames.

                        What you can do, however, is to add each new tile to the grid manager separately, by doing the same sorts of operations that are done to the entire grid in SetupGridArrays at startup in BP_GridManager. This is not entirely straightforward, though. Mainly because of how the edges between tiles work. Each tile stores what tiles can be moved to from that tile, but not what tiles can move into the tile. This means that you will need to update both the added and the surrounding tiles in the right way. The approach here also varies a bit depending on whether you are using heightmaps, hex grids, multilevel grids etc.

                        I am currently working on a function that does most of this work for you. I want to make this a general and flexible function that I can include in the next update, so it is taking some time to get it right. I hope I have the time to finish it tomorrow, and if so I can share it with you here. It believe it should be well suited for the sort of use case you are describing.

                        Originally posted by theProfessor View Post
                        4.24.2 update? When?
                        I generally send out a new update when a new full version of Unreal Engine is out. Are there any features that I'm currently working on that you need?

                        Originally posted by LDodds View Post
                        Hey!
                        Great work as always, just checking out the newest edition of the build. Two questions
                        Now that the main index array for the grid is a Map, how would you go about calling a random tile? Something that sounds simple but anything iv tried is a flawed system that includes indexes with no tile so the unit spawns fail.

                        And two, really intrigued by the new turn managers but is there any info as to how/why they're different?

                        Thanks!
                        Hey Luke! You can get a random grid index like so:



                        For the turn manager, the default one orders units in initiative based on their faction. This is quite similar to how it is handled in XCOM. TurnManager_Initiative functions more like the old default, ordering units based on their initiative attribute, similar to D&D. TurnManager_Strategy is similar to the default one, but with no units selected at the start of the game and no unit automatically selected after the previous one has ended its turn. This is similar to for example Fire Emblem.
                        Last edited by Monokkel; 01-30-2020, 06:43 PM.
                        Advanced Turn Based Tile Toolkit (Marketplace - Support)

                        Dungeon Crawler Toolkit (Marketplace - Support)

                        Discord

                        Comment


                          Thanks dude! Hope all is well on your side, really glad your still working on this

                          Comment


                            [QUOTE=Monokkel;n1715253]

                            The toolkit does not support multiple Grid Managers. However, the single grid manager can handle multiple, separated grids. Essentially you can get the same effect as having multiple grid managers by just having separate walkable areas within the bounds of the grid manager (which extends 1000 tiles in the X and Y axes).

                            So to add new tile pieces to the grid as you describe, you can add their locations to the grid manager in GridLocations and connect them to other tiles through GridEdges. If you see my answer to BorrowedLadder above, you can see how you can update the entire grid. However, this is overkill if you just want to add a few tiles at a time. For large grids this could also cause lost frames.

                            What you can do, however, is to add each new tile to the grid manager separately, by doing the same sorts of operations that are done to the entire grid in SetupGridArrays at startup in BP_GridManager. This is not entirely straightforward, though. Mainly because of how the edges between tiles work. Each tile stores what tiles can be moved to from that tile, but not what tiles can move into the tile. This means that you will need to update both the added and the surrounding tiles in the right way. The approach here also varies a bit depending on whether you are using heightmaps, hex grids, multilevel grids etc.

                            I am currently working on a function that does most of this work for you. I want to make this a general and flexible function that I can include in the next update, so it is taking some time to get it right. I hope I have the time to finish it tomorrow, and if so I can share it with you here. It believe it should be well suited for the sort of use case you are describing.


                            Ok, thank you for the detailed response. The implementation of our tiles should be fairly straightforward, there will be 3x3 rectangle tiles that when drawn in game, will connect to each other as the player's progress. There won't be varying heights, or multiple levels, they will be straight and corner tiles only, the corners will be mostly using meshes to block one way forcing the players the other way. They connect like this: https://images-na.ssl-images-amazon....AC_SL1500_.jpg

                            As I am just starting the project and you are currently working on finishing this function, I'm fine waiting on your update.

                            Comment


                              Originally posted by LDodds View Post
                              Thanks dude! Hope all is well on your side, really glad your still working on this
                              Thanks I've got a few other projects now that I'm working on in parallel, but I always come back to ATBTT. I feel it is more or less feature complete at this point, but there is always more stuff that can be added in the form of utility functions, gameplay examples etc.

                              Originally posted by RTE1984 View Post

                              Ok, thank you for the detailed response. The implementation of our tiles should be fairly straightforward, there will be 3x3 rectangle tiles that when drawn in game, will connect to each other as the player's progress. There won't be varying heights, or multiple levels, they will be straight and corner tiles only, the corners will be mostly using meshes to block one way forcing the players the other way. They connect like this: https://images-na.ssl-images-amazon....AC_SL1500_.jpg

                              As I am just starting the project and you are currently working on finishing this function, I'm fine waiting on your update.
                              Ok, thanks for the explanation. This should indeed be a good fit for the new function. I finished it today. It will be included in the next update (which I'll likely release along with UE4.25), but you can have it now.

                              Here is the main function (pastebin link)



                              First nested function (pastebin):



                              Second nested function (pastebin)



                              The UpdateTilesInRange function works by getting grid indexes in range of a source index and adding them to GridLocations and GridEdges in much the same way as happens for the entire grid during startup. As mentioned, the edges entering into a tile is generally stored in the adjacent tiles, so you need this function to cover a tile area of one tile more in each direction than the GridIndexes you are adding to the grid.

                              If you have not done so already I recommend seeing this video to understand how the toolkit indexes tiles. Let me know if you run into any difficulties.
                              Last edited by Monokkel; 01-31-2020, 06:49 PM.
                              Advanced Turn Based Tile Toolkit (Marketplace - Support)

                              Dungeon Crawler Toolkit (Marketplace - Support)

                              Discord

                              Comment


                                Hello, could you point to location where decals are drawn and how you detect when and where to draw it? Thanks!

                                Comment

                                Working...
                                X