Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Originally posted by leo bar View Post
    hi knut


    I think there is another bug (or maybe I did something wrong):

    1. Warning: Script Msg: Attempted to access index 6 from array 'InitiativeArray' of length 6 in '/Game/AdvancedTurnBasedTileToolkit/Core/BP_TurnManager.BP_TurnManager_C:MoveActorToInititativeIndex' - it happenes when enemy unit awake.

    2. When I mark in the editor in the Multiplayer option - the number of players to 2 (it does not happen in another mode), there are a few log warning saying: that in blueprint - bp_unitstealthcomponent (envent begin play) cant read callfun turnmanager - remove item.

    its not happenes all the time, but a lot of the time. you have a delay node set to 0 (just after the isvalid for the gridmanager) , so when I set it to 0.5 there is no warning.

    I know you don't have much time know so its not that important, just check it when you can.

    cheers
    leo
    Hmm, yeah I'm seeing the same thing. I should have checked the log more thoroughly after making the initiative changes in the last, update, it seems. Again, the warning does not seem to matter for gameplay, but I'll find out what is causing it and fix it.

    Originally posted by drewbiegames View Post

    Thank you. It was a quirk of blueprint scripting that it ran twice when attaching from a "float + float" node. I set a local variable to the result and used that in both cases and it worked.

    In my game, I can also lower the tiles using the abilities. So that the tile can go below 0 in the Z position. I have set the height map to be -500 to 500 on the Z-axis and the tiles are clamped within -150 to 150. Is there any reason would stop pathfinding from working for tiles below 0 in the Z-axis?

    Just in case it is problem with the way I am handling updating edges, here is my UpdateTileEdge function: https://blueprintue.com/blueprint/kurkxopb/

    The second problem, I am doing an AOE raising of a tile. If I do this close to the edge of the gird it raises tiles on the other side of the grid. I am currently using the GetTilesInRange function to find the indices of the tiles that need to be raised. Any tips on how to fix this?

    After these are fixed my next venture is to have a unit which does not count toward the victory condition. This unit will be off the grid, will have a turn, not be attackable by other units and only usable by players. How would you suggest I remove the unit from the victory/lose condition?

    Kind Regards,
    Drewbie
    Good to hear it worked. I don't think there is any reason why having tiles below the height of the grid manager should not work. Just make sure that the minimum height is set to lower than your lowest possible tile in the Procedural settings and ensure that CollisionPlaneWalkable is false; or else the collision plane will block any traces that cross it.

    Odd that you are getting tiles on the other side of the grid... I've designed GetTilesInRange so that this should not happen. I'll look into it.

    For your victory condition, check the function that checks if the game has ended, which is attached to the KillUnit event in BP_Unit, I believe. In the for each loop that checks through all units you can compare the units to a reference to your special unit and skip it if encountered, using a branch.

    Originally posted by Mivke1 View Post

    1. Nevermind, seems my version of Visual Studio lacked some parts needed for compilation. It's sorted out now and has nothing to do with the toolkit.
    2. Thank you!
    1. Ok, good to hear it wasn't something wrong with the toolkit.
    2. You're welcome
    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

    Comment


      Hello!

      I am redoing my project partly due to the recent updates to this toolkit and I'm wonder the following:

      1. Is all of the activation of the ATBTT tied to the Activate ATBTT event in the GameMode? Leads to 2nd question:
      2. My game will have 3 different "stages", one stage where you enter when you start and you can create a party and a session. Next stage is a Lobby-like stage where clients can connect and do certain things like create a character and customize that character. The third stage is how gameplay in your toolkit looks. Previously I've had these stages been quite seperated due to me working on the in parallell but now I'm wondering, all of this should be able to be done without switching GameModes, PCs, Game and PlayerStates etc correct? As long as I don't activate ATBTT until I've traveled seamlessly to the desired level?

      Ok, question two kind of took over, I hope you understand what I mean. If you don't I will gladly try to explain again in more detail

      Cheers!

      Comment


        Hello! I'm trying to make a bar that is displayed above a unit, which shows how much energy they can use on different abilities. I thought the best way to do this would be to create/modify a duplicate of the Health Bar (the component, SetUpAPBar function, and ModifyAPBar function within one of the existing units based on BP_Unit) and set it up to display the Action Points. Then I would modify (or for practice purposes, create a duplicate and modify) BP_Ability_Move to queue an action (perhaps in the "click" section) that calls the ModifyAPBar function with the APCost as input. Is this the best way to do this? Is there a built-in AP display I'm missing? Any tips/advice?

        Comment


          Originally posted by Mivke1 View Post
          Hello!

          I am redoing my project partly due to the recent updates to this toolkit and I'm wonder the following:

          1. Is all of the activation of the ATBTT tied to the Activate ATBTT event in the GameMode? Leads to 2nd question:
          2. My game will have 3 different "stages", one stage where you enter when you start and you can create a party and a session. Next stage is a Lobby-like stage where clients can connect and do certain things like create a character and customize that character. The third stage is how gameplay in your toolkit looks. Previously I've had these stages been quite seperated due to me working on the in parallell but now I'm wondering, all of this should be able to be done without switching GameModes, PCs, Game and PlayerStates etc correct? As long as I don't activate ATBTT until I've traveled seamlessly to the desired level?

          Ok, question two kind of took over, I hope you understand what I mean. If you don't I will gladly try to explain again in more detail

          Cheers!
          1. Basically everyhting, yes. There are some blueprints that have independent startup stuff happening on BeginPlay, but the chain of events that sets up important blueprints, sorts units in initiative and starts the game is all tied to the ActivateATBTT event.

          2. I believe yes. As long as you don't activate ATBTT it should all wait for you while you do all the UI stuff.

          Originally posted by possibleworlds View Post
          Hello! I'm trying to make a bar that is displayed above a unit, which shows how much energy they can use on different abilities. I thought the best way to do this would be to create/modify a duplicate of the Health Bar (the component, SetUpAPBar function, and ModifyAPBar function within one of the existing units based on BP_Unit) and set it up to display the Action Points. Then I would modify (or for practice purposes, create a duplicate and modify) BP_Ability_Move to queue an action (perhaps in the "click" section) that calls the ModifyAPBar function with the APCost as input. Is this the best way to do this? Is there a built-in AP display I'm missing? Any tips/advice?
          Sounds like a reasonable approach. There is no built-in AP display, no, but you should quite easily be able to make your own by following the example of the health bar, as you suggest. Just be absolutely sure that any time you modify AP the queue to modify the bar is called (and the other way around), so there is never a discrepancy.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Originally posted by Monokkel View Post
            1. Basically everyhting, yes. There are some blueprints that have independent startup stuff happening on BeginPlay, but the chain of events that sets up important blueprints, sorts units in initiative and starts the game is all tied to the ActivateATBTT event.

            2. I believe yes. As long as you don't activate ATBTT it should all wait for you while you do all the UI stuff.
            Ok, good to know! Now I just need to think on if this is the optimal way to do it, but then at least I know it should be doable should I decide it. Thanks!

            Comment


              I'd like to let everyone know about a Kickstarter that was just set up for a game that used ATBTT in its creation. It is called Grand Guilds and is a game that combines turn based combat on a grid with card-based combat abilities. It looks and sounds amazing and already have a great demo you can download from their Kickstarter page. I've already backed it, so let it be known that if any of you guys make a great kickstarter for a game that uses ATBTT you'll instantly recuperate the cost of the toolkit

              Here is a link to the Kickstarter for anyone interested


              Originally posted by Mivke1 View Post
              Ok, good to know! Now I just need to think on if this is the optimal way to do it, but then at least I know it should be doable should I decide it. Thanks!
              No worries
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                Hello Monokkel,

                I wanted to ask if you had any advice on the best way to create a function that takes in an array of tile indexes and spawns edge tiles for them? I want to use this to achieve the same edge grid style but without the use of path finding but only a set of index tiles. An example would be displaying the impact of a grenade where I have the impact Index, I get the diamond range indexes with the range functions and then pass the indexes into a function that would create edge meshes around the perimeter (index array).

                Great plugin mate, keep up the great work! And Grand Guilds looks great wish them the best.

                Comment


                  Have had some fun experimenting today. I've tried changing up some of the functions to be more agnostic when it comes to grid size and it has opened up some possibilities. One of them is sub-grids! These look similar to the grid manager, but are mostly empty save for some variables defining their size and relative position to the grid manager. On setup the grid manager gets all sub-grids and includes them in generating the GridLocations and GridEdges maps, resulting in the sub-grid being treated as an extention of the main grid. Very handy for stuff like long and winding dungeons, where the grid is covering a large area but there is a lot of empty space. Take a look:



                  Originally posted by LatFoued View Post
                  Hello Monokkel,

                  I wanted to ask if you had any advice on the best way to create a function that takes in an array of tile indexes and spawns edge tiles for them? I want to use this to achieve the same edge grid style but without the use of path finding but only a set of index tiles. An example would be displaying the impact of a grenade where I have the impact Index, I get the diamond range indexes with the range functions and then pass the indexes into a function that would create edge meshes around the perimeter (index array).

                  Great plugin mate, keep up the great work! And Grand Guilds looks great wish them the best.
                  There are a few different ways to do this, though I'm not perfectly happy with any of them. Outlines is one of the things on my todo list to improve. But if you're happy with the way edges are spawned in the 2D example that is fairly easy to extend. Take a look at BP_Ability_2D and the MakeEdgeMeshTransforms function. This function takes as input an array of tile indexes, like what you are asking and sets up an array of transforms for spawning edge meshes (which happens as an action). For your function you can basically do the same thing, only instead of checking whether a tile surrounding one of the indexes is in the PathsMap or RevealedGridIndexes set you would instead check whether it is in your own custom array of tile indexes using Find.
                  The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                  Comment


                    [QUOTE="Monokkel;n1533045"]Have had some fun experimenting today. I've tried changing up some of the functions to be more agnostic when it comes to grid size and it has opened up some possibilities. One of them is sub-grids! These look similar to the grid manager, but are mostly empty save for some variables defining their size and relative position to the grid manager. On setup the grid manager gets all sub-grids and includes them in generating the GridLocations and GridEdges maps, resulting in the sub-grid being treated as an extention of the main grid. Very handy for stuff like long and winding dungeons, where the grid is covering a large area but there is a lot of empty space. Take a look:

                    very nice add on knut!
                    cheers



                    Comment


                      I am looking forward to the Sub Grid feature

                      Comment


                        hi knut

                        i want that my unit will be of class -character or pawn (like it was in the older build). i need it for my game (there are parts i am using third person view with free movement). i am a little bit lost with the change to actor class.
                        if i want to implement character class as my units, i made a unit class, bp_unit(pawn) do i need to do something else ? do i need to change something in one of the blueprints? if i change the unit class from actor to pawn do i loss some other possibility?

                        thanks in advance
                        leo
                        Last edited by leo bar; 10-02-2018, 05:02 AM.

                        Comment


                          Originally posted by leo bar View Post
                          hi knut

                          i want that my unit will be of class -character or pawn (like it was in the older build). i need it for my game (there are parts i am using third person view with free movement). i am a little bit lost with the change to actor class.
                          if i want to implement character class as my units, i made a unit class, bp_unit(pawn) do i need to do something else ? do i need to change something in one of the blueprints? if i change the unit class from actor to pawn do i loss some other possibility?

                          thanks in advance
                          leo
                          Hey leo. With the new version, both tiles and units share a common blueprint parent called BP_GridActor, which is used for calculating the actor's GridIndex, snapping to the grid etc. If you simply reparent BP_Unit to Pawn instead of BP_GridActor, BP_Unit will no longer have access to the GridIndex variable, which is used in several blueprints. You can add the functionality from BP_GridActor manually back into BP_Unit, of course, but then you need to go through all blueprints and change the old GridIndex reference with the new one. The compiler will thankfully help you with this by marking all such occurences with an error.

                          Another possibility is to reparent BP_GridActor to pawn. I have tried this and it seems to work fine. This will add a lot of unneeded functionality to things like BP_GA_Tile, but I don't think it should have any real impact on performance.

                          This is if you just need the pawn functionality, though. In the earliest versions of the toolkit, BP_Unit was based on pawn. In later updates, up until a couple of updates ago (when I changed the parent to Actor), it was rather a child of Character. If this is what you want then it becomes a bit more complicated. Character comes with a capsule collision component that cannot be removed and a skeletal mesh component that cannot be unattached from this capsule component. If you want to use the skeletal mesh included in Character you cannot use my setup in BP_GridActor where I use a custom scene component as an "anchor" for the grid snapping functionality. Instead you have to use the capsule component, which annoyingly has its origin in the center of the capsule and not the ground. Because of this you will need to add offsets to account for this in any blueprint that changes the unit's position on the grid.

                          It was because of all of these extra annoyances and clunky workarounds that had to be coded in to more easily allow for using UE4's character movement component, which I consider to be a bit of a corner case, that I decided to use Actor as a base instead. If this is what you want to do you have two options: Either code it in like it was done in earlier versions (you can download an earlier version and search the blueprints for CapsuleComponent to find all such places) or you can cheat. By cheating here I mean using one character for all your Character movement component stuff and when you want to change to ATBTT-style turn based combat, hide the characters and replace them with BP_Units using identical skeletal meshes.

                          Without knowing more about exactly what you want to achieve, these are my best suggestions.
                          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                          Comment


                            hi knut

                            Well it will be a little bit long and so I apologize in advance
                            ok now thanks for your answer i understand more about my problem.

                            what i need is character class - as you wrote i need the skeletal mesh component, movement component and the option to be posses by the controller (although this one is not that important to me).
                            I would be very happy to know what you think will be the best solution and I understand that in order to do this you need to understand a little better what I want to achieve, so it goes like this:

                            After long trials I came to the conclusion that the best way for my game mechanics is to combine two worlds: one is like in your project a turn based game based on a Grid. Only when the turn of a player's begin(not an ai) and the first action is movement its done in real time by movement in a third-person view with full control over the player to the moment phase and not by path finding . Then the shooting or other abilities are back more or less same as done by the toolkit. this feature of real time full control by the player for movement phase is very critical in my game which in turn have a lot of affects on other things.
                            At a certain point I thought that it would be better not to use the toolkit at all because I do not have much need for it if I base it on the engine's navigation system. But after many trials I came to the conclusion that the best way is to use both worlds because the toolkit gave me much more control on every aspects of the game and the combination of the two gives more accuracy and solve a lot of problems the engine navigation have.

                            After really many trials and long stretches I have finally reached the conclusion that i will diffidently have to use the toolkit and most of the feature in it.
                            In order to implement this (the movement stage of the player), the best way I thought was by using character Class, since the flow of elements already built up in (components) in this class. I've already built a unit with all the feature using a character Class that gives me a good answer to all the scenarios I need. but i am open to change it if i need to.
                            I hope I have given more light on my project and what I need and I will be happy to hear from you how to implement all of the above.

                            another question i have is with the Implementation of the move by third person view in real time control by the player, is with the action manger which a little bit confusing.

                            cheers
                            leo

                            Comment


                              Originally posted by leo bar View Post
                              hi knut

                              Well it will be a little bit long and so I apologize in advance
                              ok now thanks for your answer i understand more about my problem.

                              what i need is character class - as you wrote i need the skeletal mesh component, movement component and the option to be posses by the controller (although this one is not that important to me).
                              I would be very happy to know what you think will be the best solution and I understand that in order to do this you need to understand a little better what I want to achieve, so it goes like this:

                              After long trials I came to the conclusion that the best way for my game mechanics is to combine two worlds: one is like in your project a turn based game based on a Grid. Only when the turn of a player's begin(not an ai) and the first action is movement its done in real time by movement in a third-person view with full control over the player to the moment phase and not by path finding . Then the shooting or other abilities are back more or less same as done by the toolkit. this feature of real time full control by the player for movement phase is very critical in my game which in turn have a lot of affects on other things.
                              At a certain point I thought that it would be better not to use the toolkit at all because I do not have much need for it if I base it on the engine's navigation system. But after many trials I came to the conclusion that the best way is to use both worlds because the toolkit gave me much more control on every aspects of the game and the combination of the two gives more accuracy and solve a lot of problems the engine navigation have.

                              After really many trials and long stretches I have finally reached the conclusion that i will diffidently have to use the toolkit and most of the feature in it.
                              In order to implement this (the movement stage of the player), the best way I thought was by using character Class, since the flow of elements already built up in (components) in this class. I've already built a unit with all the feature using a character Class that gives me a good answer to all the scenarios I need. but i am open to change it if i need to.
                              I hope I have given more light on my project and what I need and I will be happy to hear from you how to implement all of the above.

                              another question i have is with the Implementation of the move by third person view in real time control by the player, is with the action manger which a little bit confusing.

                              cheers
                              leo
                              Ok, thanks for the explanation. In that case, here is my suggestion: Keep BP_Unit as is and have a separate character blueprint for the player movement. Have a reference variable to the BP_Unit in your character and to your character in BP_Unit. BP_Unit should here have no mesh and so be invisible. You could attach it to the character blueprint, move it manually once the character movement is done or even move it per tick. For animating attacks, since you want to do this ATBTT-style you would do something similar to what I'm doing in BP_Unit_Anim, only that you hold a reference to the anim BP of your character blueprint instead of one contained in the unit itself.

                              Maybe a bit hacky, but I think this is a way to achieve the result you want with the least amount of headache.
                              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                              Comment


                                ok after a lot of work manage to get it going. hope i wont have to go through all of that on every update

                                cheers
                                leo
                                Last edited by leo bar; 10-03-2018, 03:41 PM.

                                Comment

                                Working...
                                X