Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Originally posted by Studder View Post

    No worries. Thanks for the explanation.

    My blueprint is now this: https://blueprintue.com/blueprint/_ykc_zvf/

    And I check in "CheckIfValidTarget" if the player can move to a tile or not.

    I still have a weird issue though that sometimes when I place the second mesh next to a player the blue markers for this player gets on top of the first mesh instead of the second mesh this doesn't happen if I place a second mesh that's not next to a player. You are correct that the player can only move 1 mesh up at a time and can move from second mesh to the floor directly.

    I tried adding the Z location of the grid location like I think you said but that gave me some weird results. Resulting the marker being two times above the meshes.

    Another thing I am having trouble with is figuring out how you can end the turn of the whole faction.

    Following situation:

    I have two players. Each can control 2 units in 1 turn. But they can only use 1 unit each turn. I had no idea to switch between units inside factions so it's now an ugly hack to switch between units in a faction.
    https://blueprintue.com/blueprint/32bp12ct/

    When I click on a unit if it's the same faction then it's switching to that unit.

    Now what I want is when ever a player end it's turn it should always go to the other faction. This works some what if use "End Entire Faction Turn" in the ReactivateActiveObject but this only seems to work if I don't switch between units in a turn. If I switch between units in a turn and end a turn it is possible to go to a unit's turn in the same faction which I don't want.

    You have any thoughts how to approach this?

    Sorry to bug you but one other thing

    I want the player not to walk to another tile but to gracefully jump to another tile. I tried some attempts to do it in BP_Unit but I don't know how I would get the ClickedIndex in there to know where the player must jump to.

    Thanks in advance!!
    Ok, I figured this stuff might be easier to demonstrate directly than to explain, so I went ahead and implemented most of the basic functionality:



    I'll PM you the project and that should hopefully make it clear what things you need to change.

    The EndEntireFactionTurn function seems to be broken at the moment. I have added it to my list of bugs and will make it a priority to look into. After making this I'm beginning to agree with the complaint from some users that the turn structure is inflexible. I think it is a good candidate for refactoring and I hope I can find the time to do some work on that soon.

    As for gracefully jump, do you mean to have the mesh hop from tile to tile as if you were picking up and moving a game token? Could you be a bit more specific?

    Originally posted by Doxs Roxs View Post
    Hi again, thanks for the help, I got the mesh working now, It was the heightmap setting under Procedural.
    Dont worry about the tutorials, remember I am completely new to the Unreal engine and editor.

    Now I will proceed to mess with all the other stuff, most likely Ill break it in all sorts of impossible ways
    Ok, glad you figured it out. Have fun breaking stuff

    Originally posted by Bayohazard View Post
    Hi Monokkel, I bought this toolkit a while ago but just started going through the tutorials last week. I wanted to use this toolkit to create a tactics game that plays like a rogue-like (Pause the game and give commands but have movement and attacks function like a rogue-like). I see that there is a rogue-like example in 2D game but I want my game to be in 3D. I'll let you know if I figure out a way to do this, but I wanted to know if you have any ideas or suggestions on implementation in the meantime.
    The 2D example works just as well in 3D. There is not really any difference between the two approaches as far as the toolkit is concerned. The only thing that will be different to implement in 3D is the fog-of war, as the fixed camera angle of the 2D example simply places a flat mesh over the tile. This would obviously not work in 3D and you would have to use 3D fog, procedural meshes, lighting or something else if that is what you're going for. Could you describe in more detail what you mean with the movement and attacks functioning like a rogue-like? It has become a pretty diverse genre over the years. Are you talking movement using the arrow keys or something else?

    Originally posted by owenprescott View Post
    Does this toolkit have an official Discord? If not can the creator (or a user) create one?
    Not an official, though there is an unofficial one made by @Flux. Since I have limited time to provide support these days I prefer to answer everything in one go when I have the time, which a forum thread is ideal for. I cannot risk being constantly distracted from my day-job, which giving support through Discord could quickly lead to. However, the Discord is a great place for developers using the toolkit to help each other out, and I might sometimes hop by to chat, but for the reasons described I don't want to make an official Discord at the moment.

    Another reason I prefer providing support in this thread is that the discoverability in the Unreal Engine marketplace is unfortunately abysmal at the moment. Epic are working on implementing tags, but it is still not possible to do simple things like searching for what assets are the most popular. Since I released the toolkit over 3 years ago and the marketplace defaults to sorting everything by date added, having an active support thread that is frequently on the first page of the marketplace forum is the only practical way I have to make new developers aware of its existence.
    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

    Comment


      I think I need some help again. I have tried to add other vehicles but cannot get it to work.

      In this tutorial at 10:47 you make a copy of the unit parent to add a static mesh unit to the game.
      https://www.youtube.com/watch?v=rPXZWAoq7OA&t=4s

      However, when I try to do the same I cannot seem to find anything like it, I tried making my own by creating a new one based on the BP_Unit blueprint and even got the healthbar to work after copying lots of stuff manually. However, I could not make it selectable or movable. Same when I used BP_Unit_Anim as a base and removed the skeletal mesh and replaced it with a static mesh, seemed to break a few things that I dont know how to fix.

      Comment


        Originally posted by Doxs Roxs View Post
        I think I need some help again. I have tried to add other vehicles but cannot get it to work.

        In this tutorial at 10:47 you make a copy of the unit parent to add a static mesh unit to the game.
        https://www.youtube.com/watch?v=rPXZWAoq7OA&t=4s

        However, when I try to do the same I cannot seem to find anything like it, I tried making my own by creating a new one based on the BP_Unit blueprint and even got the healthbar to work after copying lots of stuff manually. However, I could not make it selectable or movable. Same when I used BP_Unit_Anim as a base and removed the skeletal mesh and replaced it with a static mesh, seemed to break a few things that I dont know how to fix.
        I'm guessing you forgot to delete some of the stuff that calls of the animation blueprint. Try duplicating BP_Unit_Anim again. Delete the skeletal mesh and replace with a static mesh. Then delete everything in the event graph except for the stuff that specifically has to do with the health bar. The event graph should look like this:


        Note that there is also a small bit in the construction script that sets up the reference to the health bar (check BP_Unit_Anim's construction script)

        This works fine on my end:



        As for your attempt to use BP_Unit as a base, did you make a child blueprint of BP_Unit or make a duplicate? If you made a duplicate then all the code in the game that references BP_Unit will break for that unit, since it is no longer of the BP_Unit type. Is this what might have gone wrong?
        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

        Comment


          Originally posted by Monokkel View Post

          I'm guessing you forgot to delete some of the stuff that calls of the animation blueprint. Try duplicating BP_Unit_Anim again. Delete the skeletal mesh and replace with a static mesh. Then delete everything in the event graph except for the stuff that specifically has to do with the health bar. The event graph should look like this:


          Note that there is also a small bit in the construction script that sets up the reference to the health bar (check BP_Unit_Anim's construction script)

          This works fine on my end:



          As for your attempt to use BP_Unit as a base, did you make a child blueprint of BP_Unit or make a duplicate? If you made a duplicate then all the code in the game that references BP_Unit will break for that unit, since it is no longer of the BP_Unit type. Is this what might have gone wrong?
          Thanks for a super fast response! I made a child BP from BP_Unit.
          Seems I must have missed something there, now I just have to figure out how to kill it properly but I think I can sort that by looking at your tutorial
          I also think Im going to have tons of small stuff to sort through for quite some time now.

          Another question, have you ever tried projecting the grid on a sphere, like a geodesic grid? I know this is probably quite complicated but just wanted to check if you had already tried it.

          Comment


            Originally posted by Monokkel View Post

            Could you describe in more detail what you mean with the movement and attacks functioning like a rogue-like? It has become a pretty diverse genre over the years. Are you talking movement using the arrow keys or something else?
            Example for my idea of movement would be this video of the game stoneshard (https://youtu.be/CspD9zMTlTg?t=9m21s). Turns would be simultaneous and attacks would be charged for a certain amount of time before they activate.

            Comment


              Originally posted by Bayohazard View Post

              Example for my idea of movement would be this video of the game stoneshard (https://youtu.be/CspD9zMTlTg?t=9m21s). Turns would be simultaneous and attacks would be charged for a certain amount of time before they activate.
              Hi, its interesting that you mention simultaneous turns since that is my plan as well. I have started to look into the turnmanager code and will start breaking stuff as soon as I figure out where to start and how to make it work later

              I want my system to work as follows:
              At turn start you can issue orders to any pawn and each action will require a certain amount of time (action points). Each turn will consist of x action points.
              Instead of moving each order will be added to an order list, I do plan to visualize each order when pawn is selected. Examples of orders could be: chase and attack a specific enemy, hold position and defend. Shoot any enemy coming into range or a certain area etc.

              However, no units move until end of turn when enemy movement and friendly units are moved in unison according to their orders.
              This can result in unexpected combat when units meet or no combat if the enemy is not where you expect them to be. Or you can walk straight into a well prepared ambush

              Im not 100% sure on how to do it yet, but I think I will try and split each turn into a set number of actions (time slots) and then save each units action for each slot so they can all be replayed together.

              Comment


                Originally posted by Bayohazard View Post

                Example for my idea of movement would be this video of the game stoneshard (https://youtu.be/CspD9zMTlTg?t=9m21s). Turns would be simultaneous and attacks would be charged for a certain amount of time before they activate.
                The toolkit is not really set up for simultaneous turns, but there are developers who have modified it to achieve this with a moderate amount of work. Doxs Roxs has some good suggestions, and I know that mflux has also made a lot of progress in this regard. I would recommend discussing this more with them as I have not tested this sort of stuff myself. I imagine that what you are describing should be somewhat simpler than some other simultaneous turn stuff, since each "turn" is essentially one step on the map or one attack. I think you could more or less fake this by having the player do his action, then having the AI react like in regular turn based combat, but then animating both the player and AI at the same time. So game-logic wise it would still essentially be one turn after another, but not how it is shown to the player. I suspect something like this is done in Stoneshard.
                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                Comment


                  Hi, I'd like to know how to change the texts of the win/lose states (PLAYER FACTION WINS) so that I can put them in Spanish.

                  Comment


                    Originally posted by Manamaster View Post
                    Hi, I'd like to know how to change the texts of the win/lose states (PLAYER FACTION WINS) so that I can put them in Spanish.
                    In the WBP_ATBTT you can find the Game Over Hud in the EventGraph.

                    Comment


                      Ok I am lost... tried too many things but I can't get it right. The player jumps to the moon and back lol.

                      Comment


                        Originally posted by Studder View Post
                        Ok I am lost... tried too many things but I can't get it right. The player jumps to the moon and back lol.
                        This should do the trick:







                        Originally posted by Manamaster View Post
                        Hi, I'd like to know how to change the texts of the win/lose states (PLAYER FACTION WINS) so that I can put them in Spanish.
                        What Studder said (thanks, Studder). Also check out the FindAndDisplayGameOverText in BP_TurnManager where this is initially called from.
                        Last edited by Monokkel; 09-09-2018, 04:15 PM.
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          Originally posted by Monokkel View Post

                          This should do the trick:









                          What Studder said (thanks, Studder). Also check out the FindAndDisplayGameOverText in BP_TurnManager where this is initially called from.
                          Oh my gawd you are the best!! It works flawlessy now. Awesome!!! <3<3<3<3

                          Comment


                            Ok, I've sent version 1.91 of ATBTT. It is not exactly a feature update, but not purely bug-fixes either. If you are making a networked multiplayer game I highly recommend changing to this version, or at least implementing the specific changes to the action system, as they should make networking quicker and more stable. If you are heavily invested in a project which is difficult to change at this point it can be skipped, but make sure to make the following minor change, which was causing a memory leak:

                            In BP_ActionManager ActionName was not plugged into Selection in the switch in the AnimateAction event. This would cause actors not to be properly destroyed, which could become a problem for long-lasting games that spawn lots of temporary actors. Make sure to fix this if you change nothing else:



                            Other than that, the changes are listed above. Epic should hopefully upload the update in a few days.

                            v1.91
                            • Minor refactoring of the Turn Manager to make it more flexible for different turn implementations.
                            • Added idle ability that is active when no other abilities are active.
                            • Added client-side validity check system in BP_ActionManager
                            • Several minor bug fixes (see Trello for details).
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment



                              Hey first of all thanks for your hard work on the Advanced Turn base. I buy your pack this summer and I am developing a project for school and I would like to know how can I make an AoE effect that is base on tile lets say I wanna make a fire beam that targets everything in front of the player for a 3 square large I did try to use the grenade one but it is not really what I want.

                              Comment


                                Originally posted by aeon38 View Post
                                Hey first of all thanks for your hard work on the Advanced Turn base. I buy your pack this summer and I am developing a project for school and I would like to know how can I make an AoE effect that is base on tile lets say I wanna make a fire beam that targets everything in front of the player for a 3 square large I did try to use the grenade one but it is not really what I want.
                                Hi aeon, here are two functions I made recently for drawing lines on a square grid. These functions were made specifically to take tile edges into account rather than visibility, so if you want the lines to stop if the visibility trace is blocked you need to change the checks of the edge array to running line traces. If you start three of these line functions side by side you should be able to create a three tile wide AoE beam:

                                FindTileLine function

                                GetSlope function nested within FindTileLine

                                hope that helps you get the results you are after
                                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                                Comment

                                Working...
                                X