[SUPPORT] Advanced Turn Based Tile Toolkit

For sure! I will have a look around at my changes and let you know anything else I come across in the future.

Thanks!

Any plan to switch to Math Expressions within the toolkit now that they are going to be at least 2x the speed? :wink:

@ : Ended up rewriting all of the Hex Grid portion of ā€˜Get Indexes in Rangeā€™ to use Math Expressions instead of singular nodes. Tested, verified, and much faster considering my use case for it. Let me know if you want it for the update and I will send it over.

Hey, I planning to do just that :slight_smile: Good to hear it did in fact make it faster. Sure, it would be great if you could send it over. Will save me some time.

Yes I know that it could be done with some grid math, but thinking of a next multi-level grid implementation I thought it was better to get pawns through sphere traces (if I have two units, one above and one below a ladder I could get both of them with a sphere trace).
And about the performance I can say that result is not heavy as it seems.

@Wisdom-: For your use case I can see that making sense I guess. Although you could also use Max-Z-Distance to accomplish the same thing (per your example). If you are doing multiple grids for say a ā€˜rooftopā€™, you could create a component tag on the CollisionPlane for a Child BP_Grid_Manager and do the initial line trace to collide with whichever CollisionPlane has that tag as well.

Lots of ways to do it, but I would say stick with what you know works :slight_smile:

Both soloutions sound good. When I begin working on multi-level grids Iā€™ll probably be using grid-math due to personal preference, but Iā€™ll be checking out multiple solutions.

@: Iā€™ve tested out your math expression, by the way. There was a slight speed improvement, though a bit less than what I had hoped for. I used a sight range of 40 tiles (as a sort of maximum reasonable case), and here the Get Tiles in Range function saw roughly a 10% speed increase. When running the entire Find Tiles in Range function the total gain was about 3%. Thatā€™s still enough that I think itā€™s worth implementing, though. Iā€™m all about opimization :slight_smile:

Glad to be of assistance! I was hoping for roughly 2x speed increase as they stated in the 4.9 patch notes, but any speed increase is awesome!

Yeah, thanks man! I didnā€™t expect it to be twice as fast, as that would be the case if the entire function could be converted to a math expression. It would have to be some fraction of that, and it seems that there are other parts of the function that are much slower than the pure math parts.

Hey - Is there any plans for a price hike to the Pack?

Just curious as - I am wanting to buy this but I am short on money until payday. :\

Hi HeadClot! Iā€™m considering increasing the price at some point, but that wonā€™t be until Iā€™ve added several more of my planned features. With the time it takes to make this stuff you should be very much in the clear to your next payday :slight_smile:

Thanks for the info .

Glad to hear that it will be a while before the price hike. :slight_smile:

Hi !

Iā€™ve tried to use your function (and thank you for posting that) but Iā€™ve found a strange issue.
After spawning the actors, I can see that Custom Grid Anchor component and SkeletalMesh are located in different places!

Maybe below screenshot can explain the situation better (my pawns are the green ones):

I cannot understand why it happens. Below is my Blueprint where I call the Spawn Functions (and function is the same of yours).
Please notice also that Iā€™ve added the anchor function of the Grid Manager otherwise also the anchors will be outside of the map (and I cannot move any unit) :

Can someone help me?

It seems I forgot to add one thing to the Spawn Unit function. It actually has nothing to do with the grid anchors (so you can remove that bit). Iā€™m guessing your grid manager is not placed at location 0,0,0? The reason youā€™re having this issue is that the function is not taking the location of the grid manager into consideration when spawning units, and thus the function only works if the grid manager is zeroed out (I really should stop testing with the grid manager placed at 0,0,0 as I keep making this mistake :stuck_out_tongue: ). Add this to the function to make it grid location agnostic:

To explain further the grid manager thinks the units are at one location, since the pathfinding and other functions are already made to take the Grid Managerā€™s location into account. The Vector Field Arrray hold vectors that store the location of tiles relative to the grid, so when you spawn a unit directly from a vector from this array it will show up in the wrong place if the grid manager is not zeroed out.

Hi,
is there a way to change it so the grid manager has less spacing/no spacing between the tiles?

Hi eviltenchi, there isnā€™t actually any spacing between the tiles (in terms of the undelying blueprint logic). The reason there seems to be spaces between the tiles is just because of the meshes Iā€™ve chosen. Use flat planes for the default tiles or increase the scale of the Tile In Move Range and Tile In Sight Range meshes and you can lessen/remove the space between them.

Thank you for the precious help, it works perfectly now.

Youā€™re welcome!

Good to hear! Sorry that I missed it the first time.

@ - Do you have an ETA on when you release a 4.9 version? With the infinity blade collection released it looks like there are a lot of really nice assets that I would like to import into the tool kit to spice up the appearance.

That stuff looks awesome! Theyā€™re a fantastic fit for the toolkit too! The next update is stille some ways to go, but just convert a 4.8 project to 4.9 and it should still work. There are some errors in the log, but they are inconsequential.

Iā€™ve sent a minor update to Epic that makes the toolkit fully updated to 4.9. The 4.8 version worked fine in 4.9, but now it should give no errors in the log. The large content update is still being worked on. Here is the changelog of the new, minor patch:

v1.43 (being processed by Epic)

  1. Changed all Set Visibility nodes of markers to Set Marker Visibility Functions to prevent an error in the log.
  2. Removed Clear all Instances from the Clear range array, reachable pawns array and path meshes collapsed graph in the Find Tiles in Range function in BP_GridManager to prevent an error in the log.
  3. Changed all Get World Location/Rotation And Distance Along Spline nodes to the newer Get Location at Distance Along Spline (with coordinate space set to ā€œworldā€) nodes.
  4. Removed unnecessary cast in HUD_Faction_Turn and changed the name of Tile Spawner 2 to Grid Manager Ref to make it consistent with other blueprints.
  5. Replaced the landscape in the landscape example level as it was having some collision issues.