Hey all, I want to make you aware of a game that just got released. Grand Guilds by Drix Studios is a story-driven TBS game that used ATBTT in it’s development. It is out for both PC and Switch. I Kickstarted the game and have followed it closely. It looks and sounds great and has a fantastic tone, as well as a creative and interesting compat system using cards for abilities. I’m sure this will be of interest to many of the TBS developers here. Take a look at the launch trailer below
It’s great to see some high quality looking games being made with the toolkit!
Probably a bug, dunno if was reported or not. In BP_AbilityBase “Check UI Hover” returns “Valid” when clicked on. Meaning you can still move to a tile under UI.
Have to agree Keep 'em coming, devs!
That is a bug, and not one I was aware of. Thanks a lot for letting me know.
Managed to fix it. Not really a bug, It’s just how widgets work. https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/83520-how-to-make-umg-block-left-and-right-clicks
I just put an invisible button under skill buttons. A bit hacky but it works.
Hi ,
I’ve been trying to change up the turn,so a turn would go in phases, for example, on the start of a players turn it would go:
phase 1: player movement, phase 2: player melee combat, phase 3: player shooting…etc. cycling through each unit of that player. Then the next player or ai would go repeating all the phases cycling through all their units. Then a new turn would start cycling all over again. I’m new at this and cant seem to find an answer yet so if you or anyone has any advice I would appreciate it.
BTW love your toolkit and thanks in advance.
Ok, thanks a lot for letting me know. I was aware of that issue and thought I had fixed it long ago, but apparently not. I’ll make sure to fix it in the next update.
Definitely possible, but will require a bit of tweaking. I’ll look into it later today and see if I can find a good approach for this.
Ok, I’ve quickly hacked something together which should work as a first step. I’ve modified BP_Unit so that instead of activating the default ability of the unit, it activates a move or attack ability depending on which turn it currently is, circling through a move ability and two attack abilities (using the same attack ability twice here just as a demonstration). You would probably want something less hard coded in terms of ability selection, as well as maybe having a separate turn counter for “real” turns, but it is a starting point:
Thank you for your time and pointing me in the direction to go, I couldn’t figure out where to get started (really new at this). I’ll dive into it tonight when I get home. Thanks again.
Just bought your turn based tile tool kit, currently using 4.24.1 of unreal
When I load the test map I am I see the box grid, when I try running the test game am only able to select the different units but I cant get any of them to move anywhere on the map not getting any draw path indicator for grid spaces… do I have to do anything if I am using latest version of Unreal?
Hmm, that is odd. Have not heard of that issue before. The toolkit should work right out of the box for UE4.24. You are creating the project by selecting Create Project from the Vault in the Epic Games launcher and then selecting 4.24? Opening the newly created project should take you straight to the Example map (which is hexagonal), and pressing play in editor should result in a functional game. Have you made any modifications or attempted to migrate assets?
I start unreal and open the project it asks if I want to open copy of project. have not made any changes at all just opening project and trying to run it and only being able to select unit but cant click to get movement path or anything.
Ok, that is the message you get when you are trying to open an older version of ATBTT in a newer version of Unreal Engine. To fix this, create a new ATBTT project from the launcher (you can find the toolkit in the Vault at the bottom of your Library tab). You should get a prompt where you can select the Engine version. Select 4.24 and it should work:
If I want to set up a tile so I can have multiple type of tiles to represent Hills, forests ect and make it so tiles can be selected like units cans be selected not just units how do I make terrain clickable so I can access the terrain tile information?
something like in this video.
https://drive.google.com/open?id=1V0Thso9Gtrh01-1KWxvWngl7NUfQ4I2E
update on my question
What I am meaning to ask is there an easy way to have tile type classes and have the grid manager then use those tiles for generating of map?
I am trying to do a populous type game where how one raises and lower the terrain or change the tile type improves the terrain to gain access to improvements and expansions on one’s settlement.
Hey Albert, so there are likely many ways you can go about doing this, but I’ll give you a simple setup to get you started.
First you need a way to store your terrain tiles on the grid in appropriate grid indexes. We can start by creating a new special tile actor for your terrain tiles. This might not be what you want, especially if you have a very large map and want your tiles to be instanced meshes But maybe it is fine for your game, and it is simple for our demonstration. I create a new child actor of BP_GA_Tile, which I’ve called BP_Tile_Terrain. I create three child actors of this for plains, forest and mountains and place them on a grid with the default tiles hidden:
https://forums.unrealengine.com/core/image/gif;base64
Now we need to add these tiles to the grid. I add this code to BP_GridManager_Hex directly for simplicity. When the GridManager is activated I loop over all BP_Tile_Terrain on the map and add them to a newly created GridTerrain TMap. Since our terrain tiles are children of GridActor they have their GridIndex easily accessible (if not we could have converted their location with ConvertLocationToIndex):
https://forums.unrealengine.com/core/image/gif;base64
Ok, so far so good. The tiles are in our game and stored in the grid, but we need to access them so we can manipulate them. Most interaction of this sort is done through abilities in this toolkit. Abilities do not need to be tied to a unit, but can represent an input mode of the player. BP_Ability comes with a lot of stuff only related to units and AI, though, so here we’ll use the parent actor BP_AbilityBase as a parent of our new ability.
BP_AbilityBase already has all the code we need to hover over tiles and interact with them, so we just need to define what happens when we interact (click)
I keep it simple here. When the player interacts through this ability we check that there is a valid tile under the cursor and that the mouse is released. If so we check if there is a value in GridTerrain on the clicked tile. If so we push the tile 50UU up on a left click and 50UU down on a right click. We make sure to update GridLocations to reflect this, so that the location stored on the grid is updated for pathfinding and the like:
https://forums.unrealengine.com/core/image/gif;base64
Ok, almost there. Now we just need a way for the player to activate this new ability. For this demonstration I’ll make it as simple as possible. In the Player Controller I add a couple of nodes that activate the ability if the player presses X on the keyboard:
https://forums.unrealengine.com/core/image/gif;base64
Et voilà:
Trying to follow your code how do I add in the Parent activate grid manager cant find that bit to add also where do I locate the “ADD” bit at end I circled the two bits I am having issue locating to add to the blue print
I managed to find the two but I cant seem to figure out how to add the Grid Terrain into the add bit at end? where is that function to add to that slot?
Also what if instead of having it do the terrain high adjustment when player clicks on tile if instead I want it to pop up a widget that would have buttons assigned to perform different actions for that tile… so instead whenever player click tile it pops up widget for that terrain tile type?
Update I managed to find the Add bit at the end I had to create a variable
In the ability base where do I locate the event server interact function to add it?
Hey, seems like you managed to figure out a lot on your own. For any child blueprint you can right click the event graph and type the name of any event in the parent blueprint to override the event. If you do not wish to override it, but add to it, afterwards you need to right click the event and select call parent function. Functions (not events) in a child blueprint can also override functions in the parent blueprint by clicking the override button at the top of the function list (though you do not need that in this case, since ServerInteract is an event)
Where do I locate these last circled bits. I got all the rest added in but cant seem to find how to call the target grid terrain and hovered tile.
And attached is how my current abilities blueprint looks