Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Looking for a way to move the camera in between turns sort of like final fantasy tactics where you press a button and the camera rotates the camera 90 ° cheers

    Comment


      Originally posted by Deftones4 View Post
      Looking for a way to move the camera in between turns sort of like final fantasy tactics where you press a button and the camera rotates the camera 90 ° cheers
      It has been ages since I played Final Fantasy Tactics, so could you tell me how this is different from the default camera functionality? By default the camera in ATBTT rotates 90 degrees when you press Q or E.
      Last edited by Monokkel; 09-13-2017, 05:39 PM.
      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

      Comment


        Hello @Monokkel

        Since you're currently working on adding multiplayer, I thought I might pick your brain. I'm trying to do the same thing in my project, though I'm having some issues. Maybe you ran into some of them.

        One of those issues is that, when a playercontroller "clicks", I call "GetHitTileLocationAndIndex" from Grid_Manager, as usual. It works for Player 1, but it doesn't work for Player 2. When running the "GetHitResultUnderCursor" function (cpp equivalent to "Get Hit Result Under Cursor By Channel") with player 2 I always receive a false return value, and location (0,0,0). I'm using your "PathTrace" trace channel. When I click with Player 1, I get the normal result - a successful hit and the correct location.

        I tried wrapping the entire click event in a replicated event that runs to server. But still no luck. Have you had this issue? Any idea how to solve it?

        Thanks
        Last edited by Bridgeburners; 09-17-2017, 02:42 PM.

        Comment


          Hey Bridgeburners. I've got it working on my end and I'll try to give you the steps to replicate it. In my build I'm getting the hit location client side in the player controller first and then converting that location to a grid index server side. A client cannot use the GetHitTileLocationAndIndex function, since it requires access to the Vector Field array, which I am not replicating (and I assume you are not either). So first Get Hit Result Under Cursor By Channel -> pass the Hit Result Location to a custom event which is replicated to server and then use the Convert Location To Index 3D function to get the grid index. Hope that works on your end. I've made so many changes that I might be forgetting some other essential step, but I think that should be all you need.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Originally posted by Monokkel View Post
            Hey Bridgeburners. I've got it working on my end and I'll try to give you the steps to replicate it. In my build I'm getting the hit location client side in the player controller first and then converting that location to a grid index server side. A client cannot use the GetHitTileLocationAndIndex function, since it requires access to the Vector Field array, which I am not replicating (and I assume you are not either). So first Get Hit Result Under Cursor By Channel -> pass the Hit Result Location to a custom event which is replicated to server and then use the Convert Location To Index 3D function to get the grid index. Hope that works on your end. I've made so many changes that I might be forgetting some other essential step, but I think that should be all you need.
            Thank you, that worked. I didn't do it exactly the way you're doing it, because my setup is different. But the main insight I needed was to get the hit result vector on the client side, and then calculate the index server side. Thanks again.

            I'm getting an idea of how cumbersome it is to rewrite or change a lot of the functions I wrote, to account for replication, in my humble little project that I only started a couple of months ago. So I certainly don't envy you your task of having to do this for the entire toolkit. Good luck.

            Comment


              Hi Monokkel thanks for the information about the camera movement it helped alot. One thing I did want to ask you could you recommend a save system. I have added in XP system level system and a spell system that unlocks with what level you are each character has there own system. I have tried a few tutorials on saves but it won't save everyones variables cheers

              Comment


                Originally posted by Bridgeburners View Post

                Thank you, that worked. I didn't do it exactly the way you're doing it, because my setup is different. But the main insight I needed was to get the hit result vector on the client side, and then calculate the index server side. Thanks again.

                I'm getting an idea of how cumbersome it is to rewrite or change a lot of the functions I wrote, to account for replication, in my humble little project that I only started a couple of months ago. So I certainly don't envy you your task of having to do this for the entire toolkit. Good luck.
                Glad it worked Yeah, getting everything to work with replication is the hardest part of the new update, for sure. I got most basic functionality working with replication fairly quickly, but the skill system is something I'm still having trouble getting to work correctly for multiplayer, though I'm getting there, one function at a time. It is the last major thing I have to do before getting the update done, though (besides commenting and some cleaning up).


                Originally posted by Deftones4 View Post
                Hi Monokkel thanks for the information about the camera movement it helped alot. One thing I did want to ask you could you recommend a save system. I have added in XP system level system and a spell system that unlocks with what level you are each character has there own system. I have tried a few tutorials on saves but it won't save everyones variables cheers
                I don't know of any particular save systems to recommend. It should be possible to save any variable using UE4's built-in save features, I believe. Saving and loading is not something I've worked a lot with, so you could try to describe your problem in more detail to me, but you might have more luck in the blueprint subforum, since this is something more general, and not specifically related to ATBTT.
                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                Comment


                  Hi Monokkel. Sorry to bother you about multiplayer again, but since you have gone into the trenches, I was hoping you could offer some wisdom to help make my path a little easier.

                  Have you mainly stuck with the classes you made in earlier versions, or did you have to make new classes to account for the changes? For example, I hear that GameState should be used instead of GameMode as only the former exists on the client's end. Similarly, some say that PlayerState should be used instead of PlayerController, but I haven't really touched PlayerState nor know much about its utility. Have you moved a lot of functionality to those classes, or are you still using the same ones, with clever use of replication and RPC? Is GridManager still the central hub of most of your grid-based functions?

                  Have you modified a lot of existing functions to be RPC? Or do you leave them as is and wrap them in higher level RPC events?

                  Also, if there were any major issues that you didn't foresee until you were in the thick of things, I'd love to know about it. You don't have to get too descriptive, I don't want to distract you from all the work you have to do, but any tips you have would be great.
                  Last edited by Bridgeburners; 09-19-2017, 12:06 PM.

                  Comment


                    @Bridgeburners: Happy to tell you what I've got so far. I am indeed using Game State, though I am also using the game mode and a custom Turn Manager blueprint. The thing with the game mode is that it only exists on the server. That does by no means mean it does not have its place in multplayer games, however. To prevent cheating you generally want to keep all important calculations on the server and have the clients mostly be used for input and anything that can be seen by the players.

                    Game state can be seen as an extention of Game Mode for anything you want to be replicated. I'm keeping a list of units, initiative order, the active unit and references to several important singleton blueprints in the game state (so that I don't have to keep separate references to all such variables in every blueprint that need them, as I've done before)

                    I now use the game mode mostly for initializing the game, including running start of game events in important blueprint to get more control than just running Event Begin Play for everything. I also use it for handling new players logging in.

                    The new turn manager blueprint is used for many of the turn order functions I previously used Game Mode for. Game Mode could still be used for this, but with a custom blueprint I have more control over what parts I want replicated, which makes it less awkward to work with.

                    Many things have been moved away from the player controller. Previously the player controller handled a lot of important calculations. Now it is mostly responsible for input, which is passed to separate Ability blueprints which do all calculations server side.

                    I mostly keep functions as is and wrap them up in RPC events.

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

                    Comment


                      Hello again Monokkel ! I've encountered another point where I'm stuck probably just due to my lack of knowledge of Unreal. I got the skeleton mesh and most animations working with my units. If I don't change the attack animation it works just fine, but if I change the attack animation then the units get stuck in it and won't switch back to any other animation. How would I go about fixing this? I imagine there's just a broken link somewhere in the blueprint after changing the animation but I have no idea where to look. Here's a fullscreen gif to show what's happening.

                      https://giphy.com/gifs/3o7aCQkL8jRFnnY0zm/fullscreen

                      Edit : Also I did notice that when I finally got the animation_bp working with my custom units, the demo units that you included stopped animating and started T-posing like in the video. No idea how I pulled that off but it's not a major concern. Could be useful info for you though I'm not sure.
                      Last edited by OperatorCrux; 09-20-2017, 02:19 AM.

                      Comment


                        @OperatorCrux: The animation blueprint in the included units uses animation notifies to call an event at the end of the animation, that tells the behavior tree to go back to idle. Look at the animation you intend to replace and find the name of the animation notify. Add it to your custom animation and it should work. Odd that the old units started T-posing, though. Did you make a duplicate of the default animation blueprint, a child blueprint or did you make one from scratch?
                        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                        Comment


                          Monokkel Thanks, that helps a lot!

                          Just to clarify something.

                          If I understand you correctly, all your "reference" variables are now just stored in the game state? So if you want to, for example, spawn move tiles for a unit after the player clicks on that unit, you first get the selected unit after the click and then call GetGameState -> Cast to ATBTTGameState -> GridManagerRef -> Pathfinding from the player controller? (As opposed to the player having their own GridManagerRef.)
                          Last edited by Bridgeburners; 09-20-2017, 04:41 PM.

                          Comment


                            Originally posted by Bridgeburners View Post
                            Monokkel Thanks, that helps a lot!

                            Just to clarify something.

                            If I understand you correctly, all your "reference" variables are now just stored in the game state? So if you want to, for example, spawn move tiles for a unit after the player clicks on that unit, you first get the selected unit after the click and then call GetGameState -> Cast to ATBTTGameState -> GridManagerRef -> Pathfinding from the player controller? (As opposed to the player having their own GridManagerRef.)
                            I make an exception for the grid manager, as it referenced so often that setting up a reference to it at Event Begin Play makes the graphs cleaner and easier to work with. Other than that I keep references in the game state. though I don't need that much. There is a reference to the active unitand the turn manager, as you can get the grid camera by getting the controlled pawn. However, any future singleton classes I'd add for a specific game I'd probably add to the game state.
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              Originally posted by Monokkel View Post
                              @OperatorCrux: The animation blueprint in the included units uses animation notifies to call an event at the end of the animation, that tells the behavior tree to go back to idle. Look at the animation you intend to replace and find the name of the animation notify. Add it to your custom animation and it should work. Odd that the old units started T-posing, though. Did you make a duplicate of the default animation blueprint, a child blueprint or did you make one from scratch?
                              I had figured out how to get this far at around two in the morning my time so I probably just retargetted the wrong thing. I believe what I ended up doing was retargeting the Pawn_Anim_BP_Parent, Pawn_Anim_BP_Ranged, and Blend Spaces. What I need to do instead of this is duplicate those, and retarget the duplicates for the custom character? From there replace the anim notifies?

                              Edit : Can I get away with what I've already done if I don't intend on using your units? All of the units I plan on using have the same skeleton as the one that is currently using the animations. If doing this way breaks something I can absolutely go back and duplicate instead but if I can just replace the anim notifies that would be great.
                              Last edited by OperatorCrux; 09-20-2017, 07:17 PM.

                              Comment


                                Hi there! Just bought this on the Marketplace, great job!

                                I'm looking to see if I can modify the setup a bit so that the BP_Grid_Manager and units are generated at runtime. I'm interested in adding some factory/unit construction functionality and I was wondering if you had any tips on doing that. Or is your setup mostly designed to just be dropped into the editor and everything done via construction script, which I think is not fired if spawned at runtime though I could be wrong.

                                Thank you!

                                Edit: I've determined that the Grid Manager needs to exist when the game starts or a lot of stuff breaks, as far as I can tell. Perhaps I'll have the grid manager manually placed in -- however, I am having trouble spawning units (Using the Spawn Unit function in the Grid Manager) and having them interactible in the game. The unit spawns but I can't click it or do anything. Any ideas? Thank you!

                                Slightly unrelated to the spawn unit problem, I'm also unsure of how to change the size of the grid (X and Y) after runtime. For example, I'd like to deploy a saving/loading system where you can load up a map that is say, 5x5. But if the grid manager is the default 3x3 at begin play, I'm not sure if there's a way to change that dynamically.

                                Double edit: Sorry for all the edits! It appears the spawned unit behaves normally if there is at least one manually placed unit. Do you know if there is a way to allow a spawned unit to be selected and used when there are no units at all existing when the game starts?
                                Last edited by VaultedSky; 09-21-2017, 12:15 AM.

                                Comment

                                Working...
                                X