Animation Augments (MV Plugin Tips & Tricks)

From Yanfly.moe Wiki
Revision as of 15:42, 5 July 2019 by Yanfly (talk | contribs) (Created page with "{{Yanfly Tips & Tricks MV |preview = <youtube>https://www.youtube.com/watch?v=qd-WvB0VOFI</youtube> |desc = For those using the Attachable Augments plugin and Weapon Animati...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

Warning for RPG Maker MZ Users

Warning.jpg

If you are using RPG Maker MZ and VisuStella MZ, the following code may or MAY NOT work as this Tips & Tricks is made for RPG Maker MV. VisuStella MZ is NOT responsible if this Tips & Trick does not work because the code base for RPG Maker MV and RPG Maker MZ are different and the code base between Yanfly Engine Plugins and VisuStella MZ is even more drastically different.

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!