[SUPPORT] Advanced Turn Based Tile Toolkit

Depends on what you mean. If you mean controlling single-tile squads of units like in Civ, that can be done easily. If you mean that you move one unit and the rest follow instantly in a line then it can be doable with some work. If you’re talking about multiple units doing various actions in parallel, then that would be very difficult to add in the current build, but I’m experimenting with stuff that could make this done more easily in the future.

1 Like

Hi ,

I’ve been playing around with ATBTT for about a month now and have been making a lot of my own custom tiles and units. I’m really happy with this framework to help me get started with my game, so thank you so much for all your hard work.

My question is about units climbing ladders, jumping off edges, and vaulting over walls. I searched this forum thread and found a couple times you talked about these things and it sounds like your hands are tied from adding these features due to animations. In my case, I’ve already created the animations for these actions for my units, but I’m not totally sure where to get started on the blueprint end.

What’s a good way to tell the Grid Manager that there is a ladder that connects one square to another square? Or that short walls can be vaulted over? Maybe under the Generate Gameplay Grids function?

How do I communicate to my unit when it’s time to start playing the climbing, vaulting, or falling animation? Looking at Unit’s function Accelerate and Move Pawn Along Spine, I can see how the unit moves, but not how to detect if it’s moving up or down.

I’ve only just started with editing your blueprints and could use some guidance. Thanks!

@jeremykeller : Apologies for the late answer. Christmas traditions in my family are quite time consuming. Climbing ladders etc. is something I’ve wanted to add for a long time, but I’'ve indeed been limited by a lack of animations. I will be adding it at some point, with some horrible placeholder animations probably, but I’ve prioritized other features first. For telling the GridManager that a ladder connects two tiles you can use the AddEdgeBothWays function in BP_GridManager with the two tile indexes as input. This will allow you to move between them. After this all that remains is animation.

Animating movement in the base toolkit is pretty basic, with a walk/run BlendSpace driven by a float variable which also controls movement speed. For changing this animation to be determined by various obstacles in the way you would have to be a bit creative, and though I’m sure there are many ways to do this, animation is not something I’ve worked that much with, so you might be better off asking in the animation subreddit, but I’ll give you some ideas to get started.

You would start at the AccelerateAndMoveUnitAlongSpline function in BP_Unit. You would want to add some branches/switches so that you can prevent the default animation and movement along the spine from triggering if needed. For detecting that you should transition to a climbing animation you could possibly use collision boxes attached to your ladder actors. If overlapping you would switch to a climbing animation and maybe follow a custom spline component contained in the ladder actor before switching back to the regular movement spline at the end of the ladder spline.

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.

Just bought the kit, and I’m loving the possibilities of it! Here are some things I wanted to implement:

-Base building before the game starts
-Ability to place/remove tiles in-game (builder/ engineer class)
-Xcom style persistent characters

I’ve looked at your Trello and tried to sift through this thread, but I figured you might be interested in what sort of stuff people are doing with your kit. It looks like you have an update coming in the near future? I’m guessing I should hold off on messing with any Blueprint stuff til then (fairly new to UE4).

Almost forgot to ask, how would you do a chainlink fence in ATBTT? As in a wall that blocks movement, but not vision or shots? I tried messing with the different wall tile types and none seemed to give the desired effect.

Always love to hear what people are doing with ATBTT. The next update is coming soon, yes. It is feature complete and I am in the process of bug-fixing and commenting for the most part. The new update makes a lot of changes to the toolkit (enough that I will need to replace most of my tutorial videos), so since you are starting out now it would probably be wise to build your game on the coming update. That is not to say you cannot mess around with the current version. Most stuff you add to the current version should not be too hard to reimplement in the new version with some adjustments, though you would not be able to simply copy stuff over and expect it to work.

As long as the collision of the mesh does not block RangeTrace units will be able to attack/see through it. If you are using the procedural WallTrace method in BP_GridManager having the meshes block WallTrace will prevent units from walking through them. If your chain link fence actor is of the tile class you will also be able to block walkability by modifying the edge costs in the tile’s public variables and setting blocked directions to cost 0.

I was messing with trying to get procedural maps to work in the kit, and I had it for a minute and then something changed. In fact, I’m pretty sure it was working fine, and then after hitting PlayInEditor a few times, it randomly starting giving me Infinite Loop errors. It’s weird that it’s so inconsistent, because it occasionally coughs up different errors even though I haven’t changed anything.

What I did was add a section before Activate Grid Manager in the Gamemode (like you mentioned in the store thread) that fired an event to build my meshes. Worked fine for a bit. If it will let me post pics, here is the main error, and here are my settings for the Grid Manager as well:

Odd. Try adding a tick of delay after spawning your custom meshes and before activating the grid manager. When spawning actors it seems the engine sometimes need a tick to fully access the newly spawned actors.

Still not working, now it’s throwing “Accessed None” errors left and right too. If this is a thing that will work better with the next update, I’ll wait around for that.

