[SUPPORT] Advanced Turn Based Tile Toolkit

@mflux: Please remove your last message, as this is not a PM. Send it to me over e-mail at knuteiliv@gmail.com

Just purchased and have started with your tutorial videos. One thing I noticed though is that in your first video you seem to have a folder structure different from what got imported when I loaded up this framework. I created this project directly from the store page and then opened it, instead of creating a blank project and importing the framework. Is that the cause of the problem, or is this simply due to the fact that the version I have has had the benefit of 5 more years of work done on it?

My bad, link has been removed and sent you a PM.

Hey Calvin, it is the second one of you guesses. At one point I realized that organizing into folders for blueprints, meshes etc. was redundant, because you can do the same thing with filters. I therefore reorganized it in a more project specific manner. The later tutorial videos will use the new structure, but the early ones still use the old one. Let me know if you struggle with finding something. Creating a project directly is the recommended way of starting a fresh ATBTT project, so you did it correctly there.

So this is quite strange. In the project you sent me I am able to replicate the issues you are having, but not when I create a fresh project, where things seem to be working correctly. There must be one step where we differ in our setup, but I donā€™t know what it is. So to list my precise steps:

  1. In Launcher -> Create Project -> 4.24
  2. In Example Map -> Set DefaultOwningPlayer of one of the player units to 1.
  3. In Play Mode and Play Settings -> Set NumberOfPlayers to 2 and RunDedicatedServer to true
  4. Open the MainMenu map and play in New Editor Window
  5. In Client 1, Host a Game using Connection ā€œLANā€, level ā€œExampleā€ and Max Players ā€œ2ā€. Press Done.
  6. In Client 2, select Connection ā€œLANā€ in the Server Browser and Refresh. Select the session that shows up.

This is what I do on my end, and replication works fine. There is one error message tied to the MainMenu map and there seem to be some slight shifts on the unitsā€™ starting positions (nothing like what you are seeing), that I need to investigate. But for the most part everything seems fine.

Thanks for checking that.

Iā€™ve upgraded from UE 4.24.2 -> 4.24.3, created a new project using ATBTT, and the problem went away. Iā€™ll try to diff the files to see exactly whatā€™s different.

Iā€™m able to reproduce it all the time now for some reason. Please see the above video where I create a new ATBTT project from unreal, perform the above steps, and see the error.

The issue can be reproduced regardless of LAN or Internet in server host.

Annoying that the issue is so erratic. I am working on this, but it will need a bit of investigation, so it might take me some time to solve.

Hi there, looking at this system now, can I ask how difficult it would be to create a real time top down controller that switches to the turn based combat system in combats, similar to what divinity original sin 2 does?

Hi , a couple of days ago we bought your project, it is beautiful and complex)
I just recently started working with blunts and still havenā€™t mastered a lot.
Please tell me how you can block the movement of units in certain hexes. The idea of the game is to make a different movement for each unit.
Photo for example
https://wmpics.pics/di-HPVP.png

Hi UberWiggett. Slightly to moderately difficult depending on how far you want to go. There is an example map in the toolkit that shows how to transition from a real time third person game to a turn based one and back. You could do essentially the same for third person movement. You can find it in Maps/Experimental/Hybrid.

It is a tiny bit hacky, though. For real time top down games you are likely to want to use the Character class as the base for your units, while BP_Unit in ATBTT is a child of the Actor class, which makes Unrealā€™s movement component unavailable for it. In the Hybrid example map I have worked around this by having the BP_Unit blueprint essentially ā€œpuppetā€ a Character child blueprint.

This works, but it is probably not what I would have done if I was to redesign the toolkit with a Divinity-style system in mind. If you want to get your hands dirty you could instead reparent BP_Unit to Character. The biggest problem here is that Character is set up so that the center of the actor is at the middle of the skeletal mesh instead of at the feet. This means that you will need to offset the location of the unit by half the size of the Characterā€™s capsule component for anywhere where units are placed or moved on the grid, or the unitsā€™ skeletal meshes will clip through the ground.

Up to you!

Hi Vital, happy to hear you like the toolkit. There are a few ways to work with unit movement in the toolkit. For general stuff that you want to affect all units you can work with how edges (connections) between tiles are set up at startup. This is efficient, but not very flexible. If you need to have many different movement types, your best bet is to expand the ChooseAndRunPathfindingSearchStep function in BP_GridManager. This already contains several custom pathfinding types, which by default can be selected through the PathfindingType variable in BP_Unit.

