Hey everyone, I’m back from vacation and while I was gone version 4.13 went live. For the change log see the second post of this thread.
Hey thanks for the great work you do as normal.
Just curious, what made the nativize work?
As it would be really handy to fix but would rather not migrate my project If i can help it.
Thanks!
You need to do a couple of small things to get ATBTT working with nativization. Both of these are to counteract general issues with nativization in UE4, so with further engine updates they should hopefully not be necessary. For the moment, however, this is what you need to do:
In the Pathfinding function in BP_GridManager the CanMoveTo array should not be resized using the Resize node, as there is a bug where arrays of structs are filled with seemingly random numbers after nativization when using resize. Instead manually resize the array using a forloop with GridSizeX*GridSizeY -1 as max and 0 as min and add an empty array element to the CanMoveTo array each loop.
In Unit_Parent a similar issue with arrays causes the game to end instantly when the first unit has been killed. After the Destroy Unit event there is a function that determines if all remaining units are the same faction after this unit has been killed, in which case the game ends, which does not work after nativization. I have not found a good workaround for this yet, so just remove this function from the event graph if you want to use nativization and make your own game specific code for when your game ends.
That should do the trick. Note that your project should still be 4.13 as there are other, more serious, problems with nativization in 4.12 that I do not have workarounds for.
I already have my own check if faction destroyed thing, so that shouldnt be an issue.
Is this what you meant by resizing change?
Yep, that’s indeed what I meant, though you need to subtract one from the max since UE4’s arrays are zero based.
Thanks now that iv done that im going to package and see how it goes.
Great! Let me know how it goes. It works great for the base toolkit and the performance increase is very significant.
Hello ,
A couple questions for you; no rush really answer those that have actual support questions before getting to me.
Does the Toolkit handle things like Player controlled groups (say 4 to 6 characters all controlled by the player) or do I need to come up with my own group manager type system?
When in combat does the Toolkit support display of the characters in a turn sequence like Divinity Original Sin or Temple of Elemental Evil?
Thank you,
I was wondering if it would be possible to disable the turn-based element, and use the grid and grid-movement but in real time with the pawns responding accordingly. I’m experimenting with a mechanic but I’m not sure how to go about doing this without breaking the whole thing. Any help or even some direction if this is feasible or not would be greatly appreciated.
@Delak606: Hello . I’m not sure I undestand your first question. By default the toolkit supports teams of multiple player units, if that’s what you’re asking? The built-in group management system is very bare bones, as I want it to work as a base that is easy to adapt. By default units act in an order determined by their initiative attribute. You can also switch between units by clicking them if you have enabled this option. Displaying turn sequence similar to Divinity:Original Sin or Temple of Elemental Evil (love both games, by the way) is just about the UI.
I’ve thought a bit about how I would do something like this. The array keeping track of the initiative order is in ATBTT_GameMode. It is an array of actors of the class Unit_Parent. For a UI showing the initiative order I would add a new variable to Unit_Parent containing the UI image of that unit. Then in my UI blueprint I would have a widget containing a number of images determined by the size of the initiative order array and populate it with images from the image variable of each unit. That is my hunch of the best way to do it, in any case. I might experiment with something like this myself in the future.
@MicahM: The toolkit is not set up to be real time, and changing it to something else will be quite the challenge. After the addition of blueprint nativization in UE4.12 I have been playing around with the idea of adding support for real time gameplay, but I don’t feel that is something I can focus on until my next update is done. Before nativization I would not recommend trying this, as the blueprint based pathfinding was not efficient enough that I would want to have tens of actors using pathfinding at the same time. After nativization improved pathfinding speed by roughly a factor of 50, this idea has become a lot more tempting. Changing the toolkit to accomodate this will be a big challenge, as mentioned, but I can tell you where I would start, at least.
I would probably have individual Can Move To arrays, Tiles In Range arrays etc. for each unit (stored in Unit_Parent) so they don’t override each other during gameplay. When a unit moves I would update its index continually whenever it enters a new tile (I did add functionality for this a few updates ago, which is contained in the event graph of Unit_Parent. It must be enabled, though). Then, whenever a unit is going to enter a new tile I would check if the tile is still unoccupied (which it should have been during initial pathfinding). If it is occupied I would run pathfinding again to find a new route.
There might be many problems with this solution that I’m not seeing as there would have to be made a lot of changes to the toolkit for it to work. If you want to try to add this I wish you luck, but you should be sure that you know the toolkit through and through before you attempt it. I will of course be providing support along the way if you do attemt to make such a change. Like I said, I might want to attempt something similar in the future.
Thank you for the quick reply as always , awesome bare bones is what I am looking for, just needed something to start me off that I can then build on. Would you be able to provide a screenshot of the turn sequence UI
Sorry, I don’t believe I was clear enough. There is no such UI in the toolkit at the moment. Just the underlying, invisible initiative array and basic controls for switching between units by clicking on them. My post above was a suggestion for how you could add such a UI yourself. It is just something I have considered making, but it is just at the early planning stages, so I do not have any screenshots. Since UI is something I have not worked much on it is not something I could whip together quickly, I’m afraid. I assume it will be quite simple to add provided you are experienced with using Slate, though.
Hi ,
It’s been a while since i’ve been ‘playing around’ with your toolkit, though recently I am hooked on using it again for one of my projects. The features you keep adding are just awesome, !!!
Any plans on adding gamepad input in the near future? I do understand this might not be on top of your priority list though.
I gave it a try myself, but without success so far. Binding zooming, panning, turning and clicking to particular gamepad buttons in the input section is not at all an issue; problem is, I can’t get my left stick to work alike mouse move!!!
Can you, or anybody else out here, point me in the right direction?!
Thanks in advance,
RAKSHASRAJA
Thanks for the kind words Glad to hear you’re having fun with the toolkit. Gamepad input isn’t something I’ve played around with yet, though I have considered it. In the update I am working on I have added support for Vive controllers for VR, and I guess I should also consider adding gamepad support for those using Oculus Rift. I’ll need to do some research into how gamepad support is generally handled in TBS-games. The two solutions I see is either having the gamepad move a mouse cursor around in the screen space similar to what you would do with a mouse or to move some mesh or paricle effect around the actual grid. I’m unsure which method would be most intuitive and I will have to experiment. In either case you would want to do a line trace from your cursor or cursor-like actor towards the grid, input the hit location into the Vector to Index function in BP_GridManager and use the output to set the Clicked Tile integer in ATBTT_PlayerController. Take a look at the Touch Input and Mouse Input parts of the event graph of ATBTT_PlayerController and create a new similar set of nodes for your gamepad input.
Hope that helps!
@:
When will the next version of your toolkit probably be released? I ask, because i am looking forward to use the cover system and the special abilities with your amazing toolkit.
It is difficult to give an estimate. Every time I’ve announced an update since I first made the toolkit I’ve been too optimistic in how much time it would take. As a psychologist I guess I should be more aware of the planning fallacy, but I still keep underestimation how much time these things take. Therefore I don’t really want to give an estimate as I know it would miss the mark. I am working on a lot of cool features and I will get them to all users of the toolkit as soon as they’re ready, but if you need a feature now I would recommend working on it yourself. I made a post a while back where I describe my WIP cover system in enough detail that you can replicate it. Take a look here: [SUPPORT] Advanced Turn Based Tile Toolkit - Marketplace - Unreal Engine Forums
Just so you guys don’t think I’m getting complacent here is a screenshot of the WIP update Cover system is working, and an ability system is in place which includes overwatch and healing at the moment. I’ve made the ability system to be flexible and easy to add to, so I intend to have fun adding a few more before release. Hopefully it should be straightforward for any users to add their own abilities with relative ease. VR-support is about 50% there. It is working, but not as seamlessly as I want it at the moment. Still a lot of stuff to do as I’ve gone beyond my initial plans as usual, but I think you guys are going to like this one!
Amazing work as usual!
I’ve done Cover System, Overwatch System and Skill System a bunch of time ago and now I’m really curious to check your implementation, which surely will be better then mine
In the past I said that I was trying to implement a multiplayer system and I’m still working on it, the first version is working pretty good (I’m using GameSparks game cloud for my game) but I’m concerned about the high number of requests that have to be made to the cloud server in order to keep the game status syncronized with the opponent one. Are you working also on a multiplayer implementation for the future?
Glad to hear from you, Wisdom-! No guarantees that my solution is better than what you made yourself, but I am pretty happy with it. All abilities are contained within their own blueprints (parented to a new class called Skill) and are spawned onto the map when they are needed. I initially felt this method was a bit awkward, but it seems to have been the right choice. This way you do not need to bloat your pawns/Grid Manager/whatever with tons of nodes that might not be used, and just spawn as needed. It also makes it really easy to make new skills and has other benefits such as being able to store the skills of a specific unit in an array ++ Looking forward to hearing your feedback when the update is done.
As for multiplayer that is something I’ve thought about implementing for a long time. There are just so many other things that have taken priority, but it is something I hope to implement in the not too distant future. When I make the attempt I’ll surely get in touch with you when I do, since you’ve looked into this already.
Regarding the skill system, I’ve also made a Skill Parent blueprint and created all specific skills with blueprints based on the parent.
My implementation is based on 4 different steps:
-
Skill Target Selection: this event is called by pressing a button in the HUD. It simply applies a boolean IsSkillSelectingTarget to TRUE and, inside the hover part of the player controller, just changes the tile selection crosshair with a custom implementation or custom mesh. For example, for the skill “Conefire”, I draw a cone light upon the grid. The cone light is refreshed and repainted every time I hover to a different tile.
-
Skill Target Selected: Bound to a valid mouse click (skill target must be valid) just opens a Gate component into the skill parent which activates the “Skill Target Activation” event. The gate is “ticked” by the tick event inside the Skill Parent
-
Skill Activation: activate and execute the skill. For conefire, for example, I spawn a cone of fire with a particle system, then I check if there are enemy pawn inside the cone using a MultiSphere collision system (two foreach loops to scan the left part and the right part of the cone). For every collision, ignoring the grid manager itself, self, and other items or props of the map, it calls the receive damage event. When the loop is completed, it calls the last event: Skill Deactivation
-
Skill Deactivation: set to False the isSkillTargetSelecting flag, ends the particle system emission and, if AP are finished, ends the turn.
I don’t think my system is genius, but helps to me to easily add a skill, its target selection mesh and its effect. I just bet that your system is more refined