Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Originally posted by Seruvv View Post
    Hi! Where is, blueprint with an attack, didn't find it in BP_Unit_Anim. In tutorial 6 on mint 5.39 I didn't find parent: attack victim, and on a tutorial 7 (7.03) didn't found attack victim blueprint.
    Hi Sruvv, I made a lot of changes to the toolkit in my last update. Because of this the tutorials are somewhat outdated. I am planning to make several new tutorials, but it is taking some time because of other work obligations. If you want to work with a toolkit that is close to what is used for the tutorials, choose version 4.18 in the dropdown when creating a new project with ATBTT in the launcher. Then convert this project to the newer version of UE4 you are using.

    If you want to use the new version, be prepared that quite a few things have changed. Feel free to ask in this thread or on YouTube when you run into such problems, though, and I'll explain how it works in the current version.

    Attacking is now handled through the specific ability that is used for executing the attack. The default ability used is BP_Ability_MoveAttack. Check out the ExecuteAbility event in this blueprint, which is equivalend to AttackVictim in earlier versions.
    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

    Comment


      Hey Monokkel!

      I've set up my project with monsters being spawned depending on number of players and the deployment phase that you helped me set up some time ago. However, this leads to there being no unit placed in the map at initialization. This is how I want it to be, but it seems the Grid Manager does not activate correctly due to this. I'm getting some errors saying GridManagerRef returned null unless I place a unit in the map from the editor.
      I just now found your note on ActivateGridManager in BP_ATBTT_State saying "Activate the grid manager after making the initiative order array, as this is used in the setup of BP_GridManager". My question is, how and where is this used? I could of course make a work around by placing a non-activated invisible unit somewhere but I'd rather not since it feels hacky and could mess with win conditions of the map, initiative order arrays and tons of other stuff I don't know about yet
      I will start looking for it on my own but it's always so helpful when you get the thought behind why it's being used there aswell so you know how it should/could be used in the future.

      Thanks again man, loving the toolkit more and more the more I use it

      Comment


        Hi Monokkel!

        Can you explain me the functionality of the macro Owns Unit?
        If I understood well, this macro will work ONLY if the battle is 1vs1, with the listen server against another client.

        If I have two, three, four clients, or teams like 2vs2 match, can you confirm that this macro will not work? Actually I think that to achieve this I have to populate a custom integer in the player controller that reveals to himself who is him relative to the server (ex. the server in the Assign Units will also assign 1 or 2 or 3 etc. to the Owning PC so that in the future he can recognize correctly what are his units).

        Is this the correct way to do it in your opinion?

        Thanks in advance!

        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 Mivke1 View Post
          Hey Monokkel!

          I've set up my project with monsters being spawned depending on number of players and the deployment phase that you helped me set up some time ago. However, this leads to there being no unit placed in the map at initialization. This is how I want it to be, but it seems the Grid Manager does not activate correctly due to this. I'm getting some errors saying GridManagerRef returned null unless I place a unit in the map from the editor.
          I just now found your note on ActivateGridManager in BP_ATBTT_State saying "Activate the grid manager after making the initiative order array, as this is used in the setup of BP_GridManager". My question is, how and where is this used? I could of course make a work around by placing a non-activated invisible unit somewhere but I'd rather not since it feels hacky and could mess with win conditions of the map, initiative order arrays and tons of other stuff I don't know about yet
          I will start looking for it on my own but it's always so helpful when you get the thought behind why it's being used there aswell so you know how it should/could be used in the future.

          Thanks again man, loving the toolkit more and more the more I use it
          Can you remind me of the changes to the toolkit I helped you set up? It is hard to know what might be going wrong without being able to replicate it. As far as I recall I had set it up so that having units placed beforehand was no longer necessary, but I might not have tested it thoroughly enough. When you click the errors that appear, to what functions are you directed? By the way, if you want to set it up in a hacky way you can just remove the inivisible unit from the initiative array and grid units map after startup and you should be good. It should be possible to get this working without such a hack, though.

          Originally posted by Wisdom-HELLy View Post
          Hi Monokkel!

          Can you explain me the functionality of the macro Owns Unit?
          If I understood well, this macro will work ONLY if the battle is 1vs1, with the listen server against another client.

          If I have two, three, four clients, or teams like 2vs2 match, can you confirm that this macro will not work? Actually I think that to achieve this I have to populate a custom integer in the player controller that reveals to himself who is him relative to the server (ex. the server in the Assign Units will also assign 1 or 2 or 3 etc. to the Owning PC so that in the future he can recognize correctly what are his units).

          Is this the correct way to do it in your opinion?

          Thanks in advance!
          That macro should actually work with any number of players in an online game. The macro is a bit hacky and conterintuitive, so I understand that it seems do do something very differently when taken at face value. This is a way to get around the way player controllers are stored differently in clients and servers. The server has access to all player controllers, so server side it is unproblematic to get references to player controllers and compare them to the PCs that own units. However, clients only have access to their own player controller, so trying to get access to a different client's player controller retuns nothing, while trying to get the server's player controller returns a signature that is identical to the client's player controller. To prevent clients from thinking the owned unit is owned by them, when it is in fact owned by the server I implemented a bOwnedByServer boolean which takes care of this if the OwnsUnit macro is activated outside the server. It is not the most elegant solution, but it does the job. I hope to think of a good way to solve this without the boolean in the future.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Hello again, I managed to get myself stuck while setting up a new animation blueprint for a character with a non-UE4 standard skeleton. I got most of the animations to work with me, and the blendspace seems to be working fine, but when I play and move a character it animatea for idling, but not for moving, and triggers this error about "abpref". I've chased down the error and can't figure out what is causing the problem. It's properly set as a variable as far as I can tell, and everything else is working fine. I copy pasted the event graph from the original unit that you have it the main folder. How would i go about fixing this?
            Last edited by OperatorCrux; 06-16-2018, 01:14 AM.

            Comment


              Originally posted by OperatorCrux View Post
              Hello again, I managed to get myself stuck while setting up a new animation blueprint for a character with a non-UE4 standard skeleton. I got most of the animations to work with me, and the blendspace seems to be working fine, but when I play and move a character it animatea for idling, but not for moving, and triggers this error about "abpref". I've chased down the error and can't figure out what is causing the problem. It's properly set as a variable as far as I can tell, and everything else is working fine. I copy pasted the event graph from the original unit that you have it the main folder. How would i go about fixing this?
              So the error indicates that the abp_ref variable is empty (access none). The reason for this is because in your first image you are casting the animation instance of your unit to ABP_Unit, and if you're following my old tutorial on this I'm guessing you're using a new ABP that is not a child of ABP_Unit. If this is the case, then the cast will fail and abp_ref remain empty. To fix this, change the cast so that it casts to your custom animation blueprint instead and change the class of abp_ref to your custom class. After that replace the AnimateMovement and AnimateUnit events so that it uses the new abp reference. Another thing that is different now from my old tutorial is that if you make a fresh animation blueprint which you want to work like ABP_Unit you have to remember to add the BPI_AnimateUnit interface to it. That should be all you need to do.
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                Click image for larger version

Name:	Screenshot_3921.jpg
Views:	9
Size:	136.8 KB
ID:	1489929 Hey Monokkel, I have some problem with a toolkit. I made the main menu and when I start lvl with a grid and units, units are not moving and I have that errors in a message log.
                Attached Files

                Comment


                  Also i tryed it it with new project, and there is 2 same errors Click image for larger version

Name:	sc2.jpg
Views:	5
Size:	78.0 KB
ID:	1489935

                  Comment


                    Hi Monokkel and thanks for your work,

                    I bought your toolkit yesterday because I thought it would be the perfect starting point for my project. I always wanted to make a digital version of an idea I had for a board game and when I starting looking up methods and possible tools I found yours. The core of this game would be a square grid of fields which could be occupied by a player (similar to the game of risk). Each turn a player has some points which he can spend to expand his occupied area(this could come from the movement cost system somehow I guess). The game is supposed to be played only by real players via network as I don't think I'm able to incorporate a AI right now. At first I thought I wouldn't have to change too much but I think I'm getting a little bit lost. Sadly I just started working with UE4 so a lot of my problems should clear up by reading and learning more about it and about your toolkit too. But I'm asking right now mostly to hear from you if you think your toolkit is the right starting point for my ideas and if you think the changes I would have to implement are feasible.

                    My standing right now is that I need an array with the positions of occupied tiles of each player(the grid unit array seems to be a good starting point). From this a further array for each player is determined which includes the locations of all reachable tiles(mostly neighboring tiles) and which tiles have to be filled first(a player is not supposed to just build straight lines of tiles but should have to "reinforce a line of tiles after a determined length*). Those arrays should at each turn be compared to see where a possible tile is a hostile tile.
                    There would be three possible states of a tile in game then other than the default state. Possible, must-be-filled-first, possible but hostile(attackable). The arrays would also need to be updated each turn.

                    I thought about having a unit for each player that will stay for the whole game on the starting position. I would change the click actions so that clicking a tile would trigger filling a tile if it's possible and doesn't require another tile to be filled first(and you have enough points) or trigger an attack on a hostile tile. I don't know exactly what the "filling" part should be. Of course it should change the entries of the arrays. After that it should be enough to represent the changes just visually on the grid I think as I don't need animations or having the filled tiles act independently in any way - I first thought about filling it with units. I'm not sure how to get there exactly.

                    This would be my base idea. I have some extensions in mind like different rule sets(the players start with the same rule sets but after reaching some special tile they can choose from 2 or 3 advanced rule sets). The grid has tiles with differing costs. The grid layout I'm thinking of would allow 4 or 2 players - this should be determined before a game starts...

                    As I'm seeing it your grid system, the turn system, the networking system(without understanding them well) are a very solid starting point. The problem is that the toolkit seems to me to be focused on the units with stats and abilities which I don't need. Do you think it's possible to build it into what I need?
                    I guess I could answer a lot of this myself by understanding your toolkit better but I have some problems with the tutorial videos - mostly with the one about blueprints - because it looks like a lot has changed.


                    Sorry for this wall of text - at least I hope it's understandable.



                    *I'm thinking that when a player is active all possible tiles(because of neighboring) are shown. But when he hovers over a tile which would make a straight line too long it shows in a different color which tiles would have to be filled first. (I hope I explained that understandably) - logically this would mean to check starting from a tile with only two neighbors if those neighbors too only have two neighbors and if this is true for too many consecutive fields you would have to fill in a third neighbor for the first tile with only two.

                    Comment


                      Originally posted by Monokkel View Post

                      So the error indicates that the abp_ref variable is empty (access none). The reason for this is because in your first image you are casting the animation instance of your unit to ABP_Unit, and if you're following my old tutorial on this I'm guessing you're using a new ABP that is not a child of ABP_Unit.
                      The first image is the original BP_Unit_Anim as that's the one triggering the error for some reason. This is only happening with my custom character so I'm pretty sure I'm messing up the blueprint somewhere. The second image I posted is what I'm currently using in the Anim_BP for my new character and I've tried to copy the BP_Unit_Anim and switch the Cast To over to the Anim_BP that I want to use, but I get an error saying that it's not compatible. Hopefully this is something really small that I'm missing from lack of knowledge. Here's a screenshot of when I try to switch the line from going from the original cast to the "set" to my new Anim_BP. I feel like I'm just putting things in the wrong place here lol

                      Comment


                        Originally posted by Seruvv View Post
                        Click image for larger version

Name:	Screenshot_3921.jpg
Views:	9
Size:	136.8 KB
ID:	1489929 Hey Monokkel, I have some problem with a toolkit. I made the main menu and when I start lvl with a grid and units, units are not moving and I have that errors in a message log.
                        Hi, I've not seen this issue before. It seems like some of the blueprints that are initialized at startup are being initialized before the grid manager is accessible, but I don't know why. How are you loading your level? Is your main menu level a separate level? Have you made any changes to any of the startup events for the core blueprints in the toolkit?

                        Originally posted by izckl View Post
                        Hi Monokkel and thanks for your work,

                        I bought your toolkit yesterday because I thought it would be the perfect starting point for my project. I always wanted to make a digital version of an idea I had for a board game and when I starting looking up methods and possible tools I found yours. The core of this game would be a square grid of fields which could be occupied by a player (similar to the game of risk). Each turn a player has some points which he can spend to expand his occupied area(this could come from the movement cost system somehow I guess). The game is supposed to be played only by real players via network as I don't think I'm able to incorporate a AI right now. At first I thought I wouldn't have to change too much but I think I'm getting a little bit lost. Sadly I just started working with UE4 so a lot of my problems should clear up by reading and learning more about it and about your toolkit too. But I'm asking right now mostly to hear from you if you think your toolkit is the right starting point for my ideas and if you think the changes I would have to implement are feasible.
                        Hi izckl, generally I believe my toolkit is a pretty good starting point for any turn based games on a grid; especially for ones that involve moving pawns. Unreal Engine takes a while to master and using ATBTT adds more stuff to learn on top of that. If you have not done so already I would recommend at least going through all of Epic's official blueprint tutorials. From what I can gather from your post I think the game you are describing is feasible and should be doable using the toolkit, but it will of course be a challenge.

                        Originally posted by izckl View Post
                        My standing right now is that I need an array with the positions of occupied tiles of each player(the grid unit array seems to be a good starting point). From this a further array for each player is determined which includes the locations of all reachable tiles(mostly neighboring tiles) and which tiles have to be filled first(a player is not supposed to just build straight lines of tiles but should have to "reinforce a line of tiles after a determined length*). Those arrays should at each turn be compared to see where a possible tile is a hostile tile.
                        There would be three possible states of a tile in game then other than the default state. Possible, must-be-filled-first, possible but hostile(attackable). The arrays would also need to be updated each turn.
                        If which tiles are owned by which faction is central to your game I would recommend you create a new Map type variable with integer keys and EFaction values. This should give you the most control. The grid units map is a bad idea to use, as you need this to hold the location of units, and since the values all need to be references to actors placed in the levels, which is impractical in your case. You can use maps or sets of integers to hold tiles that are to be converted. For your various states you can use a custom enum.

                        Originally posted by izckl View Post
                        I thought about having a unit for each player that will stay for the whole game on the starting position. I would change the click actions so that clicking a tile would trigger filling a tile if it's possible and doesn't require another tile to be filled first(and you have enough points) or trigger an attack on a hostile tile. I don't know exactly what the "filling" part should be. Of course it should change the entries of the arrays. After that it should be enough to represent the changes just visually on the grid I think as I don't need animations or having the filled tiles act independently in any way - I first thought about filling it with units. I'm not sure how to get there exactly.
                        Sounds reasonable enough. Like you suggest, filling a tile would amount to altering the appropriate value in an array. Displaying this can be done however you want. I would not use units just for displaying whether a tile is filled, since you would not be using most of the unit features. You could simply spawn static meshes (instanced or otherwise) or anything else, really. How do you imagine that "filling" would look in your ideal game? All the mechanics for interacting with tiles could be handled by a custom BP_Ability, which would hold a lot of your gameplay code. Having a unit for each facton which uses this ability sounds like a simple way to do this.

                        Originally posted by izckl View Post
                        This would be my base idea. I have some extensions in mind like different rule sets(the players start with the same rule sets but after reaching some special tile they can choose from 2 or 3 advanced rule sets). The grid has tiles with differing costs. The grid layout I'm thinking of would allow 4 or 2 players - this should be determined before a game starts...
                        Ok. Changing the rules could always be set by changing a global variable (possiblity in the turn manager), which your custom ability uses to inform what actions can be done and what happens at the start of a turn.

                        Originally posted by izckl View Post
                        As I'm seeing it your grid system, the turn system, the networking system(without understanding them well) are a very solid starting point. The problem is that the toolkit seems to me to be focused on the units with stats and abilities which I don't need. Do you think it's possible to build it into what I need?
                        I guess I could answer a lot of this myself by understanding your toolkit better but I have some problems with the tutorial videos - mostly with the one about blueprints - because it looks like a lot has changed.
                        As I said initially, I believe my toolkit is a pretty good based. It is true that there are more features included for games with units with stats etc., but I have tried to make the toolkit as flexible as possible so that it can be used for many different kinds of grid and turn based games. But of course the further you move away from the included examples the more work you will need to do on your own. I apologize that most my tutorials are somewhat outdated at this point. I will be making new ones, but it will take some time. Since you want to make a networked game, going back to an older version of the toolkit is not an option, unfortunately. Feel free to ask anything you are wondering in this thread, however, and I will do my best to help you.


                        Originally posted by izckl View Post
                        Sorry for this wall of text - at least I hope it's understandable.

                        No worries, I think I understand most of it. If you need help with specific implementations of features I would need to get a more detailed description of my mechanics, but I think I understood your mechanics enough to give you a proper answer.


                        Originally posted by izckl View Post
                        *I'm thinking that when a player is active all possible tiles(because of neighboring) are shown. But when he hovers over a tile which would make a straight line too long it shows in a different color which tiles would have to be filled first. (I hope I explained that understandably) - logically this would mean to check starting from a tile with only two neighbors if those neighbors too only have two neighbors and if this is true for too many consecutive fields you would have to fill in a third neighbor for the first tile with only two.
                        Not sure if I understand this one 100% what is the starting point of the path? By straight line do you mean a line that is straight like a ruler? With the regular pathfinding you could at least check all the grid indexes of the path and compare them to your new faction map.

                        Originally posted by OperatorCrux View Post

                        The first image is the original BP_Unit_Anim as that's the one triggering the error for some reason. This is only happening with my custom character so I'm pretty sure I'm messing up the blueprint somewhere. The second image I posted is what I'm currently using in the Anim_BP for my new character and I've tried to copy the BP_Unit_Anim and switch the Cast To over to the Anim_BP that I want to use, but I get an error saying that it's not compatible. Hopefully this is something really small that I'm missing from lack of knowledge. Here's a screenshot of when I try to switch the line from going from the original cast to the "set" to my new Anim_BP. I feel like I'm just putting things in the wrong place here lol
                        Hmm, odd. I added a new unit to the toolkit using a custom skeleton while trying to figure out what might have been wrong on your end and I did not experience any issues. Maybe I forgot to describe some small, essential step. Like I said, it seems the problem is that the reference is not being filled for whatever reason. What is the compatibility error you are getting? Have you changed the class of the abpref variable to your custom one?
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          [QUOTE="Monokkel;n1490235"]

                          Hi, I've not seen this issue before. It seems like some of the blueprints that are initialized at startup are being initialized before the grid manager is accessible, but I don't know why. How are you loading your level? Is your main menu level a separate level? Have you made any changes to any of the startup events for the core blueprints in the toolkit?

                          Hi! I didn't make any changes to the toolkit and did make a separate lvl for the menu. This is a Level blueprint of that level and Widget event Graph.

                          Click image for larger version

Name:	Wigrt.jpg
Views:	5
Size:	218.8 KB
ID:	1490276Click image for larger version

Name:	Event-Graf.jpg
Views:	5
Size:	242.0 KB
ID:	1490277

                          Comment


                            Originally posted by Seruvv View Post
                            Hi! I didn't make any changes to the toolkit and did make a separate lvl for the menu. This is a Level blueprint of that level and Widget event Graph.
                            I tried replicating your blueprints and it is working on my end. Made a separate level for the menu, added a widget with a start game button to the viewport from the level blueprint and run OpenLevel(Example) on click. Might it be something in how you set up your level? What happens if you load my example level instead? Are you playing in standalone?
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              Originally posted by OperatorCrux View Post

                              The first image is the original BP_Unit_Anim as that's the one triggering the error for some reason. This is only happening with my custom character so I'm pretty sure I'm messing up the blueprint somewhere. The second image I posted is what I'm currently using in the Anim_BP for my new character and I've tried to copy the BP_Unit_Anim and switch the Cast To over to the Anim_BP that I want to use, but I get an error saying that it's not compatible. Hopefully this is something really small that I'm missing from lack of knowledge. Here's a screenshot of when I try to switch the line from going from the original cast to the "set" to my new Anim_BP. I feel like I'm just putting things in the wrong place here lol
                              Hey OperatorCrux, I had the exact same problem.
                              I did however manage to get passed those error messages, but I'm stuck somewhere else now.
                              Maybe I can help you with this specific problem, since I struggled with exactly that for a day.
                              I will try lend you some visual aid maybe that will help. Basicly it's the same advice Monokkel already gave.

                              In the animation blueprint (mine is called ABP_Custom) check your class settings, and add the BPI animate unit interface:
                              Click image for larger version

Name:	Screenshot-21.jpg
Views:	4
Size:	345.8 KB
ID:	1490352

                              After you checked that make the following changes to your custom model (mine is called BP_Unit_Custom): add a variable, just like abref, but called abref2 or something, refering to the object "ABP_Custom" (but ofcourse take your animation blueprint). Change "cast to ABP_Unit" to "Cast to ABP_your ABP name". After doing that add a new "Animate Ability" and "Animate Movement "(uncheck context sensitive or it wont show up!).
                              I basicly highlighted all the key differences in the next screenshot so you can figure out what part you need to change. I hope this will help you along, goodluck
                              Click image for larger version

Name:	Screenshot-22.jpg
Views:	4
Size:	365.3 KB
ID:	1490353

                              Comment


                                Originally posted by Phoidy View Post

                                Hey OperatorCrux, I had the exact same problem.
                                I did however manage to get passed those error messages, but I'm stuck somewhere else now.
                                Maybe I can help you with this specific problem, since I struggled with exactly that for a day.
                                I will try lend you some visual aid maybe that will help. Basicly it's the same advice Monokkel already gave.
                                Thank you so much. What i was messing up was the way that I was declaring and setting the variable. I wasn't specifying that it was a reference to the Object Type so it was just routing back to having no reference at all. I was completely overlooking the details panel when trying to change everything around to reference the new stuff. Here's a screenshot of what I did for anyone else who might be searching this thread in the future looking for a fix for the same issue.

                                Thanks again Monokkel and Phoidy

                                Comment

                                Working...
                                X