Animation Augments (MV Plugin Tips & Tricks)

From Yanfly.moe Wiki
Jump to navigation Jump to search

Welcome to the wiki! This is where you can find resources from Yanfly.moe, Ækashics.moe,
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.


For those using the Attachable Augments plugin and Weapon Animation plugin, you may be wondering if it’s possible to change the weapon image associated with different augments. The answer, of course, is obviously Lunatic Mode!

Required Plugins

The following plugin(s) is required to create this Tips & Tricks effect:

For help on how to install plugins, click here.

For help on how to update plugins, click here.

About

This is a Tips & Tricks effect created for RPG Maker MV. Tips & Tricks are not to be confused with plugins. Instead, they are usually customized code created for the sake of producing unique features/effects that do not require an entire plugin to do.

Yanfly Engine Plugins

This Tips & Tricks effect is made possible due to the Yanfly Engine Plugins library.

Click here if you want to help support Team Yanfly on Patreon.

Instructions

Follow video instructions.

Check here for the copy/paste code: Remember, there are bits and pieces of the code you need to change to fit your game!

// Standard Augment Effect

<Augment: Glyph>
Add Attack Element: Wind
Add Element Rate: Wind, 90%
Price: +1000
Change Prefix: Windy
Change Text Color: 24
</Augment: Glyph>

// Attach Augment Effect

<Augment Attach Eval: Glyph>
// Check if the item is a weapon.
if (DataManager.isWeapon(item)) {
  // Define the icon variable.
  var icon;
  // Check if the item's weapon type is ID 1.
  if (item.wtypeId === 1) {
    // Set the icon to icon 1093.
    icon = 1093;
    // Set the Weapon Animation image used to 'Dagger Green'.
    item.weaponImageIndex = 'Dagger Green';
    // Set the Weapon Animation attack motion to 'swing'.
    item.weaponAttackMotion = 'swing';
    // Set the attack animation to Animation 7.
    item.animationId = 7;
    // Check if the item's weapon type is ID 2.
  } else if (item.wtypeId === 2) {
    // Set the icon to icon 1109.
    icon = 1109;
    // Set the Weapon Animation image used to 'Sword Green'.
    item.weaponImageIndex = 'Sword Green';
    // Set the Weapon Animation attack motion to 'swing'.
    item.weaponAttackMotion = 'swing';
    // Set the attack animation to Animation 7.
    item.animationId = 7;
  }
  // Apply the icon to the augmented item.
  ItemManager.applyAugmentSetIcon(item, icon, slotId, true);
}
</Augment Attach Eval: Glyph>

// Detach Augment Effect

<Augment Detach Eval: Glyph>
// Check if the item is a weapon.
if (DataManager.isWeapon(item)) {
  // Set the weapon's image back to the base weapon image.
  item.weaponImageIndex = baseItem.weaponImageIndex;
  // Set the weapon's attack motion back to the base weapon motion.
  item.weaponAttackMotion = baseItem.weaponAttackMotion;
  // Set the weapon's attack animation to the base animation.
  item.animationId = baseItem.animationId;
  // Reset the icon for the item.
  ItemManager.applyAugmentSetIcon(item, undefined, slotId, true);
}
</Augment Detach Eval: Glyph>

Happy augmenting!