Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Originally posted by Haukifile View Post
    1) AI turns lead to a loop where the pawn runs a set amount and spawns back to the starting points, runs again and spawns back, etc. Output log shows an error, which leads to me thinking that the array of move choice candidates is not being generated correctly, but I can't find the reason for this. Any ideas where to start poking around? Most of the pathfinding functions seem to use the pawns current move variable, which I've been replacing with the current action points variable, but I'm not sure if it's the right way to go.

    LogScriptCore: Warning: Script Msg: Attempted to access index -1 from array 'Move Choice Candidates' of length 1 in '/Game/AdvancedTurnBasedTileToolkit/Blueprints/Gameplay/BP_Grid_Manager.BP_Grid_Manager_Cecide the final target from viable options'!
    Monokkel : Any clue on where to begin solving this issue? I'm pretty stumped over here. It seems that at least the with the scifi game mode the AI doesn't work with more than two action points. I've found that it does the run-spawn loop until it has just one action point left, but I can't find where I should begin modifying to get it to work correctly.

    Comment


      Hello Monokkel, A few more questions then I can leave you alone..( I hope), how do you start the pawns in jungle raid "awake, and second I need to call a function after the last player pawns turn, where is the best place to do that ?

      Comment


        Originally posted by Monokkel View Post
        Something like that is at least one of the first things I would try if I were to experiment with this myself. Just allowing a unit to move between the tiles on the top/bottom of a ladder is very easy, but animating it so it looks good takes more work.
        Thanks for rundown! As you said, I was easily able to connect the tiles via AddEdge, but getting the unit to animate properly is turning into more of a task.

        I've played around with two methods for the animation part:

        A) When a unit arrives at a tile that has a ladder, I have the unit temporarily break off from the movement spline and travel along a custom spline that I've added to the ladder's actor. At the same time I trigger an animation on the unit's AnimationBP, but I'm having trouble timing that animation with the unit's overall movement along the spline.

        or

        B) When the unit arrives at a time with a ladder, I have the unit break off from the movement spline and trigger the climbing animation with root motion turned on. However, this doesn't work because Pawns don't process root motion, at least not in the way that the Character class does.

        My preference is to use option B because that should give me more natural looking movement. So I guess my question is, how big of a task would it be for me to convert ATBTT from using the Pawn class for units to the Character class? Is there anything major you foresee I would break if I did this?


        EDIT: I went ahead and switched the parent Unit class to inherit from Character and it works fine. I had to make a few decisions about what to do with all the inherited components, but there wasn't anything I had to change in the blueprints, so that's good. Now I have my units using root motion animations to climb up ladders and vault over cover. So that's nice.
        Last edited by jeremykeller; 01-12-2018, 02:34 PM.

        Comment


          Originally posted by Haukifile View Post
          1) AI turns lead to a loop where the pawn runs a set amount and spawns back to the starting points, runs again and spawns back, etc. Output log shows an error, which leads to me thinking that the array of move choice candidates is not being generated correctly, but I can't find the reason for this. Any ideas where to start poking around? Most of the pathfinding functions seem to use the pawns current move variable, which I've been replacing with the current action points variable, but I'm not sure if it's the right way to go.

          LogScriptCore: Warning: Script Msg: Attempted to access index -1 from array 'Move Choice Candidates' of length 1 in '/Game/AdvancedTurnBasedTileToolkit/Blueprints/Gameplay/BP_Grid_Manager.BP_Grid_Manager_Cecide the final target from viable options'!
          Sorry for the late answer, Haukifile. You must have postet it while I was writing my answer to Skulldug, so I did not see it.

          The error reported is inconsequential. I have fixed this error in my internal build already, but it is not something that should cause any issues. The movement issue you are seeing must be caused by something else.

          I'm guessin the problem might lie in the movement nodes in the Unit blueprint. Either in Decide whether to Move or to Stop or in Accelerate and Move Pawn along Spline. I believe it is likely that after reaching the end of the spline, the unit loops back to the beginning instead of ending movement. Check the branches here and see if it the movement end conditions are ever met. This is as far as I can go from the information you have given me. Start searching there and come back to me with your findings if you cannot solve it.

          Originally posted by Skulldug View Post
          Hello Monokkel, A few more questions then I can leave you alone..( I hope), how do you start the pawns in jungle raid "awake, and second I need to call a function after the last player pawns turn, where is the best place to do that ?
          Don't worry about asking too many questions, Skulldug. I'm happy to help

          Awake/not awake units in the JungleRaid map are set up by modifying the SortPawnsInInitiativeOrder, which you can see in the event graph of ATBTT_GaemMode_SciFi. Here I add units to initiative only if they are of the player faction. You can change the requirements by altering the condition on the branch there.

          For your second question, I would do this in ATBTT_GameMode early in the ChooseNextPawn event. Compare the faction of CurrentPawn to the faction at index 1 of InitiativeOrder (the next unit). If the CurrentPawn has faction Player and this is different than the faction of InitiativeOrder[1], run your function.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

          Comment


            Thanks for the answers Monokkel, With the enemy units awake your answer to my second question will work, if the enemy is not awake the compare factions will not work because it loops back to player units after the last player pawn, so I am gonna wake everyone !...besides if you are at war you should not be sleeping ! I'm just experimenting for now waiting for your next update, how is that going for you? any way thanks again for your help.

            Comment


              Skulldug: Yeah, my suggestion does not work if the initiative order array only contains one faction, but there are other things you can do. At the end of each unit turn I set its exhausted variable to true. When a new unit is activated I check if exhausted is true for this unit. If it is, I then set exhausted for all units to false and increase the turn counter by one, which signals the start of a new turn. You could exploit this, by adding to the condition I explained in my last post. So if the faction of the current unit is different from the next OR the next unit has exhausted set to true, run your function.

              As for progress on the update, I’m in the last grueling stage of bug fixing, commenting, testing and reimplementation of things like VR and touch controls. You can follow my progress on my trello if you’re interested. The update is more or less finished, and I have run successful multiplayer tests over Steam, but testing and bug fixing takes more time each time I add a new feature. It is close, but the exact time remaining is hard to predict, as I do not know how many issues I will encounter, and thus have to spend time fixing.
              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

              Comment


                Originally posted by Monokkel View Post
                I'm guessin the problem might lie in the movement nodes in the Unit blueprint. Either in Decide whether to Move or to Stop or in Accelerate and Move Pawn along Spline. I believe it is likely that after reaching the end of the spline, the unit loops back to the beginning instead of ending movement. Check the branches here and see if it the movement end conditions are ever met. This is as far as I can go from the information you have given me. Start searching there and come back to me with your findings if you cannot solve it.
                Thanks for the info, but I didn't manage to solve it. You can replicate the issue easily by giving the AI more than 2 action points, at which point it begins looping until is down to 1 AP (at least most of the time). I am going to have to do a major AI rewrite regardless since the weapon system is very different, so I'm going to continue tweaking with it. If you have any ideas on where to start solving the AI move issue, I'll appreciate help since it allows me to concentrate on other issues, such as getting the AI logic to a point where it can use the weapons as well.

                Comment


                  Monokkel Can you tell me where AI movement is handled in the Scifi game mode? I've tried debugging the movement issue by setting breakpoints in Skill_move, but it never breaks on AI turns. I've found that with > 2 action points available the AI starts its run-loop while in the skill-evaluation loop in the Scifi AI Controller, but I can't seem to pinpoint the place where movement is handled.

                  Comment


                    Monokkel fantastic addon/Template! holy cow mate you have opened my eyes! I know basically nothing about UE4 so this has been an exciting purchase. keep it up!!

                    Comment


                      Haukifile: I never did any testing of units with more than 2 actions points in the SciFi example map when I made the previous version, so I'm not surprised that there are some issues. The example map was made to emulate an XCOM-style game, where they have only two actions, and I used the label Action Points to be able to expand upon in the future. In the WIP version multiple APs for AI works, but I have changed it so heavily that I cannot immediately say what you need to change in order to have the AI correctly use >2 AP in the current version. I will look into it, though.

                      As for where movement is handled in the SciFi map, that is within each individual skill. Each skill includes calculating movement for the AI, in order for it to determine the best tile in move range to use a skill from. Thus, you want to add break points to the specific skill the AI is using (laser, grenade etc.). The move skill is only used by the AI its enemies as so far away that it cannot reach them with any other skills.

                      Stormoffires: I'm happy to hear your first impressions are good! I've tried to make the toolkit as easy to understand as possible, through comments and my tutorials, but the scope of the toolkit means it is still pretty complex and can take time to understand fully. If you are new to UE4 I recommend going through Epic's official blueprint tutorials before moving on to working with the toolkit. I hope it helps you make a great game
                      The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                      Comment


                        Hi all! I've integrated this great system into a game I'm workikng on. This game up to this point has been using 'SimpleMoveTo' to move the player and AI around the map. My goal is to utilize ATBTT for combat, and utilize simple move functions like 'SimpleMoveTo' for navigating cities and such when not in combat.

                        To merge my game and ATBTT I created a new project specifically for ATBTT and migrated my blueprints into that project thinking I would have an easier time acclimating my blueprints to whatever environment is setup by ATBTT. Unfortunately now I can't get any of my AI or Player's to move using blueprints utilizing Simple Move. Even if I replace the Game Mode and player controller with my versions, and replace the Units with my Player and NPC pawns so no ATBTT blueprints are factored in. I have of course made sure there is a nav mesh (cause I know the grid doesn't generate one by default) and still my home brewed stuff just won't work in this environment even if I'm not using any of the blueprints for ATBTT.

                        I've also ensured that any mouse click inputs in my blueprints now are looking for the inputs set for ATBTT. My pawns appear to be getting the orders to move, and the coordinates of where to move they just don't. They report the error. Warning 'SimpleMove failed for ATBTT_PlayerController_C_7: movement not allowed'

                        Is there a project or world setting that is preventing my characters from moving now? Any insight into this would help.

                        UPDATE:

                        I figured it out. The camera is auto possessing pawns making it impossible to possess the pawn after that... apparently. This seemed odd and I'm delving into further but disabling auto possess fixes this. Of course this breaks the camera but I'm sure I can find a way to make this work without the camera auto possessing.
                        Last edited by ScottyBoomBotz; 01-19-2018, 01:42 PM.

                        Comment


                          An update for everyone waiting for the next ATBTT version. The next version will be released when UE4.19 (which just got its first preview) is released. The update is far enough along that I'm confident it will be ready by then. That means that for anyone who has spent a lot of time working with the current version and do not want to convert their project, the curent version will always be available through the launcher with the 4.18 version of UE4. Converting this version to 4.19 seems to work flawlessly, but if there are any conversion issues for future updates I will do my best to resolve them.
                          The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                          Comment


                            I just wish i could give you more money for the next version Would happily pay the same again!

                            Comment


                              elec2ron: Don't give me any ideas I've probably put as much work into this update as I did the original release of the toolkit. I'm considering perhaps having a minor price hike some time after releasing the next update, but there will never be any extra costs for anyone who has already bought the toolkit, whether you like it or not
                              Last edited by Monokkel; 01-19-2018, 06:44 PM.
                              The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                              Comment


                                First off, first time posting, been quite busy, meddling around with the toolkit. (Absolutely god like work Monokkel, great job, great buy)

                                I've created a basic map with some extra meshes, and the ramp from the jungle scifi tutorial.

                                My problem is that on the ramp, the characters are always standing straight (rather than leaning / tilting) and I can't seem to debug this.

                                I have one level of height map with 300 height between levels every time. The characters, both custom and ones from both templates (basic and scifi) don't want to stand angled but always straight up.

                                Wondering if I could get any extra help here since im out of ideas.

                                Comment

                                Working...
                                X