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.
Announcement
Collapse
No announcement yet.
[SUPPORT] Advanced Turn Based Tile Toolkit
Collapse
X
-
Originally posted by KitatusStudios View PostAre 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.Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Originally posted by Monokkel View PostThey 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.
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 anymoreLast 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 PostThe 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 anymoreAdvanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
Comment
-
Originally posted by Monokkel View PostYou 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.KITATUS
"Information shouldn't be behind a paywall, It should be free for all!"
Comment
-
Originally posted by KitatusStudios View PostWouldn't be faster in just replugging the "Self" nodes? Or did I read your post wrong? :SAdvanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
Discord
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 PostAh, I see what you mean. What an annoying bug.
Originally posted by MonkeyPants View PostAnother 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?
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):
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:
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:
And this at the end of the pathfinding function:
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 PostSomething 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.Last edited by Monokkel; 05-17-2015, 10:24 AM.Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
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
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.Advanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
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 nowLast edited by Hinato; 05-18-2015, 04:43 PM.
Comment
-
Originally posted by Hinato View PostThanks 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 nowAdvanced Turn Based Tile Toolkit (Marketplace - Support)
Dungeon Crawler Toolkit (Marketplace - Support)
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?
Comment
Comment