Announcement

Collapse
No announcement yet.

[SUPPORT] Advanced Turn Based Tile Toolkit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    Comment


      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.
      On the forum, Kev will do.

      Comment


        Originally posted by stormhierta View Post
        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!
        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.

        Originally posted by Bantichai View Post
        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.
        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:

        Click image for larger version

Name:	fRvgQwf.png
Views:	1
Size:	77.5 KB
ID:	1113852

        In action:
        Click image for larger version

Name:	7XDj3nU.png
Views:	1
Size:	390.4 KB
ID:	1113853

        I recommend reading more about sockets in the UE4 documentation here: https://docs.unrealengine.com/latest...eshes/Sockets/

        Originally posted by kevdotward View Post
        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! 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.
        The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

        Comment


          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.
          Attached Files
          Last edited by Bantichai; 08-17-2016, 04:44 AM. Reason: Updated outcome.

          Comment


            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.
            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

            Comment


              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.

              Click image for larger version

Name:	Multiple Attachments.png
Views:	1
Size:	240.2 KB
ID:	1113944
              Last edited by Bantichai; 08-17-2016, 07:45 PM. Reason: Updated outcome.

              Comment


                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.
                The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                Comment


                  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:https://www.youtube.com/watch?v=81iY1CsNVkk --- 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!
                  Last edited by Bantichai; 08-19-2016, 09:36 AM.

                  Comment


                    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.
                    The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                    Comment


                      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.
                      Last edited by Castle; 08-19-2016, 03:01 PM.
                      - Russell Meakim AKA The Castle
                      BLOG: https://steemit.com/@thecastle

                      Comment


                        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 :/
                        - Russell Meakim AKA The Castle
                        BLOG: https://steemit.com/@thecastle

                        Comment


                          Okay thanks for tips, I'll see if I can implement this.

                          Comment


                            @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.
                            The Advanced Turn Based Tile Toolkit (Marketplace page - Feedback thread)

                            Comment


                              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.

                              Comment


                                Originally posted by Monokkel View Post
                                @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.
                                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.

                                Ill see what I can do.
                                - Russell Meakim AKA The Castle
                                BLOG: https://steemit.com/@thecastle

                                Comment

                                Working...
                                X