[SUPPORT] Advanced Turn Based Tile Toolkit

Actually yes that is exactly what I have though it is type cast as I have not looked into how to make it otherwise. However if you already have something it would not surprise me and I would guess what you have is much better than the simple macro I have.

Hey,
How difficult would it be to make several AI factions in one game?
With their own economy and agenda?
E.g. AI 1 is at war with AI2 and AI3 is at war with the player

Hi , thanks for the speedy response to my questions. I think the issue here is that Iā€™m working off some tutorials that reference older versions of UE4. A lot of the stuff Iā€™ve watched/read has been rendered outdated, and I noticed in more than one comment section people pulling their hair out in frustration attempting to find where this or that feature went, or why itā€™s not working as it did in the video/article. Iā€™m a complete newb in all of this, and the last several updates to Unreal have come without updated tutorials so itā€™s a steep learning curve. Anyway, Iā€™ll keep poking around and see if I can figure out where Iā€™m going wrong. Thanks again! :slight_smile:

@: I have gone back and started to rewatch tutorial 5. Based on the conversation we have had here and the better understand I have watching it now I think I see a better way to handle this. I am still putting all the pieces together. I think the biggest issue I am facing is that I have watched and done a number of the Unreal Tutorials and what I am finding is that things that I think are good ideas based on how I have done them with other test projects do not fit with how your tool set works. While there is an extremely high level of control here I think it also causes extra work to fit in the frame work. As an example I need to know exactly which tile an actors location is on the grid. I keep digging into the functions to see if there are things that will help speed things up. Just so you are aware I am not trying to say anything bad about your tool kit in fact I love it still. It is way ahead of anything I would even know how to do at this point. I just have to keep digging and figure out how to work within the frame work better.

On a side note I my trigger box idea while I have it working 90% I found a bug. If the actor paths across the trigger box then it will open the next area rather than when the actor stops. This is exactly a case in point where I just need to find the right function to call at the end of the actors movement to check the tile and see if that tile is on an edge. I have been looking into creating a 4 element array on each edge that holds the index of the platforms edge tiles and then I can check if the actor is located in one of those and activate the platform next it it correctly. I think by doing this I will also gain the ability to directly effect the edge array for a platform and set the correct values that way.

I will keep you posted as I work on this. I am very happy with the progress I am making now as I am starting to get a better understanding of both unreal and the tool kit.

The toolkit is definitely not an ā€˜end all be allā€™ solution for any style of game, but more so a helper to get you started on a grid based game. The great thing to remember is that you have full control to change or override anything you want within custom functions, and this toolkit gives you the start/examples you need.

There is quite a bit to catch up on as far as macros and functions go; but there are many helpers that can do what you are looking to accomplish already built in, it will just take a bit of time to get accustomed to it. For your example, there are 3 ways you can located a unit on the grid depending on what you can input, what is need as a return value, and what you are going to do with that information. To get the location on the grid based on index you can use the ā€˜Index to Vectorā€™ macro or from a transform vector ā€˜Vector to Indexā€™ macro from the Grid Manager BP. If you need to know which Tile Index or Faction the Unit/Pawn is currently on, you can reference the Grid Managers ā€˜Pawn Actor Arrayā€™.

Stick with it! It took me a few weeks to get an almost full grasp of what is all in the toolkit and how it can be used to customize a game. All I can say is that you will be glad you looked through it, there is a lot to learn and absorb. :slight_smile:

In short: Intermediate/Advanced.

Intermediate: You will need to make some adjustments to how the Grid Manager handles Factions to accept your new ones, or build some overrides for Pathfinding/Attack. (If you add all factions to ā€˜Enum Factionsā€™)
Advanced: Create and handle all of the Factions through a custom ā€˜AI Player Controllerā€™, setup a lot of rules through your custom ā€˜Game Modeā€™, add a Data List for Factions Names and what ā€˜Statusā€™ they are in with each individual Faction. Etc

@: Thanks I am learning a lot right now I am sure there are better ways to do what I am doing but I think it will come over time. In fact I am thinking that I might be able to move back to my idea of spawning the rooms as they are found and then setting the edge array to make them walkable. I have to do more looking into this but I need to get my function for handling setting the edge array as needed functional first.

Iā€™ve simply made it as a pure function in BP_GridManager, but there are of course many ways to do this. I think it makes sense to contain it in BP_GridManager as it uses the gridsize variables.

Somewhat difficult, but not terribly so. The changes will mainly have to be made to the Pathfinding and Find Tiles In Range functions for identifying potential targets, and in ATBTT_PlayerController for deciding what to do when a tile containing a particular faction is clicked. I would recommend waiting until my next update if you want to implement this, as Iā€™ve made some changes that should make this easier.

No problem! Iā€™d post an example blueprint to you if I wasnā€™t abroad. It kind of sucks that tutorials get outdated when updates are made, but it is quite inevitable. My next update will make several major revisions to the toolkit, which will make some parts of my tutorials outdated. Iā€™ll try to combat this by adding several new annotations to the videos.

Glad to hear youā€™re getting more confident with the toolkit and UE4 in general. As you keep getting better youā€™re bound to find several things in the toolkit that you feel you could improve. There are a few reasons for this. Firstly Iā€™m designing the toolkit to be a general framework for several kinds of TBS games, so for more specific genres there will often be more straightforward ways to achieve things then my solutions, which are forced to take multiple kinds of games into account. Efficiency and speed is another big reason for many choices which might not seem to make that much sense until you measure the performance impact of doing things differently. Lastly and most obviously there are many things that could simply be done better, and Iā€™m encouraging any users who find superior ways of doing things to let me know, as Iā€™m always striving to improve the toolkit. Iā€™m looking forward to hearing what ideas you have for improvements.

By the way, if you want to know the tile an actorā€™s location is on the grid, there are several ways of doing this. Firstly you can of course simply get the index variable of the actor and get that index from the VectorField Array. This does not work while the unit is moving, though, as the index is set at the end of movement. To more generally get the grid index of a particular location you can use the Vector To Index function in BP_GridManager to convert any location to the correct index.

@: Thanks I have found those functions. I am trying to figure out when the best time to call them is. I found if I called it at end movement and just printed out the value as a test that end movement gets called repeatedly. I donā€™t want to call it on end turn because if you look at how the D&D Board games work there are phases to the turns knowing this means I know I have a lot of rework do to in how the pawn works in terms of what it can do in each phase. I am trying to avoid too much rework I am thinking I will more than likely create events for each of the phases and then start working on linking them in to call in the right order so I have the hooks to use later.

@: Thanks for the info
When are you thinking the next big update will be?

Curious as well.

Just bought the advanced turn based tile toolkit BTW.

Look forward to the next big update :slight_smile:

Oh I did think of something while I was driving today. I noticed that all your macros are in the different classes. A macro can only run in the class that created it or itā€™s child. However you can create a macro lib based off the object class for the parent which makes every class a child of it. Then you can make macros that can be used anywhere in your project. I did this for my array manager that I am using as well as I created a new ++ and ā€“ because while + and - do not have exec pins the ++ and ā€“ do and they do not really need them. And actually that is how I found out about the macro lib being a child of the object class because I was looking at ā€“ trying to figure out why it had exec pins. It turns out the ā€“ and ++ that come built in are actually part of utility macro lib which is a child of the object class. Anyway I found it very interesting and thought I would share with anyone who might not have figure this out yet.

Ok, itā€™s concerning that itā€™s printing multiple times. That shouldnā€™t happen. Itā€™s annoying that I canā€™t check it out until Iā€™m back home. I DM D&D frequently and I want to experiment with making a D&D-style turn structure some time in the future. Creating events for each of the phases makes sense. Let me know if you have any problems with implementation.

Good to hear you finally got the kit, HeadClot :slight_smile: Youā€™ve been following the toolkit for a long time, so I hope it will live up to your expectations. The update has taken a lot longer than I anticipated. This is partially because Iā€™ve had a lot to do at work and that I have been travelling a lot, but itā€™s also because Iā€™ve done a lot of experimentation with the toolkit, changing almost every aspect of the base toolkit at some point, though Iā€™ve only kept some of these changes. I think I could probably finish the update in a week if I could work on it full time, but Iā€™m lucky if I can get an hour per day these days, which means it will probably still be a few weeks before itā€™s done.

Edit:

Indeed macro libraries are pretty awesome. Some of the new macros in the next update are contained within a macro library. In time I might move more of my macros to a library. Any macros in particular you would prefer if were in a library?

@: Is there a function to get an array of indexes that an object cover? For example a wall that covers multiple tiles.

No, there is no such function, Iā€™m afraid, and I cannot immediately think of a function that would achieve this. I guess if you have a limited number of such objects you could add an integer array to them that holds the index it is placed on plus any additional tiles you know it will cover (using index +1, index +GridSizeX etc.). Thatā€™s the best solution in can think of off the top of my head.

@: Sorry for the late response. Thanks again for the help with the power ups teleporter

Hello!

Just bought the tookit and itā€™s awesome, but I couldnā€™t find anywhere an option to enable this XCOM style frame movement shot, I guess this is not yet implemented? :slight_smile:

Cheers,
Hrvoje

Hello!

Iā€™ve been playing around with your toolkit and ran into some trouble that Iā€™ve been trying forever to fix. For some reason, when I migrate the files I need from a new project to an existing project, I can only get custom tiles to work on Map_Height_Example and no other map (including Map_grid_Example). What happens is that everything visually snaps to 0,0,0 even though their location suggests otherwise. If I uncheck ignore snap to custom grid, itā€™ll allow move it but once I check it again, itā€™ll snap back to the 0,0,0. I canā€™t seem to figure out why itā€™s working fine on one example map you provided and then breaks on every other map I try to do this on. If you could provide me with some newbie troubleshooting, itā€™d be really helpful. :slight_smile: Iā€™m sure itā€™s something really obvious but I canā€™t seem to figure it out.

Happy to help! Let me know if you need help with adding any additional features :slight_smile:

Hi there, horva. Indeed it has not been implemented yet. It will be in my next update which should hopefully be out in a couple of weeks. Iā€™ve been a bit too ambitious with this update, so it has taken a lot longer than expected. It is worth noting that my solution for displaying the walkable area as a frame is not perfect for all sorts of implementations, but it shows one way of doing it, which should make it a lot easier for users to make their own variations if they are needed.

Edit: A screenshot of what to expect:

That is looking awesome dude. The XCOM developers have also changed from their previous implementation to something like this one this time around.