[UE5 Lyra] Custom banana weapon tutorial : data and animation setup

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ค. 2024
  • Learn how to create a new weapon in Lyra! I'll mostly focus on where all that data is stored and how to setup the animation so we only need one animation sequence for the banana weapon to look good resting on the left hand.
    I'll also shortly go over the pivot tool and the console variable tool as I think they're very useful tools.
    This video may spawn other topics/questions so I might have some follow-up videos.
    Animating with the control rig can be buggy but it's also very powerful.
    Join my Patreon to get video credits and if you'd like to give thanks!
    / nancedevdiaries
    Thanks for watching!
    ---------------
    Timestamps:
    00:00 - Intro
    00:35 - Setting up the banana
    01:56 - Banana pivot
    04:10 - Deform the banana
    05:20 - God mode as a preset
    07:14 - Save a console vars preset
    08:33 - Setup the weapon pad
    10:57 - copying over shotgun data assets
    16:01 - Weapon equipment definition
    17:13 - Banana gun mesh attached
    19:49 - Banana fire ability setup
    21:02 - Weapon anim layer setup
    23:42 - Left hand pose override explanation
    25:56 - Blend Masks
    27:44 - Spawn only as Manny
    30:05 - Turn collisions off for banana
    30:47 - Create a folder for animations
    32:43 - Additive animation with control rig
    37:07 - The sequencer lives on for more animation changes

