[SUPPORT] Advanced Turn Based Tile Toolkit

Ok, great :slight_smile:

Do you mean a capsule component? You can add that in the component hierarchy like any other component. I would probably add this to whatever unit youā€™re using as the base for your gameā€™s units (I usually recommend duplicating BP_Unit_Anim for this purpose). It probably makes the most sense to attach it to the GridAnchor scene component. Beware if youā€™re using collision volumes for moving actors like units that the animations of ATBTT are asynchronous from the gameplay code, so at any one time point the location of a unit blueprint in the viewport might not correspond to the current grid index at which the unit reference is stored (say if the unit has moved, causing the reference to be moved, but the Move Action still being queued up in the action system).

The GridObjects TMap in BP_GridManager is a good fit for item pickups. In fact I use it for just this in the HydrasLair example map. Check out the item pickups here and how they are implemented and let me know if you have any questions.

Hey ,

Sorry for replying back so late but it works with no problems and now Iā€™m wondering how to make it so when all enemies are dead in a level, it proceeds to the next level or sends you back to the main menu.

Hello ,
I have used your laser ability to make a bullet ability. I have gotten everything to work (I think) but I have this strange issue I found occasionally occurs, in the ā€œShoot Unit functionā€ after the ā€œfind hit chanceā€ that there was a branch left as true all the time is this so we always do damage to the target? I connected the branch and now I miss the occasional shot which is perfect exactly what I was looking for, but sometimes with that connected I register to different damage stored values between the client and the server. I have attached some pics so you can see what I mean. The first is the function with the branch connected, the second is the client window and the 3rd is the server window. Thanks for your help

Hey !

Not a question, more a comment on your quick reply on my questions I had yesterday on the shop site.

Thank you very much for this awesome tool! Iā€™ve purchased it today and played a bit around with it. The tool kit is really good structured and I love the real time to turn based experimental. Currently working on adding my Pathfinder character creation to the system and up until now, itā€™s working really good. I can only recommend your work.

Digging into the map creation later today while watching your latest tutorial videos. More marketplace creator should support their work like you do! Keep up the good work. :slight_smile:

Ah maybe one small question. Do you have a documentation in writing of all the features? I remember things better when I have it in writing. But no problem there is no documentation. I will also manage without it. :wink:

Cheers and have a nice day!

Ok, great! For your question, I assume you know how to load a level? The default behavior of the toolkit is to display an end game message when all enemies are dead in a level. You can add your custom code to EndGameIfConditionMet in BP_TurnManager. You could perhaps call an event or function here that calls OpenLevel, maybe after a delay.

Iā€™m guessing youā€™re not using the very latest version of a toolkit. That was a bug that Iā€™ve since fixed (it should be connected). The issue youā€™re seeing is quite strange, though. It seems to be working correclty on my end. Does this happen with the included laser ability or just with your custom bullet one?

Thanks, happy to hear that :slight_smile:

Iā€™m afraid I donā€™t have any written documentation. I donā€™t have a good excuse for this, beyond the point that most people seem to prefer video tutorials, and I find them both quicker and more fun to make. I understand that there are things that would be better served by written tutorials, though. It is on my list of things to do, but Iā€™m afraid my list is pretty long.

Did someone say video tutorials?! When?:wink: How about spawning some characters mid-game and playing around with which order they start their turn?

I see development has cooled down regarding this toolkit, I think. Speaking for myself, I guess itā€™s as good a time as any to start doing little projects with it once again.

Yeah, Iā€™m pretty overdue on video tutorials now. Iā€™ve been working on a side project for a while now that has taken a lot more time than expected, but Iā€™ll try to get to it soon. But I do consider ATBTT to be close to feature complete at this point, so the chance of a new major refactoring is a lot lower than what it has been before. So now is a pretty good time to start a project with it, as you suggest.

Adding characters mid-game is not difficult. The construction script of BP_Unit should take care of most of it. For placing it in initiative this just means moving the reference to the unit in the initiative order array in the Turn Manager.

Hey Mon
Hope you are well!
Im trying to find all the grid indexes overlapped in a separate blueprint actor.
Can you recommend the best way to do that?

Using it as a way for world building, with different objects across the map indicating different regions so all indexes overlapping the Forest actor would become Forest tiles.

Thanks

Hi , I m very new to Unreal and just started to use the ATBTT. Great work, thanks for it!

While building my first levels and using the heightmap feature for multilevel maps in the grid manager I reckoned that I can only place foilage onto tiles from the grid manager itself.
I cannot place foilage onto blueprint tiles that i stacked on top of the underlying grid manager.
It is possible to place foilage onto any regular static meshes in the map but just not onto blueprint tiles that I snapped to the tiles from the grid manager. Seems that the foilage is placed onto the colision plane of the grid manager and does not recognize collision information from above lying tiles.
Is there a simple tick box in the setting that I missed or how can I place foilage in a multilevel map made with the ATBTT?
Thanks for your reply