There is already a nested function here which Iā€™ve made for just this sort of testing. The SearchAndAddAdjacentTilesCustom1 function is a duplicate of the regular SearchAndAddAdjacentTiles function in BP_GridManager, and is for you to modify and play around with. If you need more custom types you will need to add more values to the EPathfindingType enum.

To achieve the result in your screenshot can be achieved by adding the following branch to SearchAndAddAdjacentTilesCustom1:


Here is a full pastebin of the modified custom function for you to copy. This branch checks the relative location of the tile to be added and the current tile to the relative location of the current tile and its parent tile. If these are the same, it means they lay on a straight line, and we add this tile to the pathfinding.

Beware that these functions are run potentially hundreds of times during pathfinding with large movement ranges, so this is the part of the toolkit where thinking about performance and efficiency is most vital. My suggested implementation here is quite inefficient, since it requires looking up and comparing the values of three map elements for each pathfinding search step. This is alleviated in this case by the smaller number of tiles that need to be searched for this particular movement pattern, but try to be as conservative as possible when adding new custom pathfinding types or you might potentially run into performance issues for large movement ranges.

Hope that helps! A screenshot of it in action:

Awesome reply, way more depth than I was expecting! XD but yeah sounds like i can play with the hybrid example and come up with something. Going to purchase now!

We have not been able to get this working on our end yet. I saw that the 4.25 preview is available. Have you had the chance to get it working in 4.25 yet? I know you said you would not update the toolkit until unreal went to 4.25.

Hi Monocles. Thank you very much for explaining and showing how to change the movement system for different units. I managed to make most of the varieties of moving units. But with 2 movements there were difficulties. Please help me. If itā€™s not difficult for you

Happy to hear that and best of luck :slight_smile: Let me know if you run into any difficulties.

The next ATBTT update wonā€™t be out until the full release of 4.25, Iā€™m afraid. My previous suggestions did not solve your problems? What sorts of issues are you seeing now.

Well, these are trickier. I played around a bit, but was not able to reproduce the patterns you are showing (particularly the second is difficult). It is especially hard to work at when I donā€™t understand the underlying logic behind the patterns, and reproducing arbitrary patterns programatically is a challenge. Could you explain the logic behind these? As an aside, Iā€™m very curious what sort of game needs these sorts of movement patterns.

Hi Mono

  1. Any advice on modifying the move range such that itā€™s a floating point value, without touching the base classes? Currently Move is an integer, however Iā€™d like to try 1.5 move per AP. There doesnā€™t seem to be a clean way to do this without mucking about BP_Ability. Perhaps a GetMoveTiles function we can override?

  2. Any updates on the multiplayer issue above? I am still using entirely replicated unit. It works OK, although there are definitely issues still, such as client unable to press tab to cycle units or see movement paths.

Thanks :slight_smile: [HR][/HR]
My solution for 1. is to copy/paste BP_Ability_Sprint and make my own sprint variant. I added a moveTilesPerAP and replaced the calculation of possibleMove.

This worked out for me. Ideally I could have extended BP_Sprint, but at least I didnā€™t have to modify BP_Ability!

Great that you found a solution. I would have done something similar. The various abilities (other than BP_Ability and BP_AbilityBase themselves) are intended mostly as examples. I would generally recommend not to extend these anyway and either create new BP_Ability or BP_AbilityBase child actors or duplicate and modify one of the example abilities (like you did). I find it best not to create a taller class hierarchy than what is necessary.

The core of the problem has eluded me so far, but I have not been able to spend that much time on it yet. I will solve it, though. It does not seem to affect the toolkit a couple of versions ago, so it is likely due to some small quirk introduced in a recent update.

Hey I am using your hybrid system and trying to get it to work with advanced locomotion system v4 I have gotten it work kind of is it ok if I Send you an example project? to see if there is a better way to do it I currently had to replace the camera system with a basic one instead and it breaks combat.

Hi codeyhanson, perhaps you could describe it a bit more before having to resort to me looking through the project, which can be quite time consuming. How does it break combat, and what are the specific modifications you have made?

I changed the default actor to a different third person rig and made the trigger switch actor possession combat starts but the camera does not switch to the combat view.

It might be that the OverlappingActor is not passed correctly if it is a child actor. If you use break points in the graph pictured, which of these nodes are activated during gameplay?