ความคิดเห็น • 63

  • @roja
    @roja ปีที่แล้ว

    The stuff you teach is super exciting. We need you!

  • @BooneyTune
    @BooneyTune ปีที่แล้ว

    You are so amazing! The quality of the information is so good

  • @CalKettz
    @CalKettz ปีที่แล้ว

    that slam reload on the banana though lmao.
    Awesome tutorials please keep them coming very chill tutorial

  • @quinton_d
    @quinton_d 3 หลายเดือนก่อน

    10/10 tutorial once again!

  • @tomscodeshk
    @tomscodeshk ปีที่แล้ว

    Brilliant tutorial, thanks! Bananas all over the place :D

  • @LulzSec777
    @LulzSec777 9 หลายเดือนก่อน

    Great video thanks alot!

  • @GenerQAQ
    @GenerQAQ 11 หลายเดือนก่อน

    That's great!

  • @cv7041
    @cv7041 ปีที่แล้ว

    The hand_l is part of the left fingers mask, and changes to the hand/wrist are being applied. However the left hand IK is overriding the hand position/rotation. the position of the left hand appears to be connected to VB_Hand_L_weaponSpace + the HandFKWeight. The VB bone is copied to the IK bone in FullBody_SkeletalControls. You can test by disabling the Left IK in the Anim Layer.

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว

      Thanks for the insights, that makes sense. I noticed the right hand ik and left hand ik are linked and I like how the right hand looks. I wonder if we can move VB_Hand_L_weaponSpace as part of the offset. I'll have to check next week or later.
      Good to know though for those who want to rotate the wrist!

    • @cv7041
      @cv7041 ปีที่แล้ว +1

      @@nancedevdiaries - how I solved it (90%) - th-cam.com/video/_-Zs0rSrAAw/w-d-xo.html

  • @johndoe35717
    @johndoe35717 9 หลายเดือนก่อน +1

    if you scroll while flying in the editor it changes camera speed

  • @pryzmgaming
    @pryzmgaming ปีที่แล้ว +1

    Learning Unreal over the last month coming from Unity, and i have to say the animation system is extremely complex and difficult to understand for me, thanks for the video though certainly helpful.

    • @shotgun1995hot
      @shotgun1995hot ปีที่แล้ว +2

      I understand your pain my brother

    • @whyareless
      @whyareless ปีที่แล้ว

      Definitely been steep to learn about

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว +2

      My next video I'm thinking of having it be about adding a new locomotion state + animations: surface swimming. The gun would be unequipped when going swimming so that the animation makes sense. Hopefully that would help understand how Lyra sets up its animation graph. It's quite complex but powerful.

    • @whyareless
      @whyareless ปีที่แล้ว +1

      @@nancedevdiaries that would be amazing! Does Lyra have swimming animations btw?

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว +1

      unfortunately no... I bought a set from the store, worth every penny :). I guess I'd be making free publicity for them, it's a great set! www.unrealengine.com/marketplace/en-US/product/swimming-animation-set. I try to keep making these tutorials with free assets but might have to make an exception in this case.

  • @donncharyan
    @donncharyan ปีที่แล้ว +1

    Another fantastic tutorial! First time I've seen someone tackle the animation part of adding a new weapon. One thing I still haven't found or figured out is how to pick up ammo for lyra weapon (other than walking over the weapon pad which seems odd)... if you have any hints.

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว +1

      Thanks @donncharyan! It does feel odd to pickup ammo at the weapon pad. If you look at B_WeaponSpawner, in the "Give Weapon" function, all it does if the player already has that weapon equipped and is missing some ammo is call "Add Stat Tag Stack" on the weapon Instance. GA_Weapon_ReloadMagazine does something similar with "Lyra.ShooterGame.Weapon.SpareAmmo" saved in a variable called "Starting Spare Ammo".
      What I figure is you could have an ammo pickup that does the same thing on overlap, destroys itself or has some cooldown like the weapon pickups

    • @donncharyan
      @donncharyan ปีที่แล้ว +1

      @@nancedevdiaries thanks for this! Perfect.

    • @donncharyan
      @donncharyan ปีที่แล้ว

      @@nancedevdiaries thanks for the advise: On your advise -that's working now - I created a blueprint with object and overlap just used all the code from the weapon spawner except for the one that grants gun - so it transfers almost perfectly and only need to cut out a few unnecessaries., When you make the weapon instance public you can use the same blueprint for different weapon types. Thanks a million for your help!

  • @davy4842
    @davy4842 ปีที่แล้ว

    Great video ….informations have been revived bannana downloaded

  • @PsyKot1k
    @PsyKot1k 6 หลายเดือนก่อน

    hey any chance you could make a laser gun / lightning gun tutorial for lyra. im having trouble with making it work properly and you got the skillzzz xD

  • @kasperlarsson7598
    @kasperlarsson7598 ปีที่แล้ว

    Nance, how do you put a level into the Common Maps Tab? Said it before. Big fan of your content!

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว

      It's in the editor settings, in the Lyra developer settings. You can add/remove entries from the common maps array. I quite like that editor tool to go to maps more easily:)

  • @donncharyan
    @donncharyan 10 หลายเดือนก่อน

    I went back to this tutori again to do a one handed weapon (left hand is handing down) and it all works. but if im bot firing or if i do a ash it reverts to rifle default animation. do you know where this is set? ive tried changing the base animation blueprint but that seems to have endless animations. fantastic tutorial

  • @went0ut
    @went0ut ปีที่แล้ว

    no one think of it, but we need it

  • @islandonlinenews
    @islandonlinenews ปีที่แล้ว

    @12:00

  • @jarlseneoe2670
    @jarlseneoe2670 ปีที่แล้ว

    Hey nance any way you can go throught How to make an if/boolean state if the lyra char should despawn after death? Im making an zombie game where the alive npc when it dies it becomes an zombie and when the zombie dies it lays there for an minute or so and then despawns

  • @testvideo305
    @testvideo305 ปีที่แล้ว

    Did you know that there is a way to view the banana while editing additive control rig in the level sequence?

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว +1

      Please share :). I was having trouble with the banana's offset/parenting

  • @kasperlarsson7598
    @kasperlarsson7598 ปีที่แล้ว

    I found that making the B_Banana blueprint really screwed up the animation for some reason. The character started to walk only backwards and to the left. I am not sure if that is because of a Lyra Update or just because I got something wrong. I fixed it by importing the mesh again and this time ticked "Import Skeleton" to on. Then I duplicated the B_Shotgun blueprint and replaced the skeleton mesh inside of it to my Banana Skeleton mesh. That fixed the broken animation.

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว

      Just guessing here, could it be that your banana has collisions enabled?

    • @kasperlarsson7598
      @kasperlarsson7598 ปีที่แล้ว

      @@nancedevdiaries I think that may have been the case, I saw you fixed that in the end of the video too, but I had already fixed the problem in the other way so I cannot confirm !

  • @xTHHxAimiForevr
    @xTHHxAimiForevr ปีที่แล้ว

    Thanks so much for this! What about sounds?

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว +2

      My pleasure :). If you're asking about firing sounds: the sounds are setup for example on the shotgun in GCN_Weapon_Shotgun_Fire, which is a gameplay cue burst. It's using a meta sound MSS_Weapons_Shotgun_Fire, set in GCN_Weapon_Shotgun_Fire's Class Defaults under Burst Effects->Burst Sounds.
      The gameplay cue is triggered and set in GA_Weapon_Fire_Banana in the "Gameplay Cue Tag Firing" variable, you could set your own like "GameplayCue.Weapon.Banana.Fire", it's set to the shotgun one at the moment.
      GCN_Weapon_Shotgun_Fire sends the Fire event ("Send Weapon Fire") to the music manager (seen in the WeaponAudioFunctions) which sets the vars in the music system. To be honest I'm still wrapping my head around the music system and meta sounds. Hoping this helps out a bit!

    • @xTHHxAimiForevr
      @xTHHxAimiForevr ปีที่แล้ว

      @@nancedevdiaries man I'm looking through this and metasounds is confusing as hell. I thought the MSS file would have a wav file source i could edit or something but there isn't anything there.

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว

      Yeah opening MSS_Weapons_Shotgun_Fire up it looks pretty complex at first glance. If you zoom in to the "gun punch" section, you can find an "Input" node with an array of wav sounds that hooks into Random Get (WaveAsset:Array). If you click on that input node, you'll see the 3 different wav sounds that get chosen randomly when you fire.
      There are other input nodes like that for when the ammo is low. I have to be honest, I have no idea what a "sweetener" is but there's sounds for that too. This is all so that it sounds great and not always the same annoying wav all the time. I'm sure if you'd use WWise all that logic would be outside the engine. I wish there was more documentation and videos about Meta sounds and sound systems in general.

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว

      Another point: at least we have Lyra as a great example of how to use Meta sounds so that's definitely another amazing point for Lyra!

  • @roja
    @roja ปีที่แล้ว

    @NanceDevDiaries Would you happen know why the AI only picks up but does not 'fire' custom weapons? They just run around with them.

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว

      Off the top of my head, is this just the custom weapons? If not then maybe your canAIShoot in the developer settings is set to false in the editor settings

  • @imadmimo9252
    @imadmimo9252 ปีที่แล้ว

    any idea when the next video will be up !

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว

      I'll be aiming for next Friday, it's been a busy time. I'm planning it out here and there it'll be a good one 😃

    • @davy4842
      @davy4842 ปีที่แล้ว

      @@nancedevdiaries take your time we don’t want you to burn out and stop them tutorials XD

  • @vegitoblue2187
    @vegitoblue2187 ปีที่แล้ว

    Can you go over how the abilities are given to the player per weapon?

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว +2

      The abilities are added through the ability set, see 19:50 to 20:48. That ability set is granted to the player and so all the abilities within are given to the player on equip and removed on unequip/weapon swap. Thanks for the question, I could go into more detail in a follow up tutorial, I'll make a note :).

    • @vegitoblue2187
      @vegitoblue2187 ปีที่แล้ว

      @@nancedevdiaries I understand the adding. Similar to how each player has an ability set. How are they removed?

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว

      Following up the code, the abilities are taken away in LyraEquipmentManagerComponent's FLyraEquipmentList::RemoveEntry, on line 127. It just calls TakeFromAbilitySystem() on all the granted ability handles from the applied equipment entry.
      This code is called either on setting the active slot (swapping weapon) or removing an item from slot.

    • @vegitoblue2187
      @vegitoblue2187 ปีที่แล้ว +1

      ​@@nancedevdiaries Thanks! I cracked it!

  • @kasperlarsson7598
    @kasperlarsson7598 ปีที่แล้ว

    I cannot get the console command line to show. I tried to remap the keybindings to something else too. to ALT + ` but still nothing shows up. Have you had that problem?

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว

      Oh weird, I haven't had that issue, Tilda (~) is the upper left key under the ESC key in my keyboard layout. I read that the Spanish layout makes it hard to reach the Tilda key. Odd that reminding opening up the console didn't work. Please share your solution here for others if you find it, I might try rebinding that key to check that issue out later.

    • @kasperlarsson7598
      @kasperlarsson7598 ปีที่แล้ว +1

      @@nancedevdiaries | Still looking for a solution on that, will get back when I figure it out! Thanks for replying !

  • @kryogenicgames
    @kryogenicgames ปีที่แล้ว

    lol, how did you even think of this haha

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว +1

      XD I wanted to make a tutorial with a new weapon and something free, even though that banana looks ready for banana bread haha.

    • @xTHHxAimiForevr
      @xTHHxAimiForevr ปีที่แล้ว

      @@nancedevdiaries what about the FPS Weapon Bundle? stuff that uses skeletal meshes with moving bones as part of their animations?

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว

      The current weapons (pistol, rifle, shotgun) in Lyra also have skeletal meshes and bones that move for reload and other animations. You can use B_Weapon as a base for a new attached weapon with a skeletal mesh. I don't know about the FPS weapon Bundle but sounds like it should work out fine

  • @austincable
    @austincable ปีที่แล้ว

    @nancedevdiaries @cv7041 Has there been any further development for improving the L hand hold of the banana in Idle_Hipfire or is cv7041's technique the way to go? Thanks for your time! Love your content!

    • @nancedevdiaries
      @nancedevdiaries  ปีที่แล้ว +1

      Thanks! I haven't yet found/tried a better way. I would also love more solutions and improvements. It's nice not to have to make unique assets for every weapon. What might help, but i haven't tried, is disabling the left-hand IK, similar to my "disable leg IK" video? I will share if I end up using a nicer process and please share too :)