Hey , this is something Iā€™ve given some thought to, but havenā€™t yet found a good general solution for. You could have the relative overlapping grid indexes of a large actor be specified manually in an array in the actor, but this is quite clunky. For large, rectangular actors you can use GetIndexesInRange, but it does not work well for other shapes. It is possible to do line traces for objects downwards on all tiles and modify the data of the underlying tile based on the actor that is hit, but this is not terribly performant. How best to do it depends a lot on the precise requirements of your game.

Hi reto_keller, I think it should be enough to have the actors be of ObjectType WorldStatic in the collision settings of the mesh component, as well as to block WorldStatic in the Object Responses.

Hi

Hope you can swing by the discord again some time. Perhaps sticky the discord on the original thread so others can find it?

Iā€™m on UE4 4.24.2 with the latest ATBTT. In multiplayer I noticed are some bugs right out of the framework:

  1. Client-side gridManagerRef is never set for units. This creates a script error on all units client-side. The constructor is never run for them. Client should beginplay->set the grid manager ref.
  2. AbilitiesBox does not work for clients. It seems to be checking for playerController which is mismatched, and additionally, abilityRefs in bp_abilitySystem doesnā€™t seem to be replicating. (The entire unit does not replicate)
  3. Pressing tab on the client will sometimes cause an error ā€œattempting to run a function thatā€™s supposed to run on the serverā€.

Anyhow, have a good day!

Hi ,
That was indeed just one box to tick to solve it, thanks a lot!
I am now steadily getting my head around how things work with the tracing system.
Have a good day and keep up the good work you do!

Hi mflux, it is true that Iā€™m not spending much time on Discord. I generally donā€™t use Discord much personally, but there are a few reasons beyond this why there is no official ATBTT discord. If there was one, there would be an expectation that I would be available for support there. As much as possible I want to have support concentrated in a single place, and for my purposes this forum is best. Also, a forum encourages long-form detailed questions and answers, which I generally prefer. Sorry about that, as I know there are some who like using Discord.

Too bad to hear youā€™re having problems with multiplayer. Perhaps one of the latest updates has broken something. The ability box certainly worked for clients in the past. After a quick check Iā€™m not immediately sure what might be wrong, so I will need to do a bit of testing. Iā€™ll let you know as soon as I have it fixed.

Glad to hear that it worked :slight_smile: Let me know if you run into any other difficulties.

Totally understandable!

There are some replication issues hopefully you can look into:

  • The units are not replicated (and thus their components, such as abilitysystem)
  • Their movement is not replicated either (results in jittery motion until position syncs)
  • Death animation does not replicate (not sure if it ever did before)

Thereā€™s some non-breaking bugs in widgets when using dedicated server

  • The main menu wbp expects a player controller, however dedicated server wonā€™t have one so it errors out there
  • Some actor (canā€™t remember which) has an ā€œactive actorā€ variable that is null but being used when running dedicated server

The units are actually not meant to be replicated. The action system works by sending actions to each client, and the client executes these on the non-replicated actors. In a turn based game it is not necessary to constantly update the states of actors across all clients. Using the action system eliminates the possibility of laggy updates of movement etc., since anything that is shown to the player is executed client side. Before I dive deep into this, have you made any modifications to the toolkit, or are these issues on a clean project?

I created a new project to verify. Here are the repro steps:

Create new project from ATBTT plugin on Epic Games Launcher, Unreal 4.24

Open MainMenu map

Set Players in play dropdown to 2
Set dedicated server

In dropdown, use ā€œPlay in editor window PIEā€

In one window, change the map to Example
Press Done, the map will start waiting for players

On the other window, press refresh, and join the game when it shows up

Youā€™ll see this:

In console you will also see all the script errors for grid manager ref.

On the client, none of the units are placed correctly.

In my game, itā€™s identical except I have ability system enabled. The abilities HUD does not show up for the connecting player.

In my game Iā€™m trying to modify as few ATBTT things as possible, so Iā€™m 99% sure this is a plugin issue.

Does this toolkit implement building destruction?

Ok, so Iā€™ve checked this out now. The problem is that the action system starts queuing up actions on the server before the client connects. The client never receives this first set of actions, which means the server and client are out of sync.

To avoid this you need to make sure that StartMatch in BP_TurnManager is not called before all clients have loaded the correct map. The default behavior of the toolkit is to wait until enough clients have joined so that all DefaultOwningPlayer values for the units placed on the map has been filled.

This means that you will need to set at least one of the unitā€™s DefaultOwningPlayer to something other than 0, so that the server waits until the client has joined before starting the match. This is the default toolkit behavior, but you can modify the TurnManager to run StartMatch based on some other condition if you prefer.

Thanks for looking into this. I donā€™t think this is right though. Check this out:

Changed DefaultOwningPlayer to 1

MainMenu starting up

After connection, client is messed up

Errors

Iā€™ve zipped up the project so you can check it out. Itā€™s Unreal 4.24, basically straight out of the box from ATBTT. The only change I made was changing Example mapā€™s unit DefaultOwningPlayer to 1.

no linking to marketplace assets allowed.