Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

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

    Are your tiles actually showing up the 4.8 preview? I'm digging around in the construction script but I'm assuming it's something they've done to instanced static meshes internally which has changed how they work; As I can't see anything wrong in the construction script.
    KITATUS
    "Information shouldn't be behind a paywall, It should be free for all!"

    Comment


      Originally posted by KitatusStudios View Post
      Are your tiles actually showing up the 4.8 preview? I'm digging around in the construction script but I'm assuming it's something they've done to instanced static meshes internally which has changed how they work; As I can't see anything wrong in the construction script.
      They showed up when I tried it out yesterday, at least. Try changing the Default Tile Object in BP_GridManager to Static Mesh and see if it still doesn't show up. If it does not there is probably something else that is wrong.
      The Advanced Turn Based Tile Toolkit (Marketplace page - Support thread - Discord)

      Comment


        Originally posted by Monokkel View Post
        They showed up when I tried it out yesterday, at least. Try changing the Default Tile Object in BP_GridManager to Static Mesh and see if it still doesn't show up. If it does not there is probably something else that is wrong.
        The default tile didn't do it; I'll try digging and see what's going on.

        Edit: I noticed after Migrating into a different project in 4.8, The child BP's default Sm's are empty (Even if you create a new Child BP)

        Edit Edit: Tile_Parent has another cast in 4.8 which you don't need anymore
        Last edited by KITATUS; 05-15-2015, 10:56 AM.
        KITATUS
        "Information shouldn't be behind a paywall, It should be free for all!"

        Comment


          Originally posted by KitatusStudios View Post
          The default tile didn't do it; I'll try digging and see what's going on.

          Edit: I noticed after Migrating into a different project in 4.8, The child BP's default Sm's are empty (Even if you create a new Child BP)

          Edit Edit: Tile_Parent has another cast in 4.8 which you don't need anymore
          Thanks! Don't know the reason for the migration stuff. I'll add removing the cast in Tile_Parent to the list. I've found a couple of new problems too. Some of the changes seem to be reverted once the project is saved. The references to self in Unit_Parent are unplugged each time. You can get around this by casting self to Unit_Parent, but this should be unnecessary and gives a warning. It does work as a workaround for now, though.
          The Advanced Turn Based Tile Toolkit (Marketplace page - Support thread - Discord)

          Comment


            Originally posted by Monokkel View Post
            You can get around this by casting self to Unit_Parent, but this should be unnecessary and gives a warning. It does work as a workaround for now, though.
            Wouldn't be faster in just replugging the "Self" nodes? Or did I read your post wrong? :S
            KITATUS
            "Information shouldn't be behind a paywall, It should be free for all!"

            Comment


              Originally posted by KitatusStudios View Post
              Wouldn't be faster in just replugging the "Self" nodes? Or did I read your post wrong? :S
              They are seemingly automatically unplugged every time I close Unreal Engine. Is this not happening in your toolkit?
              The Advanced Turn Based Tile Toolkit (Marketplace page - Support thread - Discord)

              Comment


                Originally posted by Monokkel View Post
                They are seemingly automatically unplugged every time I close Unreal Engine. Is this not happening in your toolkit?
                Ah, I see what you mean. What an annoying bug.
                KITATUS
                "Information shouldn't be behind a paywall, It should be free for all!"

                Comment


                  Another quick question:
                  How can I allow characters of the same faction to walk and see through each other without being able to walk and see through the enemy faction?

                  Comment


                    Something that might be worth looking into is adding the ability to place/reshape squares along a spline. (Thing a 1cm wide ribbon that gets sliced edge to edge every 1cm.) By allowing this, your project could be extended to basic board games and allow fast design and iteration of the board.

                    Comment


                      Originally posted by KitatusStudios View Post
                      Ah, I see what you mean. What an annoying bug.
                      Yeah, I'll report it to Epic so that it will hopefully be fixed before the finished update. I think that ends the work I'll do on 4.8 for now, though. I'll try to make my next large feature update coincide with the full 4.8 update.

                      Originally posted by MonkeyPants View Post
                      Another quick question:
                      How can I allow characters of the same faction to walk and see through each other without being able to walk and see through the enemy faction?
                      Achieving this effect is possible, but you need to modify a few things. The main modification has to be done in the "Search And Add Tile" Function. This is a function within the Pathfinding function that designates tiles as walkable or not. Inside this functions all tile indexes that are added to Can Move to Array are set as reachable, while all indexes added to Open List Children are added to the next part of the search step, meaning it is potentially possible to move through these tiles. Here's how it looks unmodified:

                      Click image for larger version

