[SUPPORT] Advanced Turn Based Tile Toolkit

Hey the break point did help me find something and might be onto a solution. Will post back here if I do find one for others trying to use the advanced locomotion system v4. I seen that the default player you have is actually the camera and not the hybrid unit and this has helped. If I am unable to get this to work will post the error logs that I get. Thank you.

Ok, good to hear that youā€™re on the right track. Let me know if I can be of any more help.

I found a bug. The tile edges near Wall_E is incorrect. Itā€™s easy to reproduce. Just drag a grid manager into an empty level. Increase the grid size. Place 2 Wall_E like the picture above. Click Pregenerate Gameplay Grids and Display Tile Edges. You should be able to see the incorrect tile edges. Itā€™s not a display problem. Units can wall through this wall.

Hi ,

What would be the most efficient way to disable object translucency when in the hybrid 3rd person camera? I donā€™t want objects to be translucent while in that mode, but once the player gets into combat, then I would like the translucency of objects to follow the rules established based on camera position and height. As BP_GridCamera_Hybrid is a child of BP_GridCamera, it seems like I have to edit both in order to make that happen (unless Iā€™m missing something in BP_GridCamera_Hybrid).

Thanks for creating and supporting such an awesome toolkit.
Jason

Hmm, that is odd. Iā€™m not able to replicate the issue on my machine. Are you using UE4.24 with a fresh ATBTT project, or are you using an older version?

Well, I made a mistake. The following step should be able to reproduce the bug.

  1. Drag a grid manager into an empty level.
  2. Enable Pregenerate Gameplay Grids and Display Tile Edges.
  3. place a Wall_E into the level
  4. Disable Pregenerate Gameplay Grids
  5. Enable Pregenerate Gameplay Grids

Iā€™m using UE4.24.3 with a fresh ATBTT project.

And there is another problem. Tile edges near a wall is asymmetric .

Thank you for the detailed repro steps, UFO. Seems like I made a minor mistake in a recent update that causes this inconsistent issue. The reason is that the BaseEdges of BP_GridManager are not entirely consistent before and after the GenerateGameplayGrids, which results in inconsistent results for BP_GA_Tile, which looks at this array when generating its edges. I donā€™t think these issues will exist in a packaged project, but they can appear if you switch back and forth between pregenerated grids. This minor change is needed to fix that (fixed version on the right):


There is a second issue here with the inconsistent corner blocking. This is again due to a sloppy oversight on my end in a recent update. The walls need to be set up so that they block edges between the tiles passing through this tileā€™s corner. To fix this, change all the diagonal edges for the thin, blue wall actors to ā€˜-1ā€™ instead og ā€˜0ā€™, like so (fixed version on the right):


Both of these issues are caused by some embarrassingly sloppy mistakes on my end, so sorry about that, and thanks for pointing them out.

@mflux: Thought I should let you know that I am still working on the multiplayer issue. I am rarely able to reproduce the issue, which is frustrating my progress. If you have a project where it consistently happens, could you send it over (by e-mail to knuteiliv@gmail.com). That would help me a lot in figuring this out.

I have solved a couple of peripheral issues if youā€™re interested.

Adding a validity check in the level blueprint of the Multiplayer map solved the error message from running a dedicated server:

Also, selecting all units and tiles in your map and clicking the PlaceActorAtAnchor button (found in these actorsā€™ defaults) will solve some issues of units and tiles being centered incorrectly on map load.

Hey All,

Iā€™m wondering what would be the easiest way to run level streaming with this.

My goal is to have a level with the grid manager and 2-3 rooms spawn the subgrid with AI/items inside, activated by the door (as a quasi fog of war). I can easily get the sub grids and items to spawn via a level stream, but I am having trouble having the streamed level smoothly integrate with the persistent level.

Any thoughts?

Thanks a lot!

Hi Sekwah, when you say you are having trouble having the streamed level smoothly integrate with the persistent level, what precise issues do you have? If the problem is adding new tiles that are connected to other tiles through edges, I have recently added some functionality in my internal build to make this easier. I intend to release this along with the first stable version of UE4.25, but if you need it before then, check out this post.

Thanks, sent you an email.

Quick question. How come health, current health, AP etc are not networked? I was trying to create a HUD for these for multiplayer, and noticed none of these values are networked and thus client can never see them up to date. Is there a reason this is the case?
[HR][/HR]

