[SUPPORT] Advanced Turn Based Tile Toolkit

Probably my bad. Mobile controls is not something I test every update, so I might have made some change that has disrupted touch input as a side effect. In that case thanks for making me aware of it. I will try to look into it soon.

Here is a guide on how to remove the touch joysticks. This should be how the toolkit is by default, but I guess it must have been reset somehow.

Hmm, odd. Not able to replicate this. What game mode are you using? How have you set up the level more generally?

Hmm, odd. Iā€™m not seeing any stalling on much higher move ranges, even for regular PIE. I have a pretty powerful rig, but even with much weaker hardware I would not expect any visible frame drops for 18 tile movement. Not to worry, though. For anyone experiencing such issues I intend to share the C++ converted functions fairly soon. But if youā€™re not planning to release your game within the next few weeks I hope you can have a bit of patience so I can do more testing, optimizing and commenting.

I think it has to do with the ability system? I gave both of my units the Move ability, and the Attack ability separately. Once I gave them both the singular MoveAttack ability they were able to swap between each other again. Any idea how I can fix this for if I want to split it back to 2 abilities instead of just the 1?

Hey ! I fixed the Move ability! Turns out it didnā€™t have the Default Click ability tied together when determining if its a valid target to move to.

I also added a change to the Default Click Ability, as I donā€™t want my player to be able to switch to the opposing factionā€™s unit. :slight_smile:

Hey , another update! I fixed the onClick for Initiative Icon. It references the local variable Unit, but its never set. It currently has 2 places where Get Unit is called, and I just replaced it with Get Actor > Cast to BP_Unit, and it fixed it. :slight_smile:

Hey , this might be a lot, but Iā€™ll go ahead and see if you have an answer :slight_smile:

I am looking to create an online mutliplayer game, where units can be dragged onto the grid via a card system. Do you think this is possible with the toolkit? If so, do you have any instructions on how to setup online multiplayer testing? And possibly a way to drag units onto the grid and assign them to the current player?

Any information you have about these 2 things would be FANTASTIC.

Thanks :slight_smile:

@Zennisin: Good to see you figured it out. I really should have guessed the reason, sorry. Basically all interaction from the player to the game is done through abilities (whatever ability is active at the time). So there is not layer on top of this for unit selection, for instance. This will have to be specified within the abilities. As you found out BP_Ability_Move does not have this implemented, as it is intended as a very basic straightforward ability. Unit selection is gated through whether or not the active player owns the current unit. The same player might potentially own multiple units from different factions with the current setup. For a hot seat multiplayer sort of game, adding the sort of check you have done makes sense.

:

This is certainly possible. The toolkit is fully networked, so making a networked multiplayer game is supported. You assign a unit to a player by setting that unitā€™s owner to a specific playerā€™s player controller. You can test out multiplayer games in engine through the number of players setting when you play in editor. Getting proper networked play set up is a bit more work, since you need to set things up to work with the specific network solution you are using. The Steam one is quite simple, and is the one I have used for testing. Check out Epicā€™s documentation on the Steam subsystem here.

As for the card interaction, the basics steps arenā€™t that difficult. You can spawn a new unit on the grid just by using SpawnActor, and BP_Unitā€™s construction script should take care of adding the unit to the grid, adding it to initiative etc. So for your card you could have some event fire when you let go of a dragged card over the game board, get the hit location under the mouse at that point and spawn a unit actor there.

Hello,

I have two main things that I want to achieve with the grid manager but I need some insight:

1/ I want the units to be able to walk through friendly units (which is already implemented) BUT when a unit is targeting an enemy and moving towards it and there is a friendly unit right next to the enemy unit it shouldnā€™t stop on the same tile as that unit, so basically we canā€™t have 2 units idle on the same tile.

2/ I want to change how the path finding spline works, right now each time you enter a new tile it clears the previous path and recreate a new one with the shortest path possible, I want it to continue moving from last hovered tile, for example I hovered a tile1 it creates the path then I moved to tile10 it continues from the existing path to tile1 and create a path from that path already created to the tile10. Is there an option to activate that result or do I need to implement it, if itā€™s the 2nd choice then can you give me an insight on how and where to achieve this.

Thanks.

That sounds like a bug. Iā€™m not able to replicate it, though. Could you give me the steps to reproduce the bug?

You should be able to do all of this by modifying an ability. If you take BP_Ability_Move as a base, you could store the current displayed path when you press a key (storing the current PathIndexes array). You would also store the grid index of the marked tile and the movement cost of moving to this tile. From then on, in the hover event, you would run pathfinding from the stored grid index, with a move range equaling the move range of the unit minus the stored cost. You would then append the stored path indexes of the indexes generated in the hover event when displaying the movement spline. When choosing to move you would get the entire current path and feed this into a the MoveCustomPath event of BP_Unit. This is the general approach I would use. I know it is a bit to follow, but try it out, and if you run into difficulties let me know and I will try my hand at making it.

