Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Hello, I've just bought this tool kit, as it's what I think, the best starting point for my ideea and I would like to thank you for creating it.
    Now, I've done a bit of testing around , so fo the next few weeks, I will probably be everyday on this thread asking for your help in solving my noob problems. So, first issue I have, and I'm wondering if anyone else came across it , it's that when I'm trying to export a blank new , fresh project ( fresh as in it's just this toolkit in there, nothing else done or modified ) , I get a error in the packing procces ( here is the link http://s000.tinyupload.com/?file_id=...41819716128527 to download a txt fille with the whole log in there ). The project packing settings were : distribution, windows 64bit.

    Thanks for any ideeas you might have, this is a no rush problem, but it would be nice to know it can be fixed before I spend a long time over something that can't be packed.

    Comment


      Hello, I've just bought this tool kit, as it's what I think, the best starting point for my ideea and I would like to thank you for creating it.
      Now, I've done a bit of testing around , so fo the next few weeks, I will probably be everyday on this thread asking for your help in solving my noob problems. So, first issue I have, and I'm wondering if anyone else came across it , it's that when I'm trying to export a blank new , fresh project ( fresh as in it's just this toolkit in there, nothing else done or modified ) , I get a error in the packing procces ( here is the link http://s000.tinyupload.com/?file_id=...41819716128527 to download a txt fille with the whole log in there ). The project packing settings were : distribution, windows 64bit.

      Thanks for any ideeas you might have, this is a no rush problem, but it would be nice to know it can be fixed before I spend a long time over something that can't be packed.

      Comment


        Hello strezoiu and welcome to the thread From your error file it seems like you are trying to package the project using blueprint nativization (blueprint to C++ coversion), but that you do not have Visual Studio installed. If this is correct, try installing visual studio and try again.
        Advanced Turn Based Tile Toolkit (Marketplace - Support)

        Dungeon Crawler Toolkit (Marketplace - Support)

        Discord

        Comment


          Originally posted by Mewbits View Post
          Yes, before I made this example project, I deleted my local content and downloaded a fresh new version of the toolkit, to make sure it was the most recent version. Then I made the changes within it. It's the same project I sent you over email.
          Okay, I'm back and have checked the files you sent me. This is a bug (kind of), that I've already fixed in the coming update. It was caused by the two different "Find Visible Pawns/Tiles Step 2" functions nested in Find Tiles In Range. Since you unchecked "check visibility" it used the simpler function, which does not have branches for minimum range. This problem should disappear with the new update, but if you want to fix it before then, here are the changes you will need to make:

          Click image for larger version

Name:	Y1TLq6u.png
Views:	1
Size:	193.2 KB
ID:	1122668

          Click image for larger version

Name:	EkUpa0P.png
Views:	1
Size:	117.5 KB
ID:	1122669
          Advanced Turn Based Tile Toolkit (Marketplace - Support)

          Dungeon Crawler Toolkit (Marketplace - Support)

          Discord

          Comment


            Hey Monokkel. How would I make the path spline pathfind around obstacles. For instance if I have a forest tile, full of tree meshes, or other obstructions, it would obviously look really bad to have units pass right through trees.

            Additionally, if I have other tiles with specific points where I want the unit to go stand when it moves there. Like a trench, where I have some predefined splines leading to cover points from where the tile can be entered, how would I make the pathfinding spline switch to that for the final tile move so the unit ends up where I want it on the final tile?
            Anime Shading Model - Twitter

            Comment


              Originally posted by Selentic View Post
              Hey Monokkel. How would I make the path spline pathfind around obstacles. For instance if I have a forest tile, full of tree meshes, or other obstructions, it would obviously look really bad to have units pass right through trees.

              Additionally, if I have other tiles with specific points where I want the unit to go stand when it moves there. Like a trench, where I have some predefined splines leading to cover points from where the tile can be entered, how would I make the pathfinding spline switch to that for the final tile move so the unit ends up where I want it on the final tile?
              What you're asking is a bit outside my are of expertise, as I've only worked with splines enough to get the result I wanted, but I'll do my best to help. I've experimented a bit and made something that works close what I believe you intend with your trenches.

              First I've created a child of Grid_Actor called GA_Trench which contains a spline representing the trench (and a static mesh just to show the end of the spline for demo purposes). Here are the components of the actor:

              Click image for larger version

Name:	qmq06ld.png
Views:	1
Size:	526.5 KB
ID:	1122688

              Then at the end of the movement of Unit_Parent I check if the tile the unit ended on contains a trench (I do this in a very simple way. Replace with whatever method you prefer). If it does I set the Unit Path Spline to the spline of the trench actor and restart movement. I do a few tricks here to make sure everything behaves correctly.

              At the end of movement (the execution pins that exit this screenshot connect to what was previously corrected to the Decide Action After Move custom event):
              Click image for larger version

Name:	fme9MNy.png
Views:	1
Size:	216.6 KB
ID:	1122689

              A small change to the start of movement in Unit_Parent, right after where Unit Path Spline is normally set to the spline found in BP_GridManager. This enables the first point of the spline to be the current location of the unit instead of the center of the tile it occupies:

              Click image for larger version

Name:	DA0GpSb.png
Views:	1
Size:	250.4 KB
ID:	1122690

              Another small change to make sure the location of the unit is not automatically set to the center of its current tile when movement ends:
              Click image for larger version

Name:	Z8AZYRp.png
Views:	1
Size:	214.2 KB
ID:	1122691

              There is a lot of room for improvement, but I think this should be enough to get you started. For moving around tree meshes within a tile you could possibly do something similar, with splines in the tiles coming from all possible entrance points, custom placed to avoid the trees. In this case you would have to detect that you enter a tile midway through movement, switch to the other spline and then switch back. I imagine there are ways you could also modify the path spline before movement starts by checking along the spline and see if it overlaps any actors, at which point you add additional spline points avoiding these obstacles, but here I cannot give you more than guesses on how to go forward. You could also keep the path spline as it is and have a collision sphere surrounding the unit. If the collision sphere collides with a tree you would offset the location of the unit a certain distance from the spline to the left or right vector of the spline at the spline distance the unit currently occupies (built into the Accelerate and Move Pawn Along Spline function). This might be the easiest, actually. I'll leave you to experiment, but if you become stuck I can give this another go.
              Advanced Turn Based Tile Toolkit (Marketplace - Support)

              Dungeon Crawler Toolkit (Marketplace - Support)

              Discord

              Comment


                Ah thank you, that will definitely help me when I get to working on that.
                Anime Shading Model - Twitter

                Comment


                  Originally posted by Selentic View Post
                  Ah thank you, that will definitely help me when I get to working on that.
                  Best of luck when you get there!
                  Advanced Turn Based Tile Toolkit (Marketplace - Support)

                  Dungeon Crawler Toolkit (Marketplace - Support)

                  Discord

                  Comment


                    Changing unit attributes based on Actor level

                    Hey there.

                    I'm trying to set up a system that allows the player to go from normal 3rd person world exploration to the turn based combat mode. However, I want to set it so that the combat unit's attributes are determined via a character reference by variables from the 3rd person actor rather than innate to that unit. (So that those attributes will change in accordance with a leveling system that actor has.)

                    The problem I've run into, is that whenever I try to set up a function that will set the combat unit's attributes to equal the non-combat actor's...(like so)
                    Click image for larger version

Name:	questionexample1.PNG
Views:	1
Size:	267.0 KB
ID:	1122763

                    This happens. (Ignore the resolution.)
                    Click image for larger version

Name:	questionexample2.PNG
Views:	1
Size:	253.3 KB
ID:	1122764

                    I cannot move or attack with any of the units.

                    And when I stop testing, I get this error message.
                    Click image for larger version

Name:	questionexample3.PNG
Views:	1
Size:	147.4 KB
ID:	1122765

                    So in short, is there a way of making a units attributes by consistently determined by a separate actor's variables and not it or it's parents? And if so, how can I do this?

                    Comment


                      Hi onewingedcaius! It seems like you have not set up your reference correctly. How are you determining what actor is referenced in Character Reference? References need to be set up to point to a specific actor, in case you are not aware.
                      Advanced Turn Based Tile Toolkit (Marketplace - Support)

                      Dungeon Crawler Toolkit (Marketplace - Support)

                      Discord

                      Comment


                        Here's the rundown. The combat unit is set to run the "Set Stats" function right after Event BeginPlay.
                        Click image for larger version

Name:	questionexample4.PNG
Views:	1
Size:	322.9 KB
ID:	1122774

                        The event Stats function uses the variable "Character Reference" that calls back to me "PC_Parent" blueprint to set all the combat_unit stats equal the the "PC_parent"'s current stats.
                        Click image for larger version

Name:	questionexample5.PNG
Views:	1
Size:	427.6 KB
ID:	1122775

                        The PC_Parents stats are all integer variables found here.
                        Click image for larger version

Name:	questionexample6.PNG
Views:	1
Size:	307.1 KB
ID:	1122776

                        I would think it would work okay, since I seem to be able to get the variables from PC_Parent inside the SetStats function okay.
                        Click image for larger version

Name:	questionexample7.png
Views:	1
Size:	726.8 KB
ID:	1122777

                        Yet for some reason it still gives me the same error message.
                        Last edited by CaiusNelson; 02-08-2017, 10:11 PM.

                        Comment


                          Originally posted by onewingedcaius View Post
                          Here's the rundown.
                          I can't see where are you setting Character Reference value because it looks like you forgot to do so. You need to set it up in level editor or on begin play event.
                          Last edited by tutkarz; 02-09-2017, 06:31 AM.

                          Comment


                            [MENTION=575837]onewingedcaius[/MENTION]: tutkarz is correct. You have set up the reference to reference your character actors, but you have not specified what specific actor to get the variables from. As it stands Unreal has no idea how to choose from all the potential characters placed in your game. There are several ways to get a reference, and the best one depends on what you're doing. If there will never be more than one of a certain actor in the world I often use Get All Actors of Class and get index 0.

                            For getting references to units in ATBTT, the pawn array is useful. You can use traces and collision to check find actors in certain locations or loop through all actors of a class and search for one that meets a certain criteria. In any case you will need to tell UE4 to reference a specific actor. In your second screenshot you can see that Character Reference in Default Value is set to none, so you will need to change that either directly or through code. Event Begin Play, as suggested by tutkarz is what I often use myself.
                            Advanced Turn Based Tile Toolkit (Marketplace - Support)

                            Dungeon Crawler Toolkit (Marketplace - Support)

                            Discord

                            Comment


                              Hey [MENTION=4318]Monokkel[/MENTION] I'm pretty sure I've solved the issues with pass through friendlies breaking, the pathfinding over ticks command in the ai controller under search behind friendlies needed to be set to not continue from last pathfinding in addition to the other changes, as otherwise units that were believed to be in range due to being able to pass through friendlies would not be able to search and find the player unit, as it had already been found, or something like that, I'm not quite sure.

                              Either way it appears to work now, that just leaves this, which isn't gamebreaking, but results in the ai making very inefficient moves when it gets crowded. Do you have any insight into what it would take to solve this?

                              Originally posted by Selentic View Post
                              Thanks for the help!
                              Unrelated to this and not game breaking, pass through friendlies pathfinding currently overlooks ideal tiles in some instances. For example:



                              The circled unit just moved, and stopped on the space it's currently sitting on. While you can't see it in this image, offscreen to the left a couple spaces is a player unit that it was attempting to path towards. The path line is where I'm guessing the pathfinding tried to direct it, but since the end space was occupied, it stopped where it did. However, it could have easily gone to the empty space marked by the arrow instead, and ended its turn closer to its target.
                              Anime Shading Model - Twitter

                              Comment


                                Ok, if that was the reason for the error it is already fixed in the coming update. There are other problems associated with the Search Behind Friendlies part of the AI controller that are caused by the AI reaching its max search range and stopping and then having the search behind friendly units part of the pathfinding reach tiles that have already been searched (a bit hard to explain :P). Because of this I've changed it so that if no enemy units are found during the first search, the entire pathfinding will restart from the beginning with Pass Through Friendlies set to true.

                                Could you give me the repro steps for the issue you are still having? I'm not absolutely sure how to set things up like your example as the target player unit is not visible and I do not know which of your custom tiles are impassable/have higher costs.
                                Advanced Turn Based Tile Toolkit (Marketplace - Support)

                                Dungeon Crawler Toolkit (Marketplace - Support)

                                Discord

                                Comment

                                Working...
                                X