Alright I figured it out. It looks like you didnā€™t want to network any unit information at all (for security reasons?) and must run the QueueAction with a custom action that updates the HUD, or something similar with a replicated call.

Sorry, maybe a little off topic, but please help fix the problem with the light
auto exposure is likely off
problem on video

Thanks. Iā€™ll look into it soon.

Security is part of it, yes, but it is also because game logic and actions are not synchronous. So if you order a unit to move and attack it instantly reduces the current health of the target, but this is first displayed to the clients when both actions have played out (quite a bit later). If you were to use these variables for HUD etc., they would show information to the players that is out of sync. You could use separate variables on the unit for DisplayedHealth which is used for the HUD, but these should still not be replicated, since if there are connection issues one client might see the result of an action later than another, causing similar confusion. A great benefit of the action system is that even if there are such connection issues, animations etc. will always look smooth without any visible lag or choppiness, as there is no continuous updating from server to client.

@mflux: The dedicated server multiplayer issue is still confusing to me, but try if this hack solves it for you while I look further into it:

I donā€™t believe Iā€™ve messed with any lighting settings in the toolkitā€™s defaults. Iā€™m guessing that is just UE4ā€™s regular eye adaptation at work. You can disable it with a post process volume. Here is a tutorial on how to turn it off.

One problem I noticed with this is that the overwatch status effect ā€œdisablesā€ only visually, however they continue to check and shoot.

For example:

  1. Unit 1 overwatch. Ends turn.
  2. Unit 2 ends turn.
  3. Unit 1 overwatches again, Ends turn. (there are now two overwatch status actors!)
  4. Unit 2 moves. **Is shot twice **by overwatch. [HR][/HR]
    Iā€™m also noticing in multiplayer, overwatch does not trigger reaction fire animation for the overwatching unit.

I tried this and it does indeed fix the startup unit placement issue. Unfortunately the ability system wonā€™t work without replication on BP_Unit, since AbilitySystem component has to replicate in order for the HUD to work, and it wonā€™t replicate unless BP_Unit is also replicated.

A reason BP_Ability_Overwatch is still in the Experimental folder is that I saw a bug similar to this during testing that I was not able to replicate. Thanks for giving me the steps. The reason for this problem is that the Disable event run on turn start for this ability does not unbind the bound CheckOverwatch event. Fix it like so:

Hmm, this is indeed an issue. The advanced ability component used to work for networked games before, so this must be an unforseen side effect of my last refactor. Iā€™ll try to figure out a workaround that does not require direct replications.

Thanks! I figured it was something like this. I got it working like you had in the image.
[HR][/HR]
Iā€™ve been meaning to ask you, have you considered copying over grid managerā€™s state, so that clients can look into gridLocations, gridEdges, etc?

If client canā€™t know about such basic things (even looking up a location via index) then literally everything needs to be round trip (client > server > client), as youā€™ve done in BP_Ability. This makes things such as moving the tile cursor laggy, even playing on LAN with the same machine. I understand the need for security, however some things seem reasonable to have replicated, such as gridLocations.

Can you recommend a work-around to this? I would like the client to be essentially lag-free with their UI which should be possible in turn-based games.

TMaps cannot be replicated, unfortunately. Iā€™ve also been reluctant to send such large amounts of data to clients. Whether or not that is a good idea will depend a lot on the specific game, so it is not an implementation I would want to have in the base toolkit. But if you have a relatively moderate grid size and donā€™t intend to do a lot of changes to the grid at runtime, regenerating the TMaps client side is a sure way to reduce input lag when hovering over tiles.

For large maps it can also be possible to send over the relevant FPathfinding TMaps generated during pathfinding as needed. Since you cannot directly replicate you would have to send over the keys and values as arrays and recombine them to a TMap (or use them as arrays if you do not need to lookup values multiple times per tick). For the hover marker itself it might be possible to use a ā€œnaĆÆveā€ method that does not need access to GridLocations, by using a line trace with PathTrace and placing the marker simply based on this (and info about the location of the GridManager, as well as the tile size).

I donā€™t think access to GridLocations etc. for clients is that bad for security necessarily, unless the game relies on hidden information that influences these variables.

So to sum up, this is something I havenā€™t found the perfect, general solution for yet, but there are many different possible solutions depending on the requirements of the specific game.