Hey , did you ever have time take a look into the mobile issue of not being able to move the units I mentioned above? Any info you have would be greatly appreciated :slight_smile:

Hey , thank you for your answer. Iā€™ll try out your suggestion about the path and let you know how it goes.

About the units bug, Iā€™m not sure, Iā€™m using the ā€œPass Through Friendliesā€ option so I thought that 2 units being idle on the same tile is part of the option. To reproduce the issue, you have move a friendly unit to stand next to an enemy unit then with another unit move it through the same path so that it stands in the same tile as the first friendly unit, in my case, they both stand on the same tile (overlapping).

Not yet, sorry. Need to reinstall and setup the Android SDK as Iā€™m on a new computer. I will try to get it done this week.

Iā€™m not able to get two units to move to the same tile with any of the included movement abilities. Could you give me the precise steps to replicate the issue? What abilities are you using? What tiles are you clicking with what units in what order?

Hey , Iā€™m having a problem with the hybrid example map Iā€™ve replaced all the references to the third person character blueprint with mine in the same way but the grid doesnā€™t show up at all and i cant move, Iā€™m trying to have a real time movement top down character outside of combat, iā€™ve been going over this for a couple of days now and canā€™t find a problem with it, i can screenshot any part of the blueprints you want.

Thanks

https://i.imgur.com/MXQfXfw.jpg

Hi Telapicus, it is a bit difficult for me to know precisely what is happening here. Here are the steps I recommend for figuring out the issue: In the hybrid example map, turn based combat is initiated when the third person character enters a trigger volume which is roughly where your white cylinder is in the image above. To get an understanding of what this does you can add a blueprint breakpoint to the overlap event in the trigger box actor. Then play the unmodified hybrid map and trigger the box. The game will pause and you can step through the blueprint nodes being activated one by one. Now do the same with your modified map and you should be able to see at which point it breaks down. Knowing this will help you (and me) figure out what is happening here.

Hey , i added print nodes to the end of various end points but it seems everything is executing right, the image i posted is after the pawn entered the trigger box and switched to the grid camera correctly itā€™s supposed to be in combat mode there with the grid. For example i put prints to check if my pawn was getting put onto the grid and it definitely was and it was put into the initiative order system, the camera moves over to my pawn when combat starts and a new round starts, everything except for the grid works correctly. i have an unmodified version downloaded separately for going back and forth between but Iā€™ve changed very little.

Ok, a bit hard for me to guess based on what youā€™ve given me so far, Iā€™m afraid. Are the same nodes activated in the Turn Manager? Are there any actions added to the action queue in the Action Manager that might not be triggered? Could you describe to me or show me things you have altered?

Hey , yeah gladly mate

In BP_TurnManager_Hybrid i changed parts of the custom event BeginTurnBasedMode the first ā€œget all actors of classā€ i changed from BP_Unit_Hybrid to my Child of BP_Unit, the for each loop i changed the cast to my top down character, after the loop completes i changed the cast from the third person character to my character, i replaced the lerp from third person with a cut down one that only moves the camera to my character, after that the ā€œget all actors of classā€ node i changed to my character

Iā€™ve included all the changes as pictures in this gallery along with the BP_Unit child i created

Hi ,

I wanted to create a elemental weakness/resistance system into my game using your plugin. So far, the damage system is working fine, but Iā€™d like to know where specifically I can modify the damage, so I can apply this feature. Can you point to me where to look, and whatā€™s the best way to implement the elemental feature?

Thanks, EagleEyeGamma.

Hey , about that card system question I had earlier, specifically I wanted to try to use another toolkit on the marketplace, CCG Toolkit. It comes with a MainMenu level, that you can select what level you want to load, and with the decks selected, etc. The problem I am running into is that both toolkits were created as standalone projects, and require the game instance to be set to their instanceā€¦ for your toolkit you need BP_Instance_ATBTT and for the card game one you need CardGameInstance. Do you think it could be possible to merge the 2? Iā€™m not sure how to go about this.

From what I see, BP_Instance_ATBTT doesnā€™t seem to do much, so I seem to be missing something? Because some things break if its not set to that game instance, like the grenade ability for example.

Hi ,

The issue of 2 units stepping on the same tile was actually in my code, Iā€™ve managed to fix it. Thank you

Hello ,

Iā€™m currently working towards a 5 v 1 multiplayer game. But im having issues Spawning and possessing a pawn as ā€œPlayerStartā€ doesnā€™t seem to function in your toolkit. I think a solution that would work best is to have a player ID spawn item BP (1-5) placed in the world and create an array of players that adds new players as they join, then assign those players to a unique spawn BP in place of a ā€œPlayerStartā€.

just wondering if I missed something in your toolkit, or if you have a better option for spawning in a multiplayer.