I’m back from the honeymoon and ready to keep on improving the toolkit as a married man. 4.13 preview is out and ATBTT does work with it. However, there are a couple of small issues that have popped up with the new update which must be fixed so that BP_GridManager can compile. I will not send a new update to Epic until the final version of 4.13 is out, but until then, here is what to do if you’re impatient:
There are two collapsed blueprint graphs in BP_GridManager that need to be fixed in the Get Indexes in Range (Checking Range Array) function. These are the two topmost “Correction to keep hexagonal pattern if close to west edge_2” collapsed graphs. No idea why this is, since there are many identical, working collapsed graphs in the toolkit, but ut us thankfully quite easy to fix. For both of these remove their input nodes and add new identical ones. Then connect them up again the same way they are connected if you look at a version of ATBTT opened in UE4.12.
You will need to change one more thing if you want to nativize your blueprints when packaging. Epic have fixed the issue in 4.12 where projects containing child animation blueprints could not be nativized (thanks Epic!). However, there is still an issue where arrays of structs will be populated with random variables when resized in a nativized, packaged project. To fix this, change the Reset pathfinding arrays and clear meshes function in BP_GridManager so that it is resized manually through a forloop instead of using the resize node. Like so:
If you do this and package your project using the experimental Nativize Blueprint option you will see an absolutely massive performance increase in pathfinding and visibility checks. I’m talking 50 times as fast as PIE. Epic have said that C++, when coded well, can be 10 times as fast as blueprint, which is the highest performance increase I was reasonably hoping for. I’m guessing that nativization is especially beneficial for array manipulation. I’m happy to see that the way I have made my blueprints to be as performant as possible seems to cross over well to C++, and a performance increase of this magnitude will allow myself and users to be even more ambitious in what can be done with ATBTT.
Just to let everyone know, the toolkit is currently 30% off as part of Epic’s marketplace summer sale! It will remain 30% off all through this week. I hope this might convince people who have been on the fence to get the toolkit and start developing some awesome TBS games
Just wanted to pop in and congratulate you on your marriage, hope the honeymoon was great and welcome you back here! Been looking forward to seeing the next update after that juicy cover post you made!
Just bought the toolkit today and very new to unreal, have had a little experience dealing with game engines through modding, but in the greater scheme that’s next to nothing. Been watching plenty of tutorials of late and I find myself learning things at a decent rate, the UI in unreal 4 is definitely a plus. My question is: How do you attach weapons to characters? I’ve looked up plenty of tutorials but just can’t seem to be getting the weapons to attaching while in game. I’ve had a look at a few blueprints and only noticed recently that they are all calling back to “get player character”. That’s when it hit me that, we don’t actually use player characters right? We use “pawns”. Now I don’t know if this has already been covered, probably has but was wondering how you would go about equipping weapons/armor. If this has been covered in a previous tutorial, just point me there Thanks again.
Likewise, congratulations on the marriage. Hope the time away was great.
Just having a watch of the new video and noticed that a Free Roam feature has been implemented that allows free movement without turns when no enemies are around. I think a number of developers might be interested in this: check it out in the video around 11:30 in.
Thanks! The honeymoon was indeed great, and now I’m back to keep on developing with new vigor It will still be some time until I’m done with the next update, though. There’s still a lot to add, and life hasn’t exactly become less eventful. If there are any features you would like to add to your game yourself before I’m done with the update, just ask me here and I will do my best to help you along.
Don’t sell yourself short on the modding. That was my only game development experience before I started using UE4 myself, and after nine months I had released this toolkit on the marketplace. Unreal engine is amazing, and I particularly love working with blueprints.
As for your question, it should not matter whether you are using pawns or characters. A character is just a pawn with a few features added, such as some useful movement components.
For weapons you will probably want to add sockets to the hands of the skeletal meshes you are using. You then need to get a reference to the skeletal mesh if you want to add weapons using blueprints. Your confusion might stem from the fact that characters have a skeletal mesh by default, so you can get a reference to the skeletal mesh of any character without having to cast it to a different type of actor first. In the toolkit I’m using pawns, which do not have a skeletal mesh by default. If you want to access the skeletal mesh of any of the pawns used in the toolkit you will need to get a reference to a class that contains a skeletal mesh, such as unit_player_melee (or probably one of the custom units you’ve made yourself).
Here is a super simple example (in which I have added the socket hand_rSocket to the mobile mannequin skeleton I use:
Thanks! Yeah, I’m sure many developers are interested. As you could tell from the video, it is just an oversight that I haven’t talked about this feature before. I will try to add a short video on it when I have the time. It is really simple to work with though. As long as free roam is set to true, whatever is the current unit can move freely. If you want to enter combat you would set this to false and then run the activate unit event on the unit first in initiative order. You could do this after a conversation with an enemy, for instance.
Thanks for replying! After much editing, I managed to find what I was looking for in the code by complete fluke, still confused as to where I got it from but it’s working hah! Still, the whole blueprint itself doesn’t make complete sense to me but I guess I am still learning it bit by bit. Also congratulations on the marriage!
I am curious as, how does this blueprint itself work, as far as I can gather it’s a level blueprint, from a high level perspective, how do you go about generally attaching weapons to characters. For example, if you were in an inventory screen, where the player was holding a weapon compared to say a level where he is holding a weapons. Are you still just creating level scripts?
Also the next question is, how would I go about equipping multiple weapons to multiple characters? I’ve got it working on one player pawn, but it won’t equip to other pawns.
Ok, great that you managed to find a solution, at least. Hope you’ll figure out exactly why it worked as well
I’m not entirely sure what you say when you say “this blueprint itself” do you mean the one in my screenshot? That is indeed from the level blueprint. I do not generally use the level blueprint except for testing something out really quick. You can ignore most of what is in the blueprint above. The important part is the attach to component node. The rest is just to get a reference to a suitable actor.
From a high level perspective I guess it depends on your game. If you have an inventory screen you would probably do this from the blueprint you have created for managing the inventory. Possibly some form of equip event contained in your pawns that an inventory blueprint can call. I would probably do something like that myself, at least.
For equipping multiple weapons on multiple pawns you would need to get references to each pawn and do the same thing for each.
After much trial and error, I think I have a very basic understanding of how the blueprint works. After seeing changes in the array when I increased the number from 0 to 1 (sword wouldn’t equip if there was 2 player_tanks on screen), I thought I’d try something out. I found out there’s a sequence node? So I attached the “event begin play” to a sequence node so I could replicate the rest of the blue print and the only difference was the second player_tank would be equiping the second duplicate copy of the same sword. I then just changed the array from 0 to 1 in the second sequence.
I’ve also been able to now attach weapons to enemy units too. The main question is, how would you go about streamlining this blueprint? I feel as it would become too unwieldy very soon.
I would recommend against using Get All Actors of Class. The output array of that node is sorted in an unpredictable way, so it is really bad if you want to do something to a specific actor. I would only use Get All Actors Of Class if you really want to access just that, all actors, or if there will always only be one of that type of actor on the map (in which case Get index 0 will always get that specific actor). I used that node in the example I gave you just because it was a quick way to get the reference for demonstration purposes.
How you want to do this depends a lot on the specific requirements of your game, but you should definitely not have to create a separate set of nodes for each actor.
To give an example, if you wanted to make a game where you have swords placed in the game world that you equip when you move on top of them, you could get the colliding actor when one of your pawns collides with the sword, cast to your pawn blueprint and attach that specific sword to the pawn.
If you have not already, I recommend looking at UE4’s official blueprint tutorials. It is a good idea to have a solid understanding of the basic stuff before you go on to do something more fancy.
Okay thanks for that! I have another question I’ve been reading up on blueprints and would like to try something a bit more advanced, I’ve sketched out what I want it to do but have trouble implementing the blueprint itself. If you take a quick look at this video:Age of Decadence combat demo - bonus fight in the inn - bow/critical strike - YouTube — at 1:29 seconds. You’ll see the enemy npc on the left side of the room, advanced a few squares and automatically face the player character, which is in the opposite room with a bow. I would like to implement a feature similar to this. Essentially I want all pawns on the map to face the nearest enemy pawn and to also dynamic adjust their position if the enemy pawn moves.For example my unit’s back is facing an enemy pawn 3 squares away, the enemy pawn closes into melee range and my unit automatically faces the enemy character as opposed to having it’s back exposed to the enemy.
Also if it’s possible I’d like to know how to implement a blueprint that allows pawns to automatically face their current opponent when under attack.
I was wondering if you could help me with a suitable blueprint, of course only when we get the time, thanks in advance!
If you look at the Attack Victim event in Unit_Parent you can find the nodes I use for getting the attacker to face its target. If you duplicate these nodes and have them affect the target as well, the target should automatically face the attacker.
A simple, though not very efficient way to get all units to face the closest unit is to enable tick events on all units, have them find all actors of class Unit_parent each tick, find the distance to each and face the one closest using the nodes I mentioned. It is generally not recommended to run through arrays on each tick for multiple actors, though. A better way could be to only run this code while a unit is moving, and only comparing the distance to the current moving unit with the distance to the previously closest unit (which could be stored in each unit). Something like that should work well and not be too inefficient.
I have kind of always wanted to make a 2d turn based game where you explore in real time but once you see enemies you go into turn based combat. The only thing I would add on to that 2d game would be having multiple party members pop out during combat and then combine into my main character once the fighting is done.
How tough would that be to setup? If its not super crazy to setup I might grab this for the heck of it.
Well, I decided to get a copy of this for the fun of it. Then I realized its literally impossible to input my Credit card info because I moved to Canada. Seriously wtf
@Castle: Hey, to answer your question that sort of game is possible to make with the toolkit, though how difficult it is to implement will depend on how you want the end result to be. A couple of updates ago I added the option of turning off turn based mode, which basically means that the current unit gets an infinite move score that can be split up freely. At the same time I do not show the blue markers for tiles in move range. The effect is that the player can move around freely until you disable free roam mode and turn based combat resumes. This is more or less a fully realized feature and easy to implement. If this sounds like what you want to achieve it should not be too difficult.
Too bad about your problem with payment, though. You should e-mail marketplace support and see if someone from Epic can help you.
@Bantichai: Good luck! Let me know if you get stuck.
Well I’ve dived in as deep as I can in regards to the first feature I want implemented which was having both pawns face each other when combat initiates. I’ve watched your blueprint video too and it’s slowly edging me closer to understanding the “attack_victim” event. I know one of the nodes that control rotation is definitely “Find Look At Rotation”, I played around a little bit and got some varied results but not what I was looking for. Essentially at this point I’m learning by trial and error as I kind of just want to get a rough prototype level working as soon as possible. However, I’m still stuck haha. I’m having trouble with replicating all the nodes that are associated with rotation and I’m not sure how to link them, I watched the blueprint run while I was testing the game, so I know the general area of nodes that I’m looking for but still struggling to duplicate the nodes.
As to the second feature I’d like to have implemented, that’s completed beyond me. Also if your curious the type of game I’m trying to make is a game similar to The Age of Decadence and Expeditions: Conquistador with maybe a little XCOM thrown in.
Honestly that sounds exactly right, then when going into combat mode I simply spawn the rest of the units in my party so to speak and the fighting begins. When leaving combat mode I erase those units and update their stats. Yeah I will have to figure something out for payment. too bad I cant just buy stuff with bitcoin as that erases all of the BS involved.