# \[SUPPORT\] Advanced Turn Based Tile Toolkit

**URL:** <https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930>\
**Category:** UE Marketplace\
**Tags:** unreal-engine, fab\
**Created:** [February 26, 2015, 8:30am UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930 "2015-02-26T08:30:16Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Monokkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monokkel/32/1194496_2.png) [@Monokkel](https://forums.unrealengine.com/u/Monokkel)\
**Post date:** [March 4, 2015, 4:33pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/42 "2015-03-04T16:33:51Z")

</div>

> [@Athidi;237005](#):
>
> Is it possible to not be in combat mode all the time. Like fallout 2. Enemy sees you, then the combat mode starts? 🙂  
> Just bought it. Tried it a little, I managed to produce a bug where the player pawn can enter a tile that is occupied by an enemy pawn.

That’s certainly possible, though the amount of work it will require will differ depending on how you’d want to implement it. The simplest way would be to just modify the initiative order array so that the player character is always on top of initiative when he’s not in combat, meaning he’s the only one moving. While not in combat also make the tiles he can move to invisible and give him a move range larger than what is visible on screen so that the player can move wherever he clicks. When combat starts use initiative like normal and make the blue can-move-to tiles visible again. You’d probably want to add a lot more stuff than that, but that would achieve a lot of the basics.

Alternately you can just use navmesh and something similar to the top down example when not in combat, and when combat starts you could place all pawns on the tiles closest to their location and start combat.

I haven’t encountered the bug you’re describing before. Are you able to replicate it? Is the enemy pawn’s faction set to “Enemy” and not to “Empty”?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_f94b8f95](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_f94b8f95](https://forums.unrealengine.com/u/anonymous_user_f94b8f95)\
**Post date:** [March 4, 2015, 4:56pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/43 "2015-03-04T16:56:02Z")

</div>

Thanks for the quick reply, Ill try out your advice 🙂  
I will also try to replicate the bug for you… You will hear from me if I can replicate it 😛 If not It was probable me doing something stupid.

---

<div class="post-metadata">

**Author:** ![Monokkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monokkel/32/1194496_2.png) [@Monokkel](https://forums.unrealengine.com/u/Monokkel)\
**Post date:** [March 4, 2015, 8:50pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/44 "2015-03-04T20:50:31Z")

</div>

Here’s a short clip showing off a new macro I’ve made for splitting up forLoops and forEachLoops over multiple ticks. The slow version showed in the video is way slower than what you would ever need (this is adjustable), for demonstration purposes.

The video shows the regular (instant) and loops per tick based vesions of creating a visibility grid. Visibility is efficient enough that the instant versions should work well for most games, but I’ve created this method for games on less beefy hardware (like mobiles) that want to use large grids and still be certain of a constant framerate.

This is a big step towards my next major planned feature, which is mobile and tablet support out of the box. Some users have already made the toolkit work on mobile, but I wanted to get this option done before implementing touch controls myself.

I enabled draw debug line per tick and it created a cool barcode-scanner effect 🙂 For a real game you’d probably want to keep everything invisible until the grid was done generating.

[![]( " - YouTube") ](https://www.youtube.com/watch?v=JezF_cwUN8k)

---

<div class="post-metadata">

**Author:** ![Oskarek15](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oskarek15](https://forums.unrealengine.com/u/Oskarek15)\
**Post date:** [March 5, 2015, 10:27pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/45 "2015-03-05T22:27:21Z")

</div>

Hello everyone,

First of all, again, cool toolkit.  
I believe it has great potential.

Is there a way to have empty tile put over the base grid block range attacks?  
Like lets say a building roof that you could walk on? Building itself should block vision, but still allows you to walk on the roof.  
I’ve tried to put a wall and empty tile on one tile but that combination makes it not walkable.  
Any suggestions?

Thanks,  
Oskar

---

<div class="post-metadata">

**Author:** ![Monokkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monokkel/32/1194496_2.png) [@Monokkel](https://forums.unrealengine.com/u/Monokkel)\
**Post date:** [March 6, 2015, 9:43am UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/46 "2015-03-06T09:43:39Z")

</div>

@Oskarek: Vision (and thus ranged attacks) is checked by doing line traces from the attackers tile at “visibility trace height” (by default head height of the UE4 mannequin) to the same height on the target tile. This trace is done on the custom trace channel “Range trace”. To block vision there must thus be something blocking “Range trace” between the start and end Points of the trace. So you can for instance set the mesh of your building to block range trace (make sure it has an appropriate collision volume and collision enabled). You can also create a copy of the invisible wall tile and set all its edge costs to 1 and Place them wherever you want to block vision. Or just drag collision volumes into the viewport wherever you need them.

---

<div class="post-metadata">

**Author:** ![Oskarek15](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oskarek15](https://forums.unrealengine.com/u/Oskarek15)\
**Post date:** [March 6, 2015, 11:29am UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/47 "2015-03-06T11:29:25Z")

</div>

Thanks , I’ll check it later when I get off work.

We have talked in emails about making hover markers more aligned to the surface.  
I’ve been thinking, maybe instead of static meshes use something that align by default?  
Maybe tile could lit up a little instead of generating static mesh on top of it?

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/d/55d81a4be684378b77c3dacd44849c7f897a7f05.jpeg "Unreal Engine 4.6 Preview - Static Emissive Lighting") ](https://www.youtube.com/watch?v=8IUB35OjLGI)

I’ll try this tonight, seems like a legit idea for my novice brain 😉  
What do you think?

---

<div class="post-metadata">

**Author:** ![Monokkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monokkel/32/1194496_2.png) [@Monokkel](https://forums.unrealengine.com/u/Monokkel)\
**Post date:** [March 6, 2015, 12:23pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/48 "2015-03-06T12:23:42Z")

</div>

@Oskarek: Thanks for the link and the suggestion. Please let me know how it works out. I have at the moment thought out three different solutions to the slanted tile problem:

1. Instead of just having a vector array for the tile grid also include rotation information. This should work well in many cases, but it would require the user to rotate tiles placed on the map to appropriately match the underlying terrain in cases where the user does not want the entire map to be made up of visible tiles.

2. Use render targets instead of instanced static meshes. This is a bit similar to what you are suggesting, and projects a texture down on any underlying geometry. I do like this solution, but I’m uncertain how well it would work performance-wise. I suspect placing individual render targets for each tile in range would be bad for performance, and that I would have to find a way to limit the amount of render targets. I’ll have to test this out a lot more more before deciding.

3. Do not display every walkable tile, but instead show the edge of the walkability grid as a frame, similiar to how it’s done in XCOM and Massive Chalice ( [Mac|Life](http://www.maclife.com/files/imagecache/futureus_imagegallery_slide/gallery/xcom_0792_0.png) ). I could possibly use beam emitters to create such a frame, though there might be better ways.

---

<div class="post-metadata">

**Author:** ![Oskarek15](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oskarek15](https://forums.unrealengine.com/u/Oskarek15)\
**Post date:** [March 6, 2015, 1:13pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/49 "2015-03-06T13:13:37Z")

</div>

I like option number 3 but only as an option.  
I believe some people (me :D) would still want whole tiles to be marked.  
Render target sounds good, I believe that there won’t be too many markers to use. Range that is set in example map is very high.  
I guess you could just test it out with matinee example scene or whatever example project.

You could also use beam emitter for square mark.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c2655a011](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c2655a011](https://forums.unrealengine.com/u/anonymous_user_c2655a011)\
**Post date:** [March 6, 2015, 1:25pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/50 "2015-03-06T13:25:02Z")

</div>

Hi ,

During implementation of my game logic, I’ve easily (thanks to the comments!) implemented a damage randomically chosen from a min damage to a max damage instead of applying directly a fixed damage.  
It was really easy, but I had to modify your blueprint directly, this means that I will lose this change when I will apply your next update.  
Some posts before you explained to me how to do a custom control on a custom blueprint, but how can I implement a logic like this in a separate blueprint?

Can I access to the damage pawn block outside your blueprint in some way?

---

<div class="post-metadata">

**Author:** ![Monokkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monokkel/32/1194496_2.png) [@Monokkel](https://forums.unrealengine.com/u/Monokkel)\
**Post date:** [March 6, 2015, 1:57pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/51 "2015-03-06T13:57:43Z")

</div>

@Oskarek15: Yeah, I would keep the old method as an option, of course. You say that range is set very high in the example, but that’s not necessarily true. For games similar to advance wars, Fire Emblem and the like, render targets can be safely used even if they are inefficient, since range is so small. For games like XCOM, however, range is much longer, and I want my toolkit to work for all kinds of turn based games. Scalability and efficiency is important for me.

@Wisdom\_HELLy: Good to hear that you find modifying the blueprint easy, as that was always my intention. Updates overriding modifications is a problem I’m trying to find the best way to tackle. I’m currently working on making more and more parts of the blueprint into functions, so that they can be easily called from ouside the blueprint. For a future update I will probably be moving the combat, movement and AI logic to from the Grid Manager blueprint to separate blueprints (possibly the level blueprint or to individual pawns). For the time being you can for the most part call functions from the level blueprint and create much the same functionality as can be found in the grid manager. However, this will take a bit more work with the damage system as it is at the moment. To call it from outside you could create a custom event that you plug into the “damage pawn” macro and call it from another blueprint. That custom event would disappear on an update, but adding it back would be very quick and simple.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c2655a011](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c2655a011](https://forums.unrealengine.com/u/anonymous_user_c2655a011)\
**Post date:** [March 8, 2015, 8:36am UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/52 "2015-03-08T08:36:31Z")

</div>

> [@;229862](#):
>
> So I’ve sent a new version with quite a few bug fixes and some new features to Epic. It will hopefully be on the marketplace soon. I’ve made the following changes:
> 
> - Added an option for changing between player pawns when clicking on them. Only works for pawns that have not acted yet this turn.
> - Added some more variables that are useful for adding gameplay features. These include an “has acted this turn” variable for pawns and a turn counter in the grid manager.
> - Fixed a bug where tiles in move range would always be transparent blue, regardless of the mesh used.
> - Simplified the pathfinding by removing checking for edges and instead populating the edge nodes with unwalkable nodes at grid generation. This is easier to read, speeds up the pathfinding slightly and fixes a bug that created suboptimal paths to tiles on edges for hex grids.
> - Fixed a bug that caused auto generation of walkability based on height to fail if the grid manager was not placed at0 on the Z-axis.
> - Various minor fixes.

Hi ,

Are above changes currently online at marketplace?

I want also to thank you for your kindness and your fast as lightning replies 🆒

---

<div class="post-metadata">

**Author:** ![Monokkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monokkel/32/1194496_2.png) [@Monokkel](https://forums.unrealengine.com/u/Monokkel)\
**Post date:** [March 8, 2015, 11:07am UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/53 "2015-03-08T11:07:42Z")

</div>

@Wisdom-: Hey, don’t mention it. It is important for me to know that everything is intuitive and in working order, so all questions and comments are valuable. I just tried adding the toolkit to a new project, and the updates do not seem to be implemented yet. Epic has been busy with GDC, so that’s probably why it’s taking so long. They are supposed to set up some new lines of communications with priority for marketplace contributers to deal with this sort of thing. Hopefully the update will be added this week.

---

<div class="post-metadata">

**Author:** ![Gugenheimer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gugenheimer](https://forums.unrealengine.com/u/Gugenheimer)\
**Post date:** [March 8, 2015, 2:46pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/54 "2015-03-08T14:46:24Z")

</div>

Been having a blast setting up my levels and combat arenas. Have you had any luck in finding an easier way to use meshes without the default Unreal Skeleton?

---

<div class="post-metadata">

**Author:** ![Monokkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monokkel/32/1194496_2.png) [@Monokkel](https://forums.unrealengine.com/u/Monokkel)\
**Post date:** [March 8, 2015, 3:04pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/55 "2015-03-08T15:04:07Z")

</div>

@Gugenheimer: Great to hear it’s fun to work with! Finding a simple way to use custom skeletons has been in the back of my mind since you asked it. However, I’ve focused my attention on fixing bugs and adding seamless mobile and tablet support, which has taken me longer than I expected. Animation is not what I am best at, so there is probably a way to change skeletons easily that I have not figured out yet. If you are not able to wait some more (and I’m sorry you’ve had to wait for a while already), you can do it the way I currently do it myself. Make a brand new anim BP with your custom skeleton. Copy all the blueprint and animation code manually over from Anim\_BP\_parent, making sure to add the appropriate notifies to attack animations. Then replace the Anim\_BP\_parent references in the Grid Manager with references to your new Anim\_BP\_parent. These are cast-to nodes found within the movement and attack parts of the Grid Manager.

---

<div class="post-metadata">

**Author:** ![Gugenheimer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gugenheimer](https://forums.unrealengine.com/u/Gugenheimer)\
**Post date:** [March 8, 2015, 4:48pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/56 "2015-03-08T16:48:00Z")

</div>

Progress! I got the movement working, but now stuck on the attacking part. When it comes time to attack nothing happens.

Is this the cast to that needs to be changed to my new Anim\_BP? I am not able to get mines in here like this.

 ![Capture.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/c/0c0999a79aafcaef11d15c59fbeec14efcf93ff0.jpeg)

---

<div class="post-metadata">

**Author:** ![Oskarek15](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oskarek15](https://forums.unrealengine.com/u/Oskarek15)\
**Post date:** [March 8, 2015, 5:09pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/57 "2015-03-08T17:09:00Z")

</div>

> [@Gugenheimer;241221](#):
>
> Progress! I got the movement working, but now stuck on the attacking part. When it comes time to attack nothing happens.
> 
> Is this the cast to that needs to be changed to my new Anim\_BP? I am not able to get mines in here like this.

Hello,

Yes you’ll have to cast to your own Animation Blueprint (at least I do) and setup attack animation event in your animation blueprint (or call whatever other event/function you like).  
Then you have to setup attack end notify in your anim blueprint and handle it.  
You can basically copy all code from the anim unit parent blueprint.

What I did was copy almost whole event graph and anim unit parent blueprint and set-up it myself.  
Unfortunately things like attack target are still custom event ( I believe that author is going to migrate them to functions ) so you can’t easily override them.

---

<div class="post-metadata">

**Author:** ![Monokkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monokkel/32/1194496_2.png) [@Monokkel](https://forums.unrealengine.com/u/Monokkel)\
**Post date:** [March 8, 2015, 5:55pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/58 "2015-03-08T17:55:08Z")

</div>

Thanks Oskarek15, that’s what you have to do, Gugenheimer.

I am indeed planning on overhauling that part of the toolkit to make it easier to adapt and call from outside the blueprint. For now, however, this is the only way I know of to change it. Good that you’ve got it working for movement. That porbably means you’re almost there. Have you added notify event to your attack animations? Then you need to call it in the event graph of the Anim BP and get it to fire the “Attack hit” event in the Grid Manager, just like I have set it up in Pawn\_Anim\_BP\_Parent. One thing I forgot to say is that you should set the default value of Grid Manager Ref to BP\_Grid\_Manager if you have not done so.

---

<div class="post-metadata">

**Author:** ![Gugenheimer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gugenheimer](https://forums.unrealengine.com/u/Gugenheimer)\
**Post date:** [March 8, 2015, 6:51pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/59 "2015-03-08T18:51:29Z")

</div>

Success! I had to make my Cast to Anim\_BP into a “pure” cast. After I did that it worked. Does this mean that all pawns have to use the same skeleton? My project is fantasy themed so some of the creatures will have a lot of different bones (wings, tails).

My end goal is to make a VR friendly turn based game. I have done some configuring of the grid manager camera, and have it so you switch between the overhead grid camera for planning, and then can switch to a free floating camera ( I made this a Beholder ) to roam the map.

---

<div class="post-metadata">

**Author:** ![Oskarek15](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Oskarek15](https://forums.unrealengine.com/u/Oskarek15)\
**Post date:** [March 8, 2015, 7:54pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/60 "2015-03-08T19:54:59Z")

</div>

Congrats @Gugenheimer 🙂

@  
Do you think you could add markers match to under tile and rotation into core, please?  
I’ve done this by doing Line Trace by Channel on Path Trace channel and getting hit actor transform/rotation to apply this to hover/active/move/attack meshes.

Unfortunately it seems to much of code copy to include in my child blueprint, so it would be great to see that in core!

Thanks!  
Oskar

---

<div class="post-metadata">

**Author:** ![Monokkel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/monokkel/32/1194496_2.png) [@Monokkel](https://forums.unrealengine.com/u/Monokkel)\
**Post date:** [March 8, 2015, 8:10pm UTC](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930/61 "2015-03-08T20:10:47Z")

</div>

@Gugenheimer: Great that you got it working! I’m reluctant to do a proper tutorial for this yet, as I’m sure I’m going to change how it’s handled, but I’ll do one as soon as I’ve found a better solution. As for having multiple sketetons, the way I would do it in the current system is to keep casting until you find the right animation blueprint. So first try to cast to your most common Anim\_BP, if it fails, cast to another and so on. It shouldn’t be that inefficient, since these things are never called on tick. Looks a bit ugly in the blueprint, but it works. I’ll hope to find a better solution for this as well later on.

@Oskarek15: That’s a creative solution, and I’m glad you got it working. However, though it might work for you, there are much more efficient ways of doing this, which important for mobile and VR. A more efficient way to fix it is to add the rotation of all meshes to a rotation array on startup and get from that aray when placing meshes. That way all the calculations are done before the game starts instead of during runtime. Traces are pretty expensive too, so I’d prefer to get the rotation directly from the tile actor on the appropriate index instead of doing a trace. Fixing mesh rotation is close to the top of my priority list, and will hopefully be in the next update.

Edit: In fact, that seemed so simple to add that I just did 😃 Now you can be certain it will be in the next update.

 ![NOKRtVm.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/9/a95d44566bd19f5fc17e67f51d46431999a6ab5a.png)

[Previous page](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930.md?page=2)

[Next page](https://forums.unrealengine.com/t/support-advanced-turn-based-tile-toolkit/21930.md?page=4)
