Skin

Changes weapon item to different skins/positions

You may have noticed that when you are holding one of the default weapons, and you left-click to aim, the weapon changes positions. Or when you start sprinting, the gun changes places to point downward as if you were holding it with 2 hands. This is the Skin: module in action.

Legacy

  Skin:
    Default: <integer>
    Scope: ADD <integer>
    Scope_<number>: ADD <integer>
    No_Ammo: ADD <integer>
    Reload: ADD <integer>
    Sprint: ADD <integer>
   
    # This requires WeaponMechanicsCosmetics to be installed
    <skin>: ADD <integer>
    <another skin>: ADD <integer>
    
    # This required WeaponMechanicsPlus to be installed
    Attachments:
      <attachment title>: ADD <integer>
      <another attachment>: ADD <integer>

Only 1 of Default, Scope, Scope_<number>, No_Ammo, Reload, and Sprint can be shown simultaneously. If you are Sprinting and Scoping simultaneously, the Sprint skin will be used since it has a higher priority. Here is the priority order:

No_Ammo -> Scope_<number> -> Scope -> Reload -> Sprint -> Default

  1. The Default skin is the hip-fire skin.

  2. The Scope skin is used for aiming down iron sights.

    1. You can also change the model for each stacked scope level

    2. For example, use Scope_1 to replace the first stacked zoom (Remember that the first stacked zoom is the second zoom)

    3. You can use this to create canted sights

  3. The Reload skin is used while loading ammo into the weapon.

  4. The Sprint skin is used while the player is sprinting.

  5. The No_Ammo skin is used when the gun has no loaded ammo.

Add

See how all options (except Default) require the "ADD <integer>" option? Instead of setting the skin to a number, we sum up all the options. This allows us to keep configs relatively small, as long as we keep our resource packs organized. If you are having trouble, check out the tutorial below:

in-depth skin tutorial video

Skins

Want to get donations from players? Skins are perfect for getting players to support your development! Check out this example from the AK_47:

  Skin:
    Default: 5
    Scope: ADD 1000
    Sprint: ADD 2000
    blue: ADD 10000 # blue and red will only work if you have purchased WMC
    red: ADD 20000

When holding the AK_47, you can use /skin blue or /skin red to change the weapon's skin (As long as you have the weaponmechanics.skin.AK_47.blue and weaponmechanics.skin.AK_47.red permissions).

Attachments

Let's say you want to add a reflex sight to your weapon. This means you want to change the skin, so instead of seeing iron sights when you scope, you want a "dot" sight. Let's say you have an attachment called Reflex_Sight. Here is what you can do:

  Skin:
    # Define other options here, such as Default and Scope
    Attachments:
      Reflex_Sight: ADD 100000

Last updated