This is not something that should work differently in the current version. When you spawn meshes before activating the GridManager I see no reason why the GridManager should treat these meshes any differently than ones that were placed before launching the game.

I just tested this out myself. I made a new actor that simply consists of a scene component and a static mesh with collision set to block WallTrace. I spawn this actor right before activating the grid manager (without a delay), and it affects walkability just as if I had placed it beforehand (I have TraceForWalls enabled in BP_GridManager). Could you tell me about how your SpawnBuilding function works?

My SpawnBuilding is an Actor BluePrint that goes through a few arrays and spawns static meshes and/or other blueprints made of static meshes. I set the BP to activate on a custom event that’s launched from the GameMode BP (that screenshot in the previous post) so I know it’s happening in the right order.

Now it seems to be working, I remade the whole scene in a new Level and while it works, it’s still throwing errors in the log left and right. All “Accessed None” things.

Also, it only works if the grid is set to Heirarchical ISM, if I set it to use Instanced Static Meshes it won’t work at all. The game will start, but my characters won’t be selectable/ movable.

ok, good that you’ve got it working, at least. As for the errors, are you sure these are not made by your function? Try breaking the connection at the complete of your loop and see if you still get the errors. If not, could you post the errors so I can figure out what is happening?

No idea why the HISM/ISM distinction should matter. It really shouldn’t since they are just for visualizing the grid. Collision is handled by the CollisionPlane. There is little reason to use ISMs over HISMs, thankfully. I’ll try to figure out what might be causing this nonetheless.

I’m not sure what you mean about disconnecting that function, because then the GridManager will never be activated, so I didn’t try that yet.

But in the pic below, the top group of errors is what I get if I start the game, and immediately exit it without actually doing anything.
The lower one is if I actually play through the scenario (2 player units vs 3 enemy units, enemies won). It does work in game just fine though, which is weird I guess.

If you want, I could upload the game or something, but other than adding those Blueprints to spawn the buildings, I haven’t altered anything.

Greetings !

I have watched quite a bit of your tutorials and read through several pages on this thread looking for an answer but was unsuccessful so I apologize if this is repetition.

First off I am a beginner.

Currently I am rather stuck with trying to manipulate the grid manager, or the pawn actors I’m not really sure which is the correct approach, to force movement along a specific path. Think of the world map for final fantasy tactics where there are roads drawn connecting cities where each battle then takes place. My idea was to use a single over-world map with all of the laid out cities that tie into battle ground maps that are loaded separately as sub levels. Currently I am unable to get the pawns to move in a manner that would be consistent with a select -> move-to, style.

I attempted to restrict movement by placing walk-able tiles in a line (similar to what you showed us at ~4 minutes into your second tutorial) but even with the max/min movements set they still “walk” one tile at a time and this isn’t the desired result. I want to force the player to move from city to city only on the over-world when they make their movement decision. I have been unable to find a way around this issue.

What I meant was indeed to not run ActivateGridManager or any later function to rule out whether the errors were caused by your own function. But looking at the errors it seems unlikely that is the case. Do you still have the delay node before activating the grid manager? I’m guessing these errors might come from the player controller trying to access the GridManager before it has been activated. If you have such a delay, remove it and see if it disappears. If you don’t, or if you still get the errors, you can send me a copy of your project at knuteiliv@gmail.com. Do not include the Saved or Intermediate folders and zip up the rest.

I tried your suggestions, and removing the Delay node actually got rid of the errors completely. I still have to do some more testing to see if the grid is being applied correctly, but it looks good so far.

Separate issue: how do you change the Transparency Threshhold on the HA_Wall object? I’m using it with custom meshes and it works well as far as becoming transparent when the mouse cursor is behind it, but I’d like it to only change when it’s closer to the camera than it is currently.

Hi,

Have been looking at your height map example map, i see you are using decals and am wondering how you are able to stop the decals punching through to the levels below or above?

Edit. Ah, so you set everything to not receive decals except for the HISM?

Yep, nothing more fancy than that. This can of course be impractical in some cases where you want to use decals for decoration on surfaces that are close to walkable terrain, but I have not found a good way to get around this.

Thanks, although i must be missing something as i still cant see how it works. The concrete platform blueprint has receive decals on so as i understand it the decal should punch through to the platform below, but it doesn’t.

Trying to get the same behavior on my own map but no luck so far.

Edit. Ah i see you can control the distance the decal projects with the x scale.

I’ve been messing around with the HA_Wall actor and made versions for floors/ceilings/etc. It gets pretty messy when it comes to having multiple floors. I have a two story building made of these actors, but once a unit is on the second floor, it’s almost impossible to get the target cursor to select an area on the first floor. I have a suggestion that might help with this:

Add a function to cycle through “layers” of the level, based on their location height. Similar to the way you have automated cover on the SciFi map example, but make it so for example PageUp and PageDown cycle through the the layers of the map, while making the rest transparent. Or, disregard the transparency (as we can easily enough set that up already), and just make the targeting cursor locked to the current layer.