Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Originally posted by KitatusStudios View Post
    Is there a super-simple way to just turn off input? I tried setting DisableInput to true but it broke a lot of things, haha. Is there anywhere in the code, I can just add a little bit to basically turn off the tile toolkit (For example, for when the level is complete .etc)?
    I have not thought about that, but it would make sense to have such a switch. There are a few ways to do this, depending on what you're after. One way would be to have a gate right at the beggining of the ChooseNextPawn custom event in ATBTT_GameMode. If you want to disable the toolkit you would close that gate and call the End Turn custom event on the current pawn. When you are ready to start the toolkit again you would open the gate and run ChooseNextPawn. You would also have to add a similar gate after the event tick in ATBTT_PlayerController.

    Originally posted by KitatusStudios View Post
    Also, I'm having trouble finding the code for the red "Attack" squares; You know - When after the player has moved, It shows the red attack tiles? I'm having trouble finding where the red tiles come into play (Basically, I want to be able to disable that if player is not in range or if enemy is dead .etc) - ALSO ALSO, I'm having trouble finding where to put an event before the player is allowed to move.

    Basically, I wanted to add code so a player can select a buff before moving; But I've scowered the code and watched your videos and have no idea where this change is.

    Man, it's so much easier to understand when it's your own code :P When it's someone elses, It's so hard to find a specific thing then you'd do it a specific way :P

    But yeah, Help on that would be super-awesome; I've spent a good few hours trying to find a solution to these three quabbles (Including the post above), Would you be able to lend a hand? In return, As promised, I'll get it working via Multiplayer for you 8]
    Hey, you don't owe me anything, but thanks anyway At the start of each unit's turn both Pathfinding and Find Tiles in Range are called (as you can see in the Begin Unit Turn part of ATBTT_PlayerController). Both are called at once, but if current move is higher than 0, then Find Tiles in Range is set to only detect enemy pawns. That means that with the current setup all tiles in range are displayed in red only if current move is 0. The code for displaying the red "Attack" squares are all in the Find Tiles in Range function in BP_GridManager. Call it from anywhere with index set to the center and range set to the radius, and select "display tiles" if that's what you're after.

    I hope the toolkit will make more and more sense as you work with it, but hell is other people's code, as they say :P I've tried to make it as intuitive as I can, but it's sometimes hard to see what is less obvious in something you have expert knowledge of something. With your background in writing blueprint tutorials I'd be interested to know of what parts of the toolkit you find particularly confusing or poorly commented, and I'll try to remedy that.

    Originally posted by Maeglin17 View Post
    Oh my god, thank you! It worked.
    Glad the solution was simple, and I can see why it's an easy mistake to make. I'll try to improve the commenting on variables in the future, to make this clearer.
    Advanced Turn Based Tile Toolkit (Marketplace - Support)

    Dungeon Crawler Toolkit (Marketplace - Support)

    Discord

    Comment


      That's awesome; Thank-you. I understood all of it apart from the Attack stuff. Would there be a simple bool I can put in somewhere in the Find Tiles in Range or whatever that would just skip the attack "Phase"? For example: If an enemy is not in range; Do not show red tiles and end turn. .etc
      KITATUS
      "Information shouldn't be behind a paywall, It should be free for all!"

      Comment


        Also, I'm not sure if it's just me but I keep getting random bugs when I restart my editor. Sometimes I get all the values reset to defaults and others the controls switch (Where I'm controlling the AI instead of the player .etc) - It's super-weird.
        KITATUS
        "Information shouldn't be behind a paywall, It should be free for all!"

        Comment


          Originally posted by KitatusStudios View Post
          That's awesome; Thank-you. I understood all of it apart from the Attack stuff. Would there be a simple bool I can put in somewhere in the Find Tiles in Range or whatever that would just skip the attack "Phase"? For example: If an enemy is not in range; Do not show red tiles and end turn. .etc
          Yeah, I think I misunderstood your question the first time, so I gave the answer to something else. So all you want to achieve is not to show the red squares if there are no enemies in range? One way to do this would be to do a find tiles in range function with "find only pawns" set to true. Then if the length of the pawns in sight array is 0, just clear all Tiles In Sight Range MC instances. If the length is 1 or more, run Find Visible Pawns Step 2 with Find Only Pawns set to false. That should do the trick. By the way, you'd want to do this in the Begin Turn part of ATBTT_PlayerController instead of the regular Find Tiles In Range.

          Originally posted by KitatusStudios View Post
          Also, I'm not sure if it's just me but I keep getting random bugs when I restart my editor. Sometimes I get all the values reset to defaults and others the controls switch (Where I'm controlling the AI instead of the player .etc) - It's super-weird.
          That sucks... Again, I haven't experienced anything like that myself yet. If anyone else reading this thread are having similar bugs, please let me know. This happens with the vanilla 4.8 converted toolkit?
          Advanced Turn Based Tile Toolkit (Marketplace - Support)

          Dungeon Crawler Toolkit (Marketplace - Support)

          Discord

          Comment


            Originally posted by Monokkel View Post
            Yeah, I think I misunderstood your question the first time, so I gave the answer to something else. So all you want to achieve is not to show the red squares if there are no enemies in range? One way to do this would be to do a find tiles in range function with "find only pawns" set to true. Then if the length of the pawns in sight array is 0, just clear all Tiles In Sight Range MC instances. If the length is 1 or more, run Find Visible Pawns Step 2 with Find Only Pawns set to false. That should do the trick. By the way, you'd want to do this in the Begin Turn part of ATBTT_PlayerController instead of the regular Find Tiles In Range.



            That sucks... Again, I haven't experienced anything like that myself yet. If anyone else reading this thread are having similar bugs, please let me know. This happens with the vanilla 4.8 converted toolkit?
            Thanks; Will give that a shot!

            And yeah, Jus using the vanilla converted 4.8 randomly does it; Seems to be 4.8 randomly changing things again so I assume it's Epic's side and will be fixed when the other thing is fixed hopefully. When I get a chance I'll try to reproduce and send the report to epic (But I'm unsure when I'll get the time to do that!)
            KITATUS
            "Information shouldn't be behind a paywall, It should be free for all!"

            Comment


              Originally posted by KitatusStudios View Post
              Thanks; Will give that a shot!

              And yeah, Jus using the vanilla converted 4.8 randomly does it; Seems to be 4.8 randomly changing things again so I assume it's Epic's side and will be fixed when the other thing is fixed hopefully. When I get a chance I'll try to reproduce and send the report to epic (But I'm unsure when I'll get the time to do that!)
              If it occurs again, maybe you could quickly check all the parts you've edited when you converted it to 4.8? Maybe I described something poorly and you haven't set it up exactly right? In that case it will be resolved when they upload the newest version. It's pretty weird that you can control the enemy pawns. Something must be wrong in ATBTT_GameMode in that case, which should activate either the player or AI controller depending on the faction variable of the current pawn. What do you exactly mean when you say that all values reset to defaults, by the way?
              Advanced Turn Based Tile Toolkit (Marketplace - Support)

              Dungeon Crawler Toolkit (Marketplace - Support)

              Discord

              Comment


                Originally posted by Monokkel View Post
                If it occurs again, maybe you could quickly check all the parts you've edited when you converted it to 4.8? Maybe I described something poorly and you haven't set it up exactly right? In that case it will be resolved when they upload the newest version. It's pretty weird that you can control the enemy pawns. Something must be wrong in ATBTT_GameMode in that case, which should activate either the player or AI controller depending on the faction variable of the current pawn. What do you exactly mean when you say that all values reset to defaults, by the way?
                Possibly; I'll keep my eye open.

                In regards to defaults being reset; I mean the "Max move / movement / range" .etc - No matter what I changed them to; They were resetting to the default number; Even after editing the supposed "Default" - Even after changing them via Blueprint code; It was still happening; Hence why I think it's a problem in-engine as opposed to the plugin.
                KITATUS
                "Information shouldn't be behind a paywall, It should be free for all!"

                Comment


                  Originally posted by Monokkel View Post
                  Yeah, I think I misunderstood your question the first time, so I gave the answer to something else. So all you want to achieve is not to show the red squares if there are no enemies in range? One way to do this would be to do a find tiles in range function with "find only pawns" set to true. Then if the length of the pawns in sight array is 0, just clear all Tiles In Sight Range MC instances. If the length is 1 or more, run Find Visible Pawns Step 2 with Find Only Pawns set to false. That should do the trick. By the way, you'd want to do this in the Begin Turn part of ATBTT_PlayerController instead of the regular Find Tiles In Range.
                  I tried doing this but it straight up just didn't work - In fact, I think I broke something (Again, haha). Can you do a quick screenshot of how you'd do this? I know it's a pain but I just want to make sure I'm doing it right :/ I tried attaching to the end of the Activate Unit in the PlayerController but it didn't like it at all.
                  KITATUS
                  "Information shouldn't be behind a paywall, It should be free for all!"

                  Comment


                    Originally posted by KitatusStudios View Post
                    Possibly; I'll keep my eye open.

                    In regards to defaults being reset; I mean the "Max move / movement / range" .etc - No matter what I changed them to; They were resetting to the default number; Even after editing the supposed "Default" - Even after changing them via Blueprint code; It was still happening; Hence why I think it's a problem in-engine as opposed to the plugin.
                    Are you changing the values in Unit_Parent, the different unit blueprints (Unit_Player_Melee etc.) or in the individual units? Either way I'm not able to replicate this bug. Does it happen at once or when you close/re-open the editor?

                    Originally posted by KitatusStudios View Post
                    I tried doing this but it straight up just didn't work - In fact, I think I broke something (Again, haha). Can you do a quick screenshot of how you'd do this? I know it's a pain but I just want to make sure I'm doing it right :/ I tried attaching to the end of the Activate Unit in the PlayerController but it didn't like it at all.
                    Here is a pastebin of my solution: http://blueprintue.com/view/tfYSQvQa/. I modified it a bit more so that the current units turn will end automatically if there are no enemies in range after it has moved. Just replace the "Begin Unit Turn" stuff in ATBTT_PlayerController with the stuff in the pastebin.
                    Advanced Turn Based Tile Toolkit (Marketplace - Support)

                    Dungeon Crawler Toolkit (Marketplace - Support)

                    Discord

                    Comment


                      Originally posted by Monokkel View Post
                      Are you changing the values in Unit_Parent, the different unit blueprints (Unit_Player_Melee etc.) or in the individual units? Either way I'm not able to replicate this bug. Does it happen at once or when you close/re-open the editor?



                      Here is a pastebin of my solution: http://blueprintue.com/view/tfYSQvQa/. I modified it a bit more so that the current units turn will end automatically if there are no enemies in range after it has moved. Just replace the "Begin Unit Turn" stuff in ATBTT_PlayerController with the stuff in the pastebin.
                      That works flawlessly thanks! Perhaps you could integrate it into the next version as a bool switch for some people as it's a really nice little feature

                      The last thing (Haha) I need help with is trying to fire some code BEFORE the player is allowed to move at the start of a turn. I've tried using timers, bools and whatnot but as it is expecting the player to move. - I wanted to give the player a section where they can plan their buffs / weapons BEFORE moving - Is this possible? Everything I've tried has actually broken the turn structure for some reason.

                      Are you changing the values in Unit_Parent, the different unit blueprints (Unit_Player_Melee etc.) or in the individual units? Either way I'm not able to replicate this bug. Does it happen at once or when you close/re-open the editor?
                      - Tried all of them, It just randomly happens sometimes; I mean seriously random. All of a sudden, I'll just load up my map and everything has reset to 0; Even the enemy / player indexes (Even on newly created units), so they don't stick to the map and nothing works. I've then been forced to load an auto-save and lose work.

                      But as I said, I'm pretty sure it's Epic's fault as it's happening to more than the kit.
                      KITATUS
                      "Information shouldn't be behind a paywall, It should be free for all!"

                      Comment


                        Originally posted by KitatusStudios View Post
                        That works flawlessly thanks! Perhaps you could integrate it into the next version as a bool switch for some people as it's a really nice little feature

                        The last thing (Haha) I need help with is trying to fire some code BEFORE the player is allowed to move at the start of a turn. I've tried using timers, bools and whatnot but as it is expecting the player to move. - I wanted to give the player a section where they can plan their buffs / weapons BEFORE moving - Is this possible? Everything I've tried has actually broken the turn structure for some reason.
                        Hmm, there are certainly a few ways to do this. You would have to prevent pathfinding etc. from firing immediately when a unit is activated. Have a closed gate right after the activate unit custom event in ATBTT_PlayerController for instance. Then flip some other bool which opens a gate that opens input to your buffing code. When your buffing code is done, open the gate at activate unit again and run the pathfinding/find tiles code as normal. Is anything preventing you from doing it like this?

                        Originally posted by KitatusStudios View Post
                        - Tried all of them, It just randomly happens sometimes; I mean seriously random. All of a sudden, I'll just load up my map and everything has reset to 0; Even the enemy / player indexes (Even on newly created units), so they don't stick to the map and nothing works. I've then been forced to load an auto-save and lose work.

                        But as I said, I'm pretty sure it's Epic's fault as it's happening to more than the kit.
                        Ok, then there is probably not much I can do. No other users have reported anything like that, as I've mentioned, but it does seem like a strage bug to only affect one user. Again if anyone is reading this and is experiencing similar bugs (or any bugs really), please let me know.
                        Advanced Turn Based Tile Toolkit (Marketplace - Support)

                        Dungeon Crawler Toolkit (Marketplace - Support)

                        Discord

                        Comment


                          Error after playing in editor

                          Whenever I close PIE, it get this error message (attachment). The floor is a BSP. Any idea what this means/how to fix it? Thanks all.
                          Attached Files

                          Comment


                            Hi guys,

                            Is somebody trying to implement a cloud networking/game management system like GameSparks into Monokkel's toolkit?
                            Fantasy Turn-Based Tactical Game
                            STEAM: https://store.steampowered.com/app/9...Arcane_Legacy/
                            IG: https://www.instagram.com/arcanelegacyofficial/
                            FB: https://www.facebook.com/ArcaneLegacy/
                            WEB: http://www.arcanelegacy.com

                            Comment


                              Originally posted by Maeglin17 View Post
                              Whenever I close PIE, it get this error message (attachment). The floor is a BSP. Any idea what this means/how to fix it? Thanks all.
                              Ah, I had forgot about that error message. That's something that happens if you use automatic heightmap generation from tracing. Traces hit the center of all tile locations across the entire grid and add their heights to the Vector Field Array. At the same time, rotations of any actors that are hit are added to the Rotation Array. If the traces hit something other than an actor (such as terrain), Hit Actor will return false and this error message will appear. You can safely ignore the error as it does not affect the game, but I will change the toolkit so that the error no longer appears in the future. If you want to remove the error yourself, here is what to add to the Add Viewport Terrain to Arrays function in BP_GridManager (it's in the top left part of the function's event graph):

                              Click image for larger version

Name:	JnZKXVf.png
Views:	1
Size:	253.1 KB
ID:	1079927

                              Originally posted by Wisdom-HELLy View Post
                              Hi guys,

                              Is somebody trying to implement a cloud networking/game management system like GameSparks into Monokkel's toolkit?
                              Well I certainly haven't tried to yet, but I'd also be interested in hearing the results of any such attempt. Are you going to try it out, Wisdom?
                              Advanced Turn Based Tile Toolkit (Marketplace - Support)

                              Dungeon Crawler Toolkit (Marketplace - Support)

                              Discord

                              Comment


                                Yes, I'm actually trying to integrate GameSparks into Unreal Engine 4 and, less generally, on your toolkit.
                                Basically I'm working on GameMode and PlayerController, I've added a new Actor naming it Faction_Parent and I've also added 3 children of this actor: LocalPlayer,CPU,NetworkPlayer (actually the game implement only 1vs1 battles).

                                By adding also a new value (Network) in the faction enum, I'm starting to make the PUSH/PULL messages events for propagate every toolkit action on all network clients.
                                Pull event will be a new "Activate Network Unit", where grid manager just listen from network until they push "End Turn", finish their troops movement or their turn countdown time expire.
                                Push is more difficult, because I have to push through network every action of the flow, from showing highlited Tiles to movement, from attack to use skills.

                                I will keep you in touch.
                                Fantasy Turn-Based Tactical Game
                                STEAM: https://store.steampowered.com/app/9...Arcane_Legacy/
                                IG: https://www.instagram.com/arcanelegacyofficial/
                                FB: https://www.facebook.com/ArcaneLegacy/
                                WEB: http://www.arcanelegacy.com

                                Comment

                                Working...
                                X