Thanks for these new tutorials; I’m so appreciative since they really help in understanding the toolkit. I’m that one person who can use the Height Slow Increment so I’m glad you pointed that out! That feature was not created in vain
I might do an extra video at some point on things like subgrids and UpdateTilesInRange. UpdateTilesInRange is fairly straightforward, though. Input a location or GridIndex, set a range and the tiles in range will be added as if they had been within the bounds of the grid at BeginPlay.
Happy to hear that! I’ve had to learn the hard way that even if something is simple and quick to add initially, having to keep the feature updated through all versions is a lot of continued work. The HeightSlowIncrement is one of the prime examples of this, so it is good to hear it was not all in vain.
How does a unit entering cover know that it is in cover? Is the unit also aware of what is in the surrounding tiles, or just the edges? I would also like to replace the existing combat system with my own, but I want to keep your ability system. It seems like I could just change the BP_Ability_Laser, for example, to how I want it to run. Is this too simplistic (i.e. is there a better way)?
It’s taking me a while to get my head around the toolkit, but I’m really liking it, and the videos help a lot. It would be nice to have written documentation, rather than having to watch an entire video when I get stuck, but I’m one of those dinosaurs who prefer written tutorials.
BP_Unit has a GridIndex variable, representing its place on the grid. If you get the value on this index from the cover TMap in the cover system you can find the cover values for the tile the unit is on. If you need the surrounding tiles as well you can use GetIndexesInRange in BP_GridManager to get an array of tiles within a set distance of the unit’s GridIndex.
Creating and modifying abilities is generally the simplest and often best way to modify the toolkit. The included abilities (such as Laser) are intended mostly as examples, and I encourage you to make your own. If any of the abilities is close to what you want you can create a duplicate to use as a starting point.
I understand very well that written documentation would be useful for many. It mostly boils down to the amount of time I have on hand, and the sort of work I find enjoyable. I’m already struggling to put out enough tutorial videos, so I don’t know how I would find the time to make and maintain a written documentation. It would have to come at the cost of other stuff. I also personally prefer to learn from videos when possible, and there are so many things in the toolkit that are much simpler to show than to write out in words. If I’m ever able to make this my full time job I would definitely put off time to make a written documentation, but as it is I’m afraid I have too much on my plate as it is. Sorry about that.
To my knowledge there is no option in the toolkit to allow players to share a space on the grid, am I mistaken and if not could you provide a direction on how we would accomplish this? The image below would be an unlikely but possible case that could happen because our game has a maximum of 5 players. We’re thinking to avoid weird clipping issues that maybe we could assign different locations on each grid space to each player.
Hi Dr. Knut
First I wan´t to say thank you for your great Toolkit, I learned a lot in the last days from it and your videos. So I have three initial questions, mybe you can help me out:
When I wan´t to update to latest version, what way do you recomend updating an already started project? Creating a new Project from thew new version and migrate all of my own stuff to the new project excluding the Toolkitfolder itself? Or is it enough to just click the Update button in the library and it will be updated?
I have started something similar to Might an Magic Heroes 7 but with every unit beeing able to gain Levels and without the stacks. So every unit will just represent one unit. Switching from the world map (level) to an encounter should then lead to a new level where combat starts. After that the Level will be cleanded out and the player rejoins the world map. How would you organize the units so that they are able to progress throughout the game? So were to store their data best that I can load (spawn) them to the temporary combat level.
After revisiting a lot of your resources I intend to organize the world map via your strategic combat mode and the combat levels via your basic and D&D initiative combat mode. Is that a good starting point? Or am I wrong and there is a better starting point from your point of view?
By the way what is the game you are programing yourself about? Are there already some information you can share? I am really interested
Thank you a lot in advance and keep up your great work
Hi RTE, how difficult this is to achieve depends a lot on your desired end result here. The GridUnits array only supports one unit on each tile by default, but you can work around it in various ways depending on your game. Could you explain a bit more about the purpose of this in your game? Are units to be “grouped” on a tile, which can then be moved as a single unit? Should they all be selectable individually once they are all on the same tile? If so, how are you imagining the UI and input would be to convey this to the player and allow him to select one of the units? Be as specific as you can on these things and I will think up a recommendation.
Great to hear! I always hope that my toolkit is a good learning resource for blueprints more generally.
Unfortunately, there is not really any simple way that does not require significant work. You will have to do most things manually, and how you go about this depends a bit. For very minor updates like my last one, the simplest way is to create a fresh ATBTT project, do a blueprint search for the version number (2.61, in this case) where I have marked the changes and copy the relevant blueprint changes to your project manually. For more substantial ATBTT updates you might want to go the other way (since you know your own changes best), migrating and copying your changes over manually. I’m sorry that there is no automatic merge function, so for any update you will have to consider the magnitude of the changes and if updating is worth the work it takes.
There are two main ways to save progress in UE4: GameInstance and SaveGame. GameInstance is initialized when a client joins the game and is maintained between levels. You can use it to store the data about your units when transitioning to a level. Then when loading a new level you would get the GameInstance, get the variables you’ve stored there and create/update your units from there. SaveGame works similarly, but creates an external SaveGame file that is maintained even when exiting the game. You use LoadGameFromSlot to access the data you have stored there. These are general UE4 features, so I recommend looking up the documentation and various tutorial videos that exist out there.
Nothing wrong with doing that, if they work the way you want them to in your game. Sounds like a decent fit for a HoMM-style game.
It is a long work in progress that has gone through many prototypes. I want to make sure the game is really fun and interesting before I take it beyond the prototype phase. I have some ATBTT prototypes as well as some paper prototypes that I can play with friends as a board game (great way to have rapid iteration and get feedback early!).
The game is a run based TBS all about fast and tactically dense combat, where all abilities are decided by the loot you find, creating wild and emergent synergies that change each game. If I try to compare it to existing titles it is a bit like a cross between D&D and Into the Breach, but it embraces chaos and unpredictability in a vein more like the Binding of Isaac.
It is also inspired by some of the higher level design principles of games like Dream Quest/Slay the Spire (the test-your-luck synergy building aspects, not the card mechanics). Game is a long way off, though, but it is a blast to work on
This is going to be a digital version of my published board game. Each unit here is actually a different player. Players can share spaces in the game. Players will always have only one unit / character. So, yeah they are all selected individually.
I do have an AI controlled unit which is an enemy that will be several characters that are grouped together as one unit. They need to be taking up 3 spaces in a row standing shoulder to shoulder and will move along the tiles together.
Ok, that might make things a bit simpler. If you only have one unit you might not have to click it to select it, since I assume it will automatically be selected on your round. The best approach will still depend on how you are expected to interact with units on the board, though. Can the units affect the unit of other players in some way, so that they would have to be able to target them? Do you have a PDF of the rules of your game or something? That would be helpful.
Yeah, you won’t have to click to select your unit / character. Players do not target each other in a direct way, meaning they do not attack each other. There will be a card system that can affect other players but none of them involve attacking. I can send you the PDF rule book if you think it would help. It will definitely give you insight into future questions I’ll probably have, haha.
I want to have the mechanic of two clicks for ability move (or if it´s easier for more/all Abilities [Ability base]) for mouse input. Equal to what is already implemented for touch input. I already tried to skip some branches for the normal mouse input to directly point to the touch outgoing of the branches but with no success. The pawn is walking in strange directions then
is there a wait function implemented. That will set the initiative to a high value and pospone the units turn to the very end? If not where to start best?
What is the best way for flying units or where to start? I am after the heroes of might an magic thing of flying not that xcom complex system. So that the unit can fyl over obstacles but not land on them. But I am open for a solution like invisible tiles above obstacles which can only be “walked” by units with a “fly” tag for example, or working around that with maximum hight accessable tiles for flying units
Are big units still not supported for hex grids?
By the way: The more I digging in the project the more I see what you have already done and taken care of. Really incredible Do you accept any kind of donations? as I think that is more worthy then the ~42€ I have paid.
In the BP Turn Manager blueprint, I noticed there’s a game state. Things like Pre-Game and FreeRoam. Was this ever implemented? And how would I activate free roam? Ok, actually, I just discovered the hybrid game mode lol. Man… you rock dude. Should put some videos out on that if you haven’t already.
How would you add newly spawned ai into the turn order? Say one ability is to create a new ai unit.
I want to have a large map, but there’s seems to be problems with a really big grid layout. What would be the best approach to this? Having multiple grid managers? Is that something that could work? Or somehow ignoring parts of the grid? It doesnt necessarily have to be a seamless flow, it could be broken up into “combat areas” if that makes sense. But I’d rather avoid a loading screen to another level or something similar…. * on second look, there might not be any problems actually. Set it to 100 by 100 and got good results.
I think I had something like that in one version, but it seems to have been deprecated. I assume you’re using BP_TurnManager_Initiative for your game? The order of units in initiative for that TurnManager is simply based on where they are in the InitiativeOrderActors array. After a unit’s turn it sets bExhausted to true. A new turn starts when the turn manager tries to start the turn of a unit which is already exhausted. Thus to find the end of the turn you can loop through InitiativeOrderActors until you find the first actor of which the CheckIfExhausted interface returns true. Then you move your desired unit in the array from its current location to the index in front of the exhausted unit’s one.
There are many different ways to do this, and which is best depends a lot on your game, but here is a suggestion: Create a new Set of integers in BP_GridManager. This set defines which grid indexes have obstacles that should block all but flying units. Then motify SearchAndAddAdjacentTiles so that it checks if the tile it is considering for pathfinding is in the new Set right after it checks if the cost of the tile is lower than Move.
Only proceed to the add to PathsMap step if the index is not found in the set. Next modify SearchAndAdjacentTilesCustom1 in a similar way, but for this version, instead of not proceeding if the index is found go straight to where the index is added to LocalOpenListChildTiles. By adding it to this array pathfinding will continue from this tile, but by not adding it to PathsMap the unit will not be allowed to move onto the tile, thus allowing it to move through the obstacle.
Next create a new actor based off BP_GridActor which at BeginPlay adds its GridIndex to your custom Set variable and you have your custom obstacle. Lastly, set the PathfindingType variable of your flying units to Custom1.
Still not, sorry.
Thanks, but what you’ve paid is enough
Norway, but danke schön
Glad you found it It is in a bit of an experimental state, so not something I would want to make a video on yet. I might refactor it for the next update, though, at which point I’ll consider a tutorial.
Spawned units are actually added to the turn order automatically if you set the variable bAutoInitiativeOnSpawn to true when spawning. It will add the unit to the end of initiative, though, and it will not work well with all the turn manager (come to think of it, I should refactor this part to be more modular). For more control add the unit to the InitiativeOrderActors array manually where you want it.
Good to hear 100100 is enough for you. ATBTT works great at that size and lower. If you want to push much larger thatn 100100 then you probably want to do some optimizations to prevent slow map loading. I have various suggestions for people who want to go that way, since the optimal solution depends a lot on the game in question.
Hi, I guess I never tested the 2D map on mobile. Do you want to disable panning/zooming on mobile or enable it on pc?
The 2D example is build with the assumption that you have just one unit, so it does not bother checking if a unit is friendly when you click it. You can add the following to ServerInteract in BP_Ability_2D to prevent attacking friendly units:
BP_Ability_2D is set up so that if there are more than 2 actors in InitiativeOrderActors it is in turn based mode, while if it is less than 3 it is in free roam mode. As the TurnManager has a place in InitiativeOrderActors, 2 actors means that only one unit is active (the player). You can change this to a check that loops through InitiativeOrderUnits and checks that there are no units of Faction Enemy in initiative order instead. If you search for InitiativeOrderActors in BP_Ability_2D you’ll find the three places this is checked, which you can modify.
And for an announcement: I have just set up a Discord channel for ATBTT! There you can discuss anything ATBTT or turn based strategy related with other developers. It is also a better bet than the forums for PMing or e-mailing me, as the forum PM system is broken (Your recent PM to me is displayed as blank, @mrorpheus ) and my e-mail is filled to the brim with academic spam. To be clear I still prefer that people use this forum thread for any complex support questions.
1 question 2. I couldn’t find how to set up checks to attack one of my friends in Server Interact. PossibleTargets? How to check can‘t attack friend
But in the " BP_Ability" not have this codes can check Factions，why？
In the 2d map, how to make the enemy act after our action end?
@yb: BP_Ability is made to be a simple base ability, so I try to limit the amount of code in it. It is arguable that it might be a good idea to have a function for checking the faction of a clicked unit in BP_Ability, but it is also fairly quick to add to any ability that needs it.
For your 2D map question, perhaps instead of answering one and one question you can describe to me a bit more about how you want your game to function? If you want something that works similarly to the regular Example map, just in 2D, then it is probably best not to use BP_Ability_2D as a base for your abilities. Could you tell me how you want your whole game to work? Is it similar to some published game?
@Mono. First one works already, even if it wont mark the choosen tile with the squareboxmarker after the first hit and doesn´t show the spline when you move the mouse away from that tile. But I will try to fix it. The other ones I will test out now. Big thanks
@Dijon about mouse rotation:
I have it like this in BP_GridCamera. In addition you can invert the rotation behavior with a negative float value of “FloatCamRotationSensity”.