WeaponMechanics / WeaponMechanicsCosmeticsWiki

Wiki for the WeaponMechanicsCosmetics plugin
6 stars 0 forks source link

Guns Animations (Again) #22

Open RollexGrief opened 1 year ago

RollexGrief commented 1 year ago

Description

Animations using custom model data change

As I have done, for example: https://vimeo.com/713684549 (It's only WeaponMechaincs and my custom addon WeaponMechaincsPlus) https://vimeo.com/715997841 (It's only WeaponMechaincs and my custom addon WeaponMechaincsPlus)

My performance on SkriptLang: https://pastebin.com/30MeEbkT

Hope to see this feature either in this or the next addon. Willing to help in any way I can for the sake of developing the plugin.

Configuration

        Animations:
            Enabled: 1 #True/False (Just in Skript i have problems with True and False in my custom config so i'm using 1 and 0)
            StopAnimationAfterScopeChange: #Stops the animation after switching from the scope (needed for reload animations like the M24 from my first video)
            Wait: 0 #Timeout between frames (only for guns like M24 from my first video)
            DisableShootWhileReloadingStarted: 0 #Disable the animation at the start of reloading (necessary so that there are no problems between the firing and reloading animations)
            Shoot: 
                Default: #Default its non-scope mode
                    Single: #Single firemode
                        - "24|2" #Custom model data number | ticks for this frame
                        - "1|1" 
                    AutoAndBurst: #Auto and Burst firemodes
                        - "24|1"
                        - "1|1"
                Scope: 
                    Single:
                        - "25|2"
                        - "2|1"
                    AutoAndBurst:
                        - "25|1"
                        - "2|1"            
            Reload: #Reload animations during WeaponReloadEvent
                - "3|2" #Custom model data number | ticks for this frame
                - "4|2"
                - "5|2"
                - "6|2"
                - "7|2"
                - "8|2"
                - "9|2"
                - "8|2"
                - "7|2"
                - "6|2"
                - "10|2"
                - "11|2"
                - "12|1"
                - "13|1"
                - "14|1"
                - "15|1"
                - "16|1"
                - "17|1"
                - "18|1"
                - "19|2"
                - "20|2"
                - "21|2"
                - "22|2"
                - "23|2"
                - "1|1"

Payment

Nightshade73 commented 1 year ago

This is a really cool enhancement, especially with what the sample videos provide. From a resource pack standpoint, a lot of these animations can be achieved with very little extra file space consumption by use of Child items. I can see this being a fantastic feature and I'm more than willing to pay for this to be added to WMC.

I love how in the videos you can swap attachments onto weapons by just dropping it onto the item, I think that's really cool.

CJCrafter commented 1 year ago

I'm a blockbench user... How do you make the models appear in a "smooth-ish" animation? Trial and error?

RollexGrief commented 1 year ago

@CJCrafter Smooth animations are only available on minecraft bedrock , because java has a limited number of frames per tick

RollexGrief commented 1 year ago

In any case, even this animation would be a breakthrough

RollexGrief commented 1 year ago

I'm a blockbench user... How do you make the models appear in a "smooth-ish" animation? Trial and error?

But of course, yes. Creating animation took me an average of a few hours(When I first started (shooting, reloading)). If you need help will be happy to help.

RollexGrief commented 1 year ago

I'm a blockbench user... How do you make the models appear in a "smooth-ish" animation? Trial and error?

But it is possible that during testing you will face a "jumping" of the weapon model because of the GENERIC_ATTACK_SPEED attribute when you select or pick up the weapon. The thing is that due to server latency, the attribute is applied with a delay. I solved this problem so: My script checks slots hotbar and if the player is not holding the item in his hand, it was set an empty model (just an empty first-person weapon), when the player took the weapon model changed to Default or Scope, so it was removed this effect "jumping" weapon for milliseconds

Reyeraz commented 1 year ago

i like it