Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Hello Guys,

    I try to make destrucible walls, so if they are broken the pathfinding goes through it. But I dont get it done. Here, its firing the event as intented but does not add the edges to make it passable. I have no idea what I´m doing, what is required for the edge node in the function? I just made a "promote to variable". I made this within the standard tile BP.

    Greetings.
    Attached Files

    Comment


      Originally posted by Subzeroblack View Post
      Was about to ask about 4.19, but seems you've got things rolling already, cant wait until its release!
      It is very close now. I plan to send it out this week. I just want to make one new tutorial video first so I do not get swarmed by support requests immediately. I'm in the midtst of recording it right now,

      Originally posted by Notoriousdude View Post
      Hello Guys,

      I try to make destrucible walls, so if they are broken the pathfinding goes through it. But I dont get it done. Here, its firing the event as intented but does not add the edges to make it passable. I have no idea what I´m doing, what is required for the edge node in the function? I just made a "promote to variable". I made this within the standard tile BP.

      Greetings.
      Heh, yeah those inputs are there for a reason. So to give you an explanation of what indexes and edges are, the grid manager contains a grid represented by index values, one for each tile. These start at 0 and increase by 1 eastward (UE4 X-axis direction) and by GridSizeX southward (UE4 Y-axis direction). So if you have a square grid of 3*3 tiles, the indexes would look as follows:

      [ 0 ] [ 1 ] [ 2 ]
      [ 3 ] [ 4 ] [ 5 ]
      [ 6 ] [ 7 ] [ 8 ]

      In the grid manager there is an array called the edge array (in next update called GridEdges). This array defines what tile indexes a unit can move to when standing on a specific tile. By default all the tiles in the grid above would be connected to their neightbors. So if you looked at the edge array at index 2 you would find an array containing three values: 1, 4 and 5.

      But say you placed a wall between index 2 and 5 at the start of the game. If so, only the values 1 and 4 will be at the edge array index 2. If you later destroy the wall mesh or actor, but do not change the underlying edge array units will still not be able to pass between the tiles.

      To fix this, after destroying the wall we use the AddTileBothWays function to add edge 5 to index 2 and edge 2 to index 5. To do this you would set TileIndex to either 2 and edge index to 5 (or the opposite. Does not madder since we're adding edges both ways). Cost would define the movement cost you want for passing between the tiles. Default is 1 unless you want some sort of difficult terrain.

      Hope that helps you understand what is going on under the hood here. Of course, hard coding the specific indexes for each wall is not an ideal solution, so what you probably want to do is add a function to your wall which destroys it and adds the correct edge programmatically. If your wall is based on the BP_Tile actor it becomes pretty easy. Use the variable Index as input for TileIndex and use Index+1 for an eastern wall, Index-1 for western, Index - GridSizeX for north and Index + GridSizeX for south.
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        Hey,

        "If your wall is based on the BP_Tile actor it becomes pretty easy. Use the variable Index as input for TileIndex and use Index+1 for an eastern wall, Index-1 for western, Index - GridSizeX for north and Index + GridSizeX for south."

        Works perfect! Thank you very much!

        Here in case someone needs it in the future. destructible wall

        Greetings!

        Attached Files

        Comment


          Originally posted by Notoriousdude View Post
          Hey,

          "If your wall is based on the BP_Tile actor it becomes pretty easy. Use the variable Index as input for TileIndex and use Index+1 for an eastern wall, Index-1 for western, Index - GridSizeX for north and Index + GridSizeX for south."

          Works perfect! Thank you very much!

          Here in case someone needs it in the future. destructible wall

          Greetings!
          Glad it worked like you wanted! FYI you do not need to cast to the SciFi grid manager here as the regular grid manager contains the AddGridBothWays function and it is not modified by the SciFi child blueprint.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Originally posted by Monokkel View Post
            vepure : This is likely caused by you removing an index from the pawn array. The pawn array is an array the size of the grid (GridSizeX*GridSizeY). If you use the remove index node you are actually removing that entire tile from the array, meaning that every unit on the map on an index higher than the one on your map is moved one tile westward. Instead use the SetArrayElement node without an input.

            In the upcoming update I've changed the unit array from an array to a map, which will make it possible to simply remove an element, but for the time being that is how you would fix it. Try chaning the remove node to a SetArrayElement node and let me know how it goes.
            Thank you for your help. I followed your advice and it works much better now. Here's what I did:
            Click image for larger version

Name:	2018-03-22_00h55_02.png
Views:	3
Size:	96.7 KB
ID:	1447942
            Now, everything is fine if the pawn moves after they respawn (which will mostly be the case since the spawns will be on opposite sides of the map). That being said, the following issues occur:

            Click image for larger version

Name:	2018-03-22_01h00_53.png
Views:	3
Size:	475.7 KB
ID:	1447943
            In the picture above, the green pawn has just respawned after being killed. The tile it respawned on became purple (as if the tile would be both red and blue).

            I also get the following error in the message log:

            "Blueprint Runtime Error: Accessed None trying to read property CallFunc_Array_Get_Item3 from function: 'Spawn Tiles In Sight Range' from node: Branch in graph: Spawn Tiles In Sight Range in object: BP_Grid_Manager with description: Accessed None trying to read property CallFunc_Array_Get_Item3"

            Anyway, I'm much closer now to my intended original effect, thanks to you!

            Looking forward to the next update!

            Comment


              vepure : Glad to see it working As for your error, might it be that you are not adding the unit back into the unit array when it respawns? You would again have to use SetArrayElement and input a reference to the actor. If this is not the case, could you paste a screenshot of your respawn function?
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                I have a problem

                Sorry,my english is poor

                I create a new project with 4.18 version

                and when I use this BP,I don't change anything

                when I begin that map ,I find I can't move ,and when I move the mouse ,I cant find the white line

                like this


                So Could you tell me How I fix it ?
                think you!!!!!!!!!!!!!

                Comment


                  Hey,

                  "Glad it worked like you wanted! FYI you do not need to cast to the SciFi grid manager here as the regular grid manager contains the AddGridBothWays function and it is not modified by the SciFi child blueprint."

                  Oh okay I thought I have to because Im using this specific Grid manager in the scene. Thanks for the hint. Im pretty new to your toolkit and you have done so much stuff that its hard to follow sometimes. But it´s great thank you for your service!

                  Sidenote, in your tutorialvideo you use the impact damage within the apex plugin, you should not use this because it means it enables impact damage of the chunks themselves. For example you make a house of the walls then one broken wall can tear done all other walls around like a domino-effect. Without it only the walls within the radial damage will break.

                  Greetings
                  Last edited by Notoriousdude; 03-22-2018, 10:59 AM.

                  Comment


                    Originally posted by Monokkel View Post
                    vepure : Glad to see it working As for your error, might it be that you are not adding the unit back into the unit array when it respawns? You would again have to use SetArrayElement and input a reference to the actor. If this is not the case, could you paste a screenshot of your respawn function?
                    My respawn function is implemented instead of the original kill function.
                    I do already input a reference to the actor inside the Kill function :
                    Click image for larger version  Name:	2018-03-22_18h11_33.png Views:	1 Size:	95.3 KB ID:	1448429

                    Anyway here's the full function (in 2 screencaps so it fits):
                    Click image for larger version  Name:	2018-03-22_18h14_11.png Views:	1 Size:	197.1 KB ID:	1448430

                    Click image for larger version  Name:	2018-03-22_18h15_54.png Views:	1 Size:	163.6 KB ID:	1448431

                    Last edited by vepure; 03-22-2018, 01:24 PM.

                    Comment


                      Originally posted by Cirkabis View Post
                      I have a problem

                      Sorry,my english is poor

                      I create a new project with 4.18 version

                      and when I use this BP,I don't change anything

                      when I begin that map ,I find I can't move ,and when I move the mouse ,I cant find the white line

                      like this


                      So Could you tell me How I fix it ?
                      think you!!!!!!!!!!!!!
                      Now that is very strange. So basically the toolkit is broken for you. It is hard to know what has happened here as I have not seen this issue before. You used the Create Project button in the vault and chose 4.18? Are you using a Windows machine? If you have added the toolkit the regular way and you do not have some weird software setup I have no idea what has happened here. If you cannot fix it, perhaps you can send me the content and config folders and project file so I can take a look at it? My email is knuteiliv@gmail.com.

                      Originally posted by Notoriousdude View Post
                      Hey,

                      "Glad it worked like you wanted! FYI you do not need to cast to the SciFi grid manager here as the regular grid manager contains the AddGridBothWays function and it is not modified by the SciFi child blueprint."

                      Oh okay I thought I have to because Im using this specific Grid manager in the scene. Thanks for the hint. Im pretty new to your toolkit and you have done so much stuff that its hard to follow sometimes. But it´s great thank you for your service!

                      Sidenote, in your tutorialvideo you use the impact damage within the apex plugin, you should not use this because it means it enables impact damage of the chunks themselves. For example you make a house of the walls then one broken wall can tear done all other walls around like a domino-effect. Without it only the walls within the radial damage will break.

                      Greetings
                      Thanks for letting me know about the apex plugin stuff. I have not looked at that in ages, but if I return to it some time I will heed your advice.

                      Originally posted by vepure View Post

                      My respawn function is implemented instead of the original kill function.
                      I do already input a reference to the actor inside the Kill function :
                      Click image for larger version Name:	2018-03-22_18h11_33.png Views:	1 Size:	95.3 KB ID:	1448429

                      Anyway here's the full function (in 2 screencaps so it fits):
                      Click image for larger version Name:	2018-03-22_18h14_11.png Views:	1 Size:	197.1 KB ID:	1448430

                      Click image for larger version Name:	2018-03-22_18h15_54.png Views:	1 Size:	163.6 KB ID:	1448431
                      I think the issue is at where you add the unit back into the array. You do not need to get the value from the PathIndexArray. The path index array holds the indexes of the last path a unit moved, and since I doubt any paths in your map is longer than 217 tiles that will always return -1. Instead, simply set the array element at the index the unit is now occupying (which due to your nodes is stored in the variable Index)
                      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                      Comment


                        Good news, everyone! Version 1.8 of ATBTT is finally done! It has been almost a year of work and I hope you are all going to like it. It is still being processed by Epic at the moment, but it should be live soon.

                        This has been a complete refactoring of the toolkit, so I'm afraid that converting old ATBTT projects to this new version will be difficult. Also, my tutorial videos are now all somewhat outdated (I'm making new ones, though. See below). For all of you who have put a lot of work into projects using earlier version of the toolkit, do not fear. I will continue to provide support for these versions, and will help if any issues arise when converting to newer versions of Unreal Engine.

                        I have spent the last few weeks extensively bug-testing, but because of the huge change this update represents the toolkit is likely to be less stable for a while, If any of you encounter any issues, please let me know and I will try to fix them promptly.

                        It is worth noting that some features present in earlier versions are not present in the new update. This is mostly because I was not happy with their current implementation, but overhauling them would be very time consuming and thus delay the update release date further. However, I will be adding these features back later. Most notable missing features are the 2D game example, displaying all possible tiles in sight range (accounting for movement) and displaying tiles in range as a frame.

                        As mentioned I've made and am making new tutorial videos. So far I've made three videos describing one of the biggest new features of the toolkit, which is the Action System, a collection of blueprints that handles animating actions in sequence. Here the first of these three videos.



                        The number of changes made in this update are much too many for me to list, but here are the hightlights:

                        v1.8 (being processed by Epic)
                        • Networked multiplayer support.
                        • "Action System" for handling sequences of animated actions.
                        • Transform-independed grid manager (allows for scaling and rotation)
                        • Changes most grid-sized arrays into maps, reducing memory usage.
                        • Multiple performance improvements, including less reliance on ticks and casts.
                        • Initiative bar.
                        • Ability system made default. Replaces much of the functionality in player controller and ai controller.
                        • "Simple" edge array option for tiles with a single cost value.
                        • Join server and host menus.
                        • Renaming of most functions and variables to better comply with Epic's scripting standard (shoutout to Allar for his invaluable style guide.
                        • Updated folder structure.
                        • General reorganization of functionality to better comply with UE4 standards (use of game mode, game state etc.)
                        Last edited by Monokkel; 03-23-2018, 12:53 AM.
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          @ Monokkel, Thanks for the hard work you have done on this.

                          @ Cirkabis, I remember having this problem, go to the player controller BP, at the event tick find "SetMarkerLocation" where it says "UseIndex" make sure it is Unchecked..Hope this helps.

                          Comment


                            Hey,

                            thank you for your work man. Especially the multiplayer support is really great! Cant wait to get my hands on it.

                            Greetings

                            Comment


                              I am guessing marketplace approvals are delayed due to GDC but the new videos are great to watch while we wait. Very impressed so far

                              Comment


                                Originally posted by Skulldug View Post
                                @ Monokkel, Thanks for the hard work you have done on this.
                                Thanks! It has indeed been hard work, but hopefully it will all be worth it.

                                Originally posted by Skulldug View Post
                                @ Cirkabis, I remember having this problem, go to the player controller BP, at the event tick find "SetMarkerLocation" where it says "UseIndex" make sure it is Unchecked..Hope this helps.
                                I thought the same thing at first, but from his description this does not just seem to be an issue with the current unit marker, but with input in general. Hopefully the new update might fix it.

                                Originally posted by Notoriousdude View Post
                                Hey,

                                thank you for your work man. Especially the multiplayer support is really great! Cant wait to get my hands on it.

                                Greetings
                                My pleasure! It is often said that you should never attempt to add multiplayer to something you have already made, and now I know why. I had to upend so many things in the toolkit to get it working, but I think in the end the toolkit is all the better for it, even for single player games.

                                Originally posted by elec2ron View Post
                                I am guessing marketplace approvals are delayed due to GDC but the new videos are great to watch while we wait. Very impressed so far
                                Hope the new tutorials were relatively easy to follow and that they will be sufficient to understand the action system when the update is live. The action system is the new addition that will take the most getting used to, I think, so I felt I had to get a tutorial out quick. You might be right that GDC is slowing down marketplace approvals. Since it was not approved today I doubt it will be until at least Monday, but hopefully that will be enough time for Epic.

                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X