[SUPPORT] Advanced Turn Based Tile Toolkit

Hello, Im trying to make multiplayer turn-based-combat game with your toolkit and I’m stuck with replications. In action manager, you make multicast and pass an array of FActions. But it’ seems, you can’t pass Array of objects, because it always empty. Moreover, some objects like Bp_Ability_MoveAttack doesn’t pass either though it is checked to be replicated in its blueprint. So the only object that the client receive is TurnManage, other objArrays in FActions are empty.

It should be there. You’ll find it in Maps/Experimental/Hybrid. You’re using the latest version of ATBTT for UE4.24?

The toolkit should be set up to replicate correctly by default. There are a couple of bugs that will be fixed in the next version, namely replicating the ability system and some issues with loading maps, but for the most part it should work. Where are you calling your debug function from? The action manager passes all actions through a RPC, and that should work fine. You are correct that passing references to UObjects has some limitations in UE4, which is why I’m using structs instead.

[USER=“641905”]leo bar[/USER]: Looking into your level loading issue, but I’m a bit confused. It seems similar to what I’m doing from the MainMenu map, which is a map with only a widget and no grid manager used for loading maps with a grid manager. This works fine, so I’m not sure what is the difference between our setups. It seems like you are using BP_ATBTT as the game mode for the widget map, which seems unnecessary. Could you explain the differences between your setup and mine and your reasons for doing things differently?

hi

i just manage to work around it. yes i am using the BP_ATBTT as the game mode for the widget map. so i made another actor witch handle all the opening of levels and that made it work.

are you using 2 different game mode? one for the widget (or other stuff) and one for levels with gridmanager inside? if so how you alternate between those two game mode? and if this way is preferable ?

another question is if you know if there is some way to know when the level is finished loading like in the stream level option ? i need this for the loading screen.

thanks in advance

leo

Ok, glad you found a workaround. Yes, it is recommended to use different game modes for different maps, as they are intended to determine the rules for that particular map, and a menu map has very different requirements from a TBS map. You can change the GameMode of a map in the WorldSettings of that map. I only have intermediate knowledge of level streaming. What would you use this info for in the loading screen?

hi

ok thanks for your answer. i was using one game mode because i thought it would help with moving reference and variables between the levels that way.

i want that the loading screen will end only when everything is fully loaded in the new level (i have a big level and a bit concern about the possibility that the level will start without some things not fully loaded properly). maybe i am wrong and it is happened automatically with open level node that insure that kind of behavior, i don’t know.

another question: i want to make a custom movement so that i can draw free spline in several waypoint a long the way and at the end submit the movement. what is the best way to approach this not using run pathfinding again and again from every end of a waypoint? hope you understand what i meant:)

thanks

leo

Unless you’re explicitly loading things in at a later point in the level, OpenLevel should load everything in at once.

GameMode is not the correct class for keeping variables between levels. It is initialized anew every time you open a level. Use GameInstance for variables you need to store between levels.

I don’t think you can get around a new RunPathfinding for every point along the path, as each RunPathfinding only know the path from the source point where it was started.

ok thanks mono

I think I do use last version. I’ve noticed that ue4 only replicate actors that are spawned at the beginning of game, but I spawn pawn units after players are connected. and then i do all init stuff. maybe this is the problem?

Edit: I’ve found out, that it takes time to replicate(even in the editor (yeah I didn’t know it) so as a result I made a little delay before start game and it works. moreover it relates to construction script as well thus pawn and client-side always have player faction, but if you check it in runtime after a short delay - factions will be replicated and changed. I coundnt figure it out why all my pawns were player faction, but then i figured out that they are actually different factions, but it takes some time ) By the way, for this reason pawn on client-side coundn’t get a grid reference and as a result, they all were spawned on the same place in the grid. i fixed it by making check if it is server and if not I placed all construction logic to begin play

Yes, replication takes time (and not a predictable amount). So yeah, sorry, this is one of the things I have fixed in the coming update. My approach is a bit different then yours, but achieves the same end. This is called at ClientSetup in the Player Controller:

Thanks. I guess I wasn’t running the latest version.

Do the BP_GA_Platform_Wall and BP_GA_Platform in the Core/Tiles folder still go translucent when mouse hovered like the tooltip mention? I see them go translucent when zoomed but not when mouse hovered.

SOMEONE_INSANE go to the player controller bp_atbtt- mouse interface - and check the enable mouse over event.

Hello ,
Could you help me with an item pick up for the sample map? I tried to play around like the 2d map but no luck i want the same sort of thing pick up a health kit

Cheers

Awesome thanks! Sorry I must have missed that. Still learning the toolkit.

Thanks for helping out @SOMEONE_INSANE, [USER=“641905”]leo bar[/USER] :slight_smile:

Sure, I’ll help you. Could you tell me more about the specific stuff you have trouble recreating so I know what to address? How far did you get and do you have an inkling about what is not working on your end?

So the idea is between turns an item can appear on a tile. But before i get to that i need to make it so say a potion is on a tile then when the unit lands on that tile it heals the character and destroys the potion. thanks again for your help

Thank you for your help)

First you’ll need to add the items to the grid. You can do this in the BeginPlay event of your potion (take a look at BP_GA_Item for an example of how). Next you need to be able to interact with the item. The GridObject system is based on the actors implementing the BPI_Interact interface, so have your potion implement this interface. After this you can implement the EventInteract event for the potion, where you want to call your healing code from.

If you call the InteractWithObjects function in BP_GridManager with the appropriate GridIndex as input you will now call EventInteract for your potion and any other actor added to GridObjects for that tile. Now we need to make it so it is called when a unit moves onto the potion. The toolkit is set up by default so that when a unit ends its movement it calls the OnUnitEndMovementSimulate EventDispatcher in BP_GridManager. However, this event does nothing by default. We want to bind an InteractWithObjects function to when this happens. Check out the event graph of BP_GridManager_2D to see how this is done.

This is all that needs to be done for the gameplay side of things. However, making this fit well into the action queue of the action system is a bit more tricky. If you simply queue an action to display your healing as part of your InteractWithObjects event then it will trigger before movement is animated (since SimulateMovement, which triggers the event dispatcher and eventually your heal action is called before the Move action is queued in BP_Unit).

There are a few ways to get around this. BP_Unit_2D_Hero queues each step of its movement as a separate action, which is how it is solved for this map. The same is true for BP_Unit_Anim_Ex, though it needs some slight tweaking if you want it to interact the same way with interrupted actions. If you want a game with lots of different kinds of interrupted actions this might be the way to go. If you do not need such a flexible setup you can instead set it up so that the Move action is queued at a custom index so that it triggers before your Heal action. There are other ways as well using the Interrupt Queue type.

Ok, hope I didn’t scare you off with that last bit. Follow my instructions above and let me know if you get stuck and I’ll help you further along.

You’re welcome :slight_smile:

Thank you so much i had a play around this morning and got it to work straight away. I have used the sprite from the 2d example ill have more time to play around during the week with a static mesh for the potion. cheers

Hey, hope you’re well. I’m having trouble getting the client to change my Hovered Tile integer. How can I have the Client feed information to the Server when someone hovers on new tiles on the client side? On the server side, I cast to ATBTT_State and store the Hovered Tile integer there, but on the client side, this Hovered Tile integer just stores the last thing that was hovered over on the Server.

On a more general note, getting back into my projects and thinking about taking another crack at online multiplayer, which always seemed like a daunting task. Besides eXi’s compendium, are there any resources specific to ATBTT that you would recommend for making the transition from pass and play to online multiplayer? Would you recommend any specific integration like steam? I unfortunately followed a long tutorial by UE4 that ended up being outdated, and i would be happy to even make a simple prototype work online.

As always, thanks, haven’t posted here in a while but have been pleasantly surprised with how my projects have progressed and the toolkit and your input has been essential in that.