Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Hi Monokkel,

    Checking up on the forum here at Raptagon Studios. We are excited for the next updates with multiplayer and large unit functionality. Will multi-tile units also work with hex grids (our game is completely hex based)?

    I'm sure it's difficult to predict in the early stages, but do you have an estimate as to when you might have the next version finished?

    Mewbits

    Comment


      [MENTION=433175]MatthewDouglas[/MENTION]: Hi Matthew, it seems like the edges at the fringes of the grid are not being removed properly. During setup the toolkit loops through all tile indexes and connects each tile to its surrounding tiles by adding an edge between each index and the index at index+1, index+GridSizex, index +GridSizeX+1 etc. This works well for most tiles, but for the tiles at the fringes this connects them to nonexistent tiles (for the tiles at north and south) and the tiles at the other side of the grid (for the tiles at east and west). I fix this in the Create Walls on Grid Edges function, where I loop through all indexes and delete the inappropriate edges. My guess is that you have coded something wrong there, as this will cause pathfinding to continue searching beyond the grid when it hits the fringes of the grid and place TilesInMoveRange at index 0 for all nonexistent tile indexes. One way to debug this is to use the GetHitTileIndex function, get the value of the EdgeArray at the outputted index and printing it to the console to see if it the underlying tile has the correct number of edges.

      [MENTION=49487]Mewbits[/MENTION]: Hi Mewbits, that's a question I've always been really bad at answering. My estimates are always way off when I do so. I am making great progress and have managed to mostly complete big units (only for square grids at the moment, but I'm working on it) and have networked multiplayer partly working already.

      There is still a lot of work to do, however, and as I'm going through all of my blueprints and rewriting anything I feel can be improved this will still take a long time. Often the best way to make an estimate is to look at previous data. Looking at my changelog, the time between my last two major feature updates was almost 11 months. A lot of stuff happened between then and now, like me getting married and traveling a lot, which delayed me by a couple of months, but life being unpredictable is one of the reasones estimates are difficult to make.

      I feel that this update should be a significantly quicker, but it might just be the planning fallacy doing its thing again. On paper the list of stuff I am adding is bigger rather than smaller than the last update, though my scripting skills have also improved since then. In other words, expect it to take some time. When I'm happy with it I could post my solution for large units if you are interested in implementing this earlier.

      I frequently check in on your game's progress, by the way. It is shaping up really well and I'm greatly looking forward to the day I get to play it
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        [MENTION=4318]Monokkel[/MENTION]

        Hey Monokkel, Think I found the issue, Thanks alot!!

        Comment


          Originally posted by Monokkel View Post
          [MENTION=49487]Mewbits[/MENTION]: Hi Mewbits, that's a question I've always been really bad at answering. My estimates are always way off when I do so. I am making great progress and have managed to mostly complete big units (only for square grids at the moment, but I'm working on it) and have networked multiplayer partly working already.

          There is still a lot of work to do, however, and as I'm going through all of my blueprints and rewriting anything I feel can be improved this will still take a long time. Often the best way to make an estimate is to look at previous data. Looking at my changelog, the time between my last two major feature updates was almost 11 months. A lot of stuff happened between then and now, like me getting married and traveling a lot, which delayed me by a couple of months, but life being unpredictable is one of the reasones estimates are difficult to make.

          I feel that this update should be a significantly quicker, but it might just be the planning fallacy doing its thing again. On paper the list of stuff I am adding is bigger rather than smaller than the last update, though my scripting skills have also improved since then. In other words, expect it to take some time. When I'm happy with it I could post my solution for large units if you are interested in implementing this earlier.

          I frequently check in on your game's progress, by the way. It is shaping up really well and I'm greatly looking forward to the day I get to play it
          It's helpful to know the average time between updates. I was hopeful it might be quicker than before because your first post says that the next planned update just includes Multi-tile units and Networked multiplayer. If your list is longer than last time, what else is on it, if you don't mind my asking?

          Also, thanks Monokkel, we wouldn't be nearly as far along without your awesome toolkit, video explanations, and your direct help. Hopefully soon we will have some more to show.

          Comment


            Originally posted by MatthewDouglas View Post
            [MENTION=4318]Monokkel[/MENTION]

            Hey Monokkel, Think I found the issue, Thanks alot!!
            Glad it worked! Good luck on your further conversion! Might I ask what your motivation is for converting everything? I agree that it makes sense for the heaviest functions, but many things should not see much of a performance boost, especially after blueprint nativization was added. Is it merely preference or for practice?

            Originally posted by Mewbits View Post
            It's helpful to know the average time between updates. I was hopeful it might be quicker than before because your first post says that the next planned update just includes Multi-tile units and Networked multiplayer. If your list is longer than last time, what else is on it, if you don't mind my asking?

            Also, thanks Monokkel, we wouldn't be nearly as far along without your awesome toolkit, video explanations, and your direct help. Hopefully soon we will have some more to show.
            It is mainly just multi-tile units and networked multiplayer and multi-tile units, but the devil is in the details. There is a reason I've waited so long to add these two. Multi-tile units is a lot more complex than one would think; especially when I want it working with all other features of the toolkit and it affects a multitude of different part of the toolkit.

            How do you account for colliding with thin walls or height differences, for instance, or change all code for hovering and selecting tiles to account for the possibility of the center of a unit being between four tiles? How does the unit array update so that the game understands which tiles are occupied and what is the best way of displaying move indexes to the player for larger units? These are just some of the problems I'm facing, and though I've thought up solutions to most of them by now, implementation is tricky and time consuming.

            Networked multiplayer affects all different parts of the toolkit to an even greater degree, and not having worked with this before it was a completely new side of the engine for me to learn. I've got the basics working by now, but it will take a lot of reading and experimentation to make sure it is bug free, cheat proof and complies with Unreal's standards.

            Speaking of which, I'm taking the opportunity to do a major refactoring, to have the names of variables, blueprints, functions etc. be more consistent and to comply with Unreal's coding standards to a greater degree. At the same time I'm going through every blueprint I've made and using the knowledge I've aquired while working with Unreal over the last three years to make improvements and simplify wherever I see the possibility. This will undoubtedly also take time to get done the right way.

            That is the basic rundown of why I expect the update to take some time, though hopefully still substantially less time than what it took to make the last one. Fingers crossed that I'm not tricked by the planning fallacy again.
            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

            Comment


              Originally posted by Monokkel View Post
              When I'm happy with it I could post my solution for large units if you are interested in implementing this earlier.
              I am very interested in seeing this solution when it is completed. I, too, am using your system for my own game and a major part of it is reliant on unit size.

              Great work thus far. Keep it up! Thank you!

              Comment


                Another thought:

                While creating the multi-tile unit system, would it be possible to implement a (toggle) parameter on units that would allow them to shrink down to one space during movement to allow larger units to "squeeze" through gaps in obstacles that are smaller than the unit's initial size?

                Comment


                  Originally posted by pigneedle View Post
                  Another thought:

                  While creating the multi-tile unit system, would it be possible to implement a (toggle) parameter on units that would allow them to shrink down to one space during movement to allow larger units to "squeeze" through gaps in obstacles that are smaller than the unit's initial size?
                  That would be possible to implement, but it would mean altering the pathfinding so that it can identify tiles it can move through, but not end its movement in, and display this in some intuitive manner to the player. I don't think I will implement this in the next update to avoid delaying the update even more. I'll keep it in mind while working though, if I suddenly think of an easy and elegant way to add this feature.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                  Comment


                    Another question:

                    I am trying to generate a blank level, then add pawns to the map via blueprints. However, when I do this, the game mode doesn't seem to operate. Could you point me in the right direction as to how I would add actors to a blank map and still have the game mode initialize?

                    Thank you for your quick response! Excellent support!

                    Comment


                      This question was originally posted on the store page. I have pasted the question below. The forum thread is a better place for providing support since I get notifications, there is not a restrictive character limit and because one can include images.

                      Originally posted by SpineRazor;
                      Hello Knut, thank-you so much for making this toolkit. Can you tell me what would be the best way to have an enemy cause damage during their movement turn with any overlapping actors as opposed to doing an attack at the end of their turn? I have tried attaching a collision volume to an enemy and using an overlap event but nothing happens.
                      Also, how can I make the player orient towards a selected tile at the end of their turn, assuming no enemies are visible and within range to click on.
                      Thanks.
                      There are a few ways to do this, to be sure. Which one is the best depends on the specific needs of your game, but I'll give you something that should be enough to get you started.

                      First, the reason collisions are not working is because units do not have collision enabled by default. You should first do this by going to the units you are using and enabling collision and overlap events for either their skeletal meshes or a new simple collision shape you add. Then, add a collision box or sphere (depending on whether you have a hex or square game) to the Unit blueprint. For a collision sphere a radius of 200 means it covers all immediately surrounding tiles for a hex grid. Enable its collision for queries and overlap events and have it overlap whatever channel you have set your units' collision to. Like so:

                      Click image for larger version

Name:	zo0W5lR.png
Views:	1
Size:	375.7 KB
ID:	1126771

                      Now to add some nodes to the Unit blueprint so that it can detect if it overlaps any units during movement and damage them if they do. But first, set "Update Index During Movement" to true as the default for the unit blueprint. This causes units to automatically fire an event whenever they enter a new tile, which we can use to our advantage.

                      After that, add the nodes shown below after the Entering New Tile event. This will cause overlapped units to be damaged when the unit moves into an adjacent tile. I've also added a couple of branches to make sure only enemy units are damaged and that any one unit is only damaged once per turns. The Aleady Overlapped Units set is used for this. You also need to clear this after unit activation so that it does not carry over from previous turns.

                      Click image for larger version

Name:	uAqCHkX.png
Views:	1
Size:	258.2 KB
ID:	1126772

                      For your other question, having a unit rotate to face a location is pretty straightforward. Simply use the SetActorRotatin node to set the Yaw of the unit to the output of a Find Look at Rotation node, where the input to this node is the location of the unit to be rotated and the location it should be facing. I do exactly this in the Attack Victim custom event in the event graph of Unit:

                      Click image for larger version

Name:	9h00Pnl.png
Views:	1
Size:	176.9 KB
ID:	1126773

                      Hope that helps!
                      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                      Comment


                        Thanks for the help! Much appreciated!

                        Comment


                          Ok, after reading through more of this thread, I was able to discover the Spawn Unit function and was able to dynamically generate a playable pawn. Thank you for including this function. Sorry for not having read it before I asked for help.

                          Comment


                            Originally posted by SpineRazor View Post
                            Thanks for the help! Much appreciated!
                            Happy to help!

                            Originally posted by pigneedle View Post
                            Ok, after reading through more of this thread, I was able to discover the Spawn Unit function and was able to dynamically generate a playable pawn. Thank you for including this function. Sorry for not having read it before I asked for help.
                            No reason to be sorry. There is a lot of stuff to read and I don't blame you for not seeing it. I think I might not have covered it in the tutorials either, since it was added in a recent update where I focused on other stuff in the videos. Sorry for not replying to your last question. You seem to have submitted it while I was writing my last post, so I did not see it. Glad you figured it out anyway, though!
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              Originally posted by Monokkel View Post

                              For your other question, having a unit rotate to face a location is pretty straightforward. Simply use the SetActorRotatin node to set the Yaw of the unit to the output of a Find Look at Rotation node, where the input to this node is the location of the unit to be rotated and the location it should be facing. I do exactly this in the Attack Victim custom event in the event graph of Unit:

                              [ATTACH=CONFIG]138103[/ATTACH]

                              Hope that helps!
                              Monokkel, I got the damage stuff up and running (thanks again for your help on that) however I am struggling with getting the player model to face the direction of the last tile clicked on the end of the units turn. I am really just uncertain which BP to hook it up in and where to integrate it into the respective BP sequence. I've tried hooking up the following into a number of places in the player controller BP but am not getting any kind of results. :Click image for larger version

Name:	OrientPlayer.JPG
Views:	1
Size:	50.5 KB
ID:	1126885

                              Comment


                                Hi Monokkel,

                                I've been having an issue with AI Units and their movement cost sometimes set to 0 despite having moved one or more spaces. I have a skill that causes double damage when the movement cost is 0 (or the unit hasn't moved) and it sometimes works as intended and sometimes does not. Any idea on what could be causing this issue?

                                Comment

                                Working...
                                X