Name:	BS7zMlb.png
Views:	1
Size:	169.1 KB
ID:	1076551

                      As you can see, empty, player, and enemy tiles can all be reached, but only empty tiles can be moved to. By hooking up tiles occupied by players to the branch, these tiles can also be moved through. However, this means that both players and enemies can move through player pawns and not enemy pawns. This is obviously not what you want to achieve. To make what tiles are added depending on the faction of the current pawn you could do something like this (sorry that it's a bit messy):

                      Click image for larger version

Name:	Qw4ulFe.png
Views:	1
Size:	189.8 KB
ID:	1076552

                      Now this works almost perfectly, but there is one serious issue. If you want to attack an enemy in melee, by clicking on it so that you automatically walk up to it and hit it, and there is a friendly pawn right in front of it, the pawn will walk into the tile occupied by the firendly pawn. To prevent this, we have to make sure adjacent tiles to tiles occupied by friendly pawns do not hold enemies before we add them to Open List Children. To fix this we have to add another check and see if the parent tile (the one we are leaving) holds a friendly pawn. The graph begins to get a bit messy at this point, but I hope you can read it. I have to keep it tighly packed to get it all in one screenshot:

                      Click image for larger version

Name:	Dcxqb16.png
Views:	1
Size:	279.1 KB
ID:	1076555

                      The basic idea is to get the index from the parent index (the one we are leaving), which is the second from the top of the four integer lines on the bottom, and check the Pawn Array to see if it is empty. We only want to mark enemies as reachable if the preceding tile does not hold a friendly pawn.

                      Ok, so we're nearly there, but one issue remains. If the current pawn is standing next to a friendly pawn it is not allowed to move through it, because of the rules we just specified. Because of this we have to remove the current pawn from the pawn array before we start the search and add it again when we're finished. Like this pretty early in the Pathfinding Function:

                      Click image for larger version

Name:	0DOZ2N2.png
Views:	1
Size:	156.5 KB
ID:	1076556

                      And this at the end of the pathfinding function:
                      Click image for larger version

Name:	edun5kv.png
Views:	1
Size:	141.2 KB
ID:	1076557

                      Ok, I think that should do the trick. There might be unforseen consequences since I haven't tested it for more than a few minutes. I'm planning to implement a more elegant version of this when I make the Dungeon Crawler example map.

                      Edit: I forgot to mention. If you are using a square grid where all or some troops are not allowed to cross corners you have to also add the same changes to the function "Search and Add Tile Diagonal Cross Corners False".

                      Originally posted by RAVaught View Post
                      Something that might be worth looking into is adding the ability to place/reshape squares along a spline. (Thing a 1cm wide ribbon that gets sliced edge to edge every 1cm.) By allowing this, your project could be extended to basic board games and allow fast design and iteration of the board.
                      Hi RAVaught, I'm afraid I don't completely understand what you mean. Are you talking about building levels in the viewport or at runtime? Could you mention some games that would be possible with this solution that would not with the toolkit in its current state? Perhaps you could draw a very quick mockup in paint, as I'm struggling to visualize your suggestion.
                      Last edited by Monokkel; 05-17-2015, 10:24 AM.
                      The Advanced Turn Based Tile Toolkit (Marketplace page - Support thread - Discord)

                      Comment


                        Hey Monokkel!
                        Quick question: On event X I want to spawn decals (like the movement range (blue) or attack range (red) ones) on specified tiles. For example to indicate tiles where special actions are possible. Also there are actors (snapped onto the grid) on all the tiles that should be highlighted with a decal.

                        To accomplish this I tried using the "Spawn Decal at Location" node. I specified a decal Material, got the DecalSizeSquare (Grid Manager) and put that into Decal Size Input. Life Span is set to 0 for infinite, Rotation is 90, 90, 0.

                        For the Location Input I got the locations of all actors on the tiles that should be highlighted (Get Actor Location), then I got their indices (Function: 'Vector To Index Interface', Grid Manager) and with them the same indices of the 'Vector Field Array' (Grid Manager). I then added the Vector Field Array entry of the specific Index to the Actor Location (sum of vectors) and used this as the Location Input of the "Spawn Decal at Location" node.

                        Unfortunately no decals are spawned. I checked with breakpoints if the blueprint gets to the "Spawn Decal at Location" node and that's the case. It just somehow seems to get skipped.. Any help would be appreciated

                        Click image for larger version

Name:	SpawnDecalAtLocation.png
Views:	1
Size:	162.6 KB
ID:	1076607

                        Edit: Also is there a way to show such a tile decal on all tiles that overlap with a collision box? For example to create an ability that increases movement cost of all tiles in a sphere collision radius?
                        Last edited by Hinato; 05-18-2015, 12:38 PM.

                        Comment


                          Glad to see you're getting creative with the toolkit, Hinato! Seems like you've got a pretty good grasp of things, and as far as I can se there's just one mistake that prevented you from achieving your desired result. You do not need to add the location of your actors to the location you get from the VectorFieldArray, as you're essentially adding the location twice, placing the decal twice as far away from 0,0,0 as you want. Delete the "plus" node and connect the Get output directly to Spawn Decal and it should work. The reason you would want to add something to the output of the Get is if your GridManager is placed at a location different from 0,0,0 in which case you have to add the location of the Grid Manager.

                          However, I cannot help but feel you're overcomplicating things a bit here. If you have already placed actors snapped to the grid where you want the decals to be, why don't you simply get the location of those actors and spawn the decals at those locations directly? I see no need to use the Vector To Index Interface or Vector Field Array in this case, unless I've missed something.
                          The Advanced Turn Based Tile Toolkit (Marketplace page - Support thread - Discord)

                          Comment


                            Thanks a lot! Found another small bug which could have been the problem but at least now I can see the decals..
                            I started out with just using the location of the actor but since I the decals weren't shown in the right spot I tried using the Vector to Index Interface. Right now there are still some problems with the exact location but I'm going to fix that right now
                            Last edited by Hinato; 05-18-2015, 04:43 PM.

                            Comment


                              Originally posted by Hinato View Post
                              Thanks a lot! Found another small bug which could have been the problem but at least now I can see the decals..
                              I started out with just using the location of the actor but since I the decals weren't shown in the right spot I tried using the Vector to Index Interface. Right now there are still some problems with the exact location but I'm going to fix that right now
                              Ok, good luck! I'll be here if you need any more assistance.
                              The Advanced Turn Based Tile Toolkit (Marketplace page - Support thread - Discord)

                              Comment


                                Hi Monokkel,

                                How can I make a Cone Trace that can be used for cover system and also for an overwatch system?
                                I just want to trigger my overwatch event if a unit enters into a pawn view field, like in XCOM Enemy Unknown.

                                I saw that UE4 doesn't have a Cone Trace, but somebody created a similar task by using Sphere Trace:
                                https://answers.unrealengine.com/que...one-trace.html

                                As for Cover System, I've fulfilled an array with all walls position and their "cover" attribute (it's a new attribute, of course).
                                So, after every unit movement, I know if my unit has a wall coverage on his northern, southern, eastern or western closest square.

                                But now I have to increment victim defense if it is under cover. So basically I need to fire a cone trace from the attacker to understand if the attack comes from south, east, north or west, and apply the eventual coverage.
                                Do you or somebody have any idea to achieve this?
                                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

                                Working...
                                X