[SUPPORT] Advanced Turn Based Tile Toolkit

I’m sorry, but seems like something work wrong, cause when I change default tile mesh, distance between tiles are not scaled automatically. I want to increase the distance, is it possible?

That would be very helpful :slight_smile: Would make it a lot easier for me to help you.

I’ve put it on my TODO-list :slight_smile: I’ve got a few more highly requested things to do before this, but I’ll make sure to add it when I can.

So you want there to be a gap between the tiles instead of them being flush? Then you’ll have to make some small adjustments. In the construction script of the grid manager, you will see that quite early on in the execution chain TileWidth, TileHeight and NodeGap is set based on the size of the default tile mesh. If you multiply this by some arbitrary factor you should get corresponding gaps between tiles.

Hi, I love what I’ve seen of your toolkit! Just got it and very keen to jump in to playing around with it.

I had a question: I was thinking of having customization for the player pawns regarding jump heights, so I was wondering if the (for lack of better words) “height climbing ability” variable was possible on a per-pawn basis?
From the video tutorial I watched, it seemed like that variable was tied to the level itself rather than each pawn.

Thank you!

You are correct in that what tiles can be moved to from what tile is tied to the grid itself and does not vary from unit to unit. However, there are several ways you could modify the toolkit to achieve your goals. I’ll give you one possible solution.

When you are generating a heightmap for the grid you have the option of automatically setting cost between tiles based on height difference (this is a boolean you can check in the public variables of the grid manager). If you set this to false, then all tiles should be connected to their neighbors. After setting this to false you can instead check height differences for each unit during pathfinding. First create a new float jumpHeight in Unit that determines the max jump height of a unit. Then create a new custom pathfinding type. Go to the CustomPathfinding macro in BP_GridManager and modify SearchAndAddTileCustom1 (you can also create new such functions within this macro and expand the PathfindingType enum accordingly)

Inside the SearchAndAddTileCustom1 function (I might have the name slightly wrong. I’m on vacation and cannot check) add a new branch after the branch that checks if the new searched index has a cost of 0. In the new branch get the VectorFieldArray and get the vector at the index of the parent tile as well as of the child tile. Compare the absolute difference in their z values to the jumpHeight of the current unit. If it is higher, return false for the branch.

After you’ve done this, set the pathfinding type of your units to Custom 1 and it should hopefully work as you want it to.

Happy to help!

Heres the video explaining the problem I have. Twitch

Thank you so much, exactly what I needed! Hope you have a great vacation!

Any tips where the function “Find best tile from which to use skill” gets the reachable (walkable for AI in current turn) tiles from? Looks like it uses either “max move” or “current move” value to get those tiles. But the system I’m trying to set up is that if you spent all your action points on move (1 tile to move = 1 action point, pawns have 4 AP and 4 of max/current move) - you cannot attack anymore (like old fallout). So reachable tiles for that function should be more like “current move” minus “action point cost” of the skill. Is there a good way to set reachable tiles in the function without changing things in the very basic Grid Manager? As it seems to lead there if I want to set things my way.

Update: found a fix myself. In the function “Find Priority Value of Tile” of “BP_Grid_Manager_SciFi” I set temporary local value of the furthest tiles to low amount so AI does not consider those tiles a good move target.

Hey ,

Thanks for your great work and support on the toolkit, its great!

Here are some questions , can you kindly suggest the correct way to approach them :

  1. When i try to replace a character with a new Skeleton & Animations in Sci-Fi example map,i follow your tutorial on Youtube,it works for regular pawns,but in case of Jungle Raid i have to replace animation references in Unit Skill parent pawn blueprint, which brakes all the other existing child blueprints. What do you reccomend , what should be the proper way to introduce new type of characters for player & enemies if we start off from the Sci-Fi map instead of basic ATTB.

  2. How to implement projectiles within this toolkit? (i mean when characters shoot each other,projectiles missing the target might hit the surrounding etc), i have basic understanding of how to make the projectile system,but i’m not sure where are should insert which functions in order not to break the system.

  3. Is there any particular variable/boolean that temprorarily disables a pawn (both enemy & player - its not in turn order,not moving etc ; may still receive damage etc) . If yes - where to find it. If no - how to make it? :smiley:

Yeah, something is definitely not working as intended here. Sorry about that. I’m afraid I don’t know exactly what is causing this, unless you have set collision plane walkable to true. You will need to wait for a solution until I return from vacation. I’m glad you found a workaround in the meantime.

Thanks :slight_smile:

Sorry for the late answer, but I’m glad you found a solution yourself. I would have suggested something similar. You could of course run pathfinding with a move range of one less than the move of the unit, but in your case it makes a lot more sense to have move distance affect the value judgments of the AI, since the AI should still be able to move its entire move distance if it has a very good reason to do so.

Personally I’d probably do something that is more gradual than what you are suggesting, so that the tiles are considered worse and worse the further the unit has to move to reach them, with tiles at the edge of movement having the largest reduction in value.

Since I’m away I cannot check the blueprints directly, but if you go into the Find best tile…] function you’ll see that tiles are assigned a value based on their cover value, distance from enemy units and a special factor determined by the specific skill being assessed. I would add a modifier to the value of a tile after all of these that subtracts from the value based on the movement cost of the tile. You’ll have to experiment with the weight of this modifier to get it right.

Thanks! I do my best :slight_smile:

Hmm, I’d like to test this out myself to see what exactly breaks and how to fix it easily, but I cannot at the moment. I don’t think it matters too much if the child blueprints of Unit_Skill are broken, though. They are just versions of Unit_Skill with different meshes and default attributes. If you are using different skeletal meshes I’d just make new child blueprints of Unit_Skill with your custom meshes. The ones that are included are mostly just for demonstration purposes.

It can be done in several ways. If you are using the skill system I would add this to the event graphs of the skills themselves. For instance in the laser skill, where I normally spawn a particle emitter to show a laser beam, you could instead fire a moving particle, spawn a bullet that you move using physics, a spline etc. or something else. If the time it takes to shoot the projectile is the same each time you could just use a delay to continue with dealing damage etc. If it is not you might want to add some code to your bullet blueprint that sends a message (perhaps with an event dispatcher) to the laser skill when it hits to continue with dealing damage etc.

For missing the target, take a look at the laser skill, where I have the laser particle shoot towards a semi-random location if the attack misses.

Depends on the exact effect you are after, but if you remove a unit from the InitiativeOrderArray in ATBTT_GameMode its turn will never come up, which effectively disables it.

No worries as it still works that way so I just keep on working with that :slight_smile: Stop checking the forum and enjoy your vacation! :stuck_out_tongue:

Cannot help it, I’m afraid :slight_smile: Don’t feel bad for posting during my vacation. if limit providing supports to boring train rides and before I go to bed. Just a few days until I’m back now anyway.

The only problem I have with this workaround is as soon as I move the character around in the Editor with a pregenerated grid he can’t find any tiles even tho he should be able to? Twitch

Thanks again for looking into this and letting me know. I’ll be back from vacation tomorrow and will look into it then.

@Danjio: I’m back and have been trying to reproduce your bug. I have not been successful, though. I’m using a three level pregenerated grid with both lower levels below Z 0. Everything seems to be working fine. Could you give me the exact reproduction steps, or send me your map?

Hi. This looks amazing, and exactly what I need. Thanks for putting all the effort into it!

I just have a few questions though.

  1. This question is a bit of a reflection with my being new to UE4. Knowing that all the classes and designs in this asset were made in blueprints, is this toolkit amenable to making a game with c++ parent classes? That is, if I wanted to make a game where the parent class of all units and the parent of all abilities are c++ classes, would it be easy to do with this toolkit? Or would it require such a major overhaul that it would be easier to just start from scratch? If I can’t do that, is it at least easy enough to make c++ functions for all math expressions or complicated logic structures?

  2. I love the thoroughness of your videos. Especially the 2 hour blueprint video. Videos can be a great learning tool, but they’re not very good as references. Is there something like a text document from which we can reference all the features and blueprint structure?

Thanks

Hey @.

I started running into this today, and this is probably a long shot, but do you know of anything within the old grid manager that may have broken nativization recently?

Sorry for the late answer, guys. I’m attending a seminar in Toronto and I’ve had little to no free time, as well as limited internet access.

Hey Bridgeburners, glad you like ATBTT :slight_smile: I’ll do my best to answer your questions.

  1. Nothing is stopping you from combining the blueprints in the toolkit with C++. UE4 works very well with a combination of the two. If you change the parent class of unit to something other than pawn I don’t think you should experience any issues. The Unit class does not really depend on any code from Pawn and should work well with any parent actor. There has been a user before you who worked on coverting all of ATBTT to C++. He/she has successfully converted much of the grid manager construction script to C++ without any issues, so it is absolutely possible. That being said, you should consider what you have to gain from this. With blueprint nativization, blueprint code becomes very fast, and knowing how to work with blueprints is a great help when working with UE4. Up to you, of course.

  2. Thanks! I spend quite a lot of time on those videos, and I plan to make quite a few new ones soon, delving more deeply into specific parts of the toolkit, such as the pathfinding. I’m afraid I haven’t made a text reference. I have prioritized adding new features over making a text documentation. I will consider making something of the sort in the future if I find the time. For now, if you have any questions that cannot be answered through my tutorial videos or figured out through the blueprint comments, let me know in this thread.

Sorry, I haven’t seen this particular error before. I’ve had issues with nativization before, caused by having long path names, using child animation blueprints and resizing struct arrays, but all of those issues were fixed a couple of updates ago. Is the error you posted in AnswerHub the only one in the log?

UATHelper: Packaging (Windows (64-bit)): Cook: LogInit: Display: LogLinker: Warning: Can’t find file ‘/Game/VehicleBP/VehicleOverview’
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit: Display: LogUObjectGlobals: Warning: Failed to load ‘/Game/VehicleBP/VehicleOverview’: Can’t find file ‘/Game/VehicleBP/VehicleOverview’
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit: Display: LogUObjectGlobals: Warning: Failed to find object ‘Class /Game/VehicleBP/VehicleOverview.VehicleOverview_C’
UATHelper: Packaging (Windows (64-bit)): Cook: LogInit: Display: LogScriptCore: Warning: Script Msg: Attempted to access index 1574 from array ‘VectorFieldArray’ of length 1530 in ‘/Game/AdvancedTurnBasedTileToolkit/Blueprints/Gameplay/BP_Grid_Manager.BP_Grid_Manager_C’!

Aside from those warnings, nothing :confused:

Maybe it has something to do with the last one, but I’ve had plenty of out of bounds warnings before that didn’t cause issues. While on that topic though, I’ve been trying to sort out the warnings in the cook log, and those first 3 have always come up. I’ve never done anything with the files it mentions, were they something that was imported with the toolkit that got removed afterwards? If so how do I get rid of them?

ps welcome to canada

@Selentic: I’ll need to try packaging when I get back home again to see if I get the same warning. I cannot remember ever adding a vehicle blueprint, so that warning is quite odd. I’m trying to get rid of any and all warnings in the log for the next update. Do you get the same warnings with a fresh project or could they be related to your own additions?

ps thanks! Enjoying my stay here so far :slight_smile: