Weapon Unleash (YEP)

From Yanfly.moe Wiki
Jump to navigation Jump to search


System

This is a plugin created for RPG Maker MV.

For help on how to install plugins, click here.

For help on how to update plugins, click here.

Got errors with your RPG Maker MV plugin? Click here.

Download

Yanfly Engine Plugins

This plugin is a part of the Yanfly Engine Plugins library.

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

Introduction

This plugin allows your game to be able to replace the Attack and Guard
commands or give them the option of having a skill randomly occur when using
them in reference to Golden Sun's Weapon Unleash system!

When replacing the Attack and Guard commands, the text can be changed out
for the command names as well. These replacements aren't limited to just
equipment in origin, but also from actors, classes, enemies, equipment, and
states, too!

Notetags

NotetagsMV.png

RPG Maker MV's editor is unable to allow for custom traits/properties that a game dev may wish to associate with a database object, event, map, etc. Notetags are used to work around such limitations by allowing the game dev to tag certain traits/properties using specific Notetags declared by the related plugin.

Here is a list of Notetag(s) that you may use.

There's a few notetags you can use to replace the default attack and provide
any weapon unleash effects. Note: If you're using notetags that write out
the skill's name and you have multiple skills in your database with the same
name, priority will be given to the skill with the highest ID.

Actor, Class, Enemy, Weapon, Armor, State notetags:

  --- Replace Attack ---

  <Replace Attack: x>
  <Replace Attack: name>
  This will replace the attack skill used by the battler. If a battler would
  have multiple attack replacements, priority will be given in the following
  order in a first-come-first-serve aspect:

  States - Highest to Lowest Priority
  Equipment - In order of equip list
  Enemy Aspect
  Class Aspect
  Actor Aspect

  --- Replace Guard ---

  <Replace Guard: x>
  <Replace Guard: name>
  This will replace the guard skill used by the battler. If a battler would
  have multiple guard replacements, priority will be given in the following
  order in a first-come-first-serve aspect:

  States - Highest to Lowest Priority
  Equipment - In order of equip list
  Enemy Aspect
  Class Aspect
  Actor Aspect

  --- Weapon Unleash ---

  <Weapon Unleash x%: y>
  <Weapon Unleash x%: name>
  This causes the Attack skill to have a x% chance to randomly use skill y
  (or named). This will apply only to the Attack Command. Insert multiple
  copies of this notetag to give more weapon unleashes. If a battler would
  have multiple weapon unleashes, the randomization check will occur in the
  following order:

  States - Highest to Lowest Priority
  Equipment - In order of equip list
  Enemy Aspect
  Class Aspect
  Actor Aspect

  If a weapon unleash check passes earlier in the list while there are still
  weapon unleashes later in the list, that weapon unleash will take priority
  and override all the following weapon unleashes.

  --- Guard Unleash ---

  <Guard Unleash x%: y>
  <Guard Unleash x%: name>
  This causes the Guard skill to have a x% chance to randomly use skill y
  (or named). This will apply only to the Guard Command. Insert multiple
  copies of this notetag to give more guard unleashes. If a battler would
  have multiple guard unleashes, the randomization check will occur in the
  following order:

  States - Highest to Lowest Priority
  Equipment - In order of equip list
  Enemy Aspect
  Class Aspect
  Actor Aspect

  If a guard unleash check passes earlier in the list while there are still
  guard unleashes later in the list, that guard unleash will take priority
  and override all the following guard unleashes.

  --- Unleash Rate Modifiers ---

  <Weapon Unleash: +x%>
  <Weapon Unleash: -x%>
  This alters the weapon unleash rate for all weapon unleashes by +x%/-x%.

  <Weapon Unleash x: +y%>
  <Weapon Unleash x: -y%>
  <Weapon Unleash name: +y%>
  <Weapon Unleash name: -y%>
  This alters the weapon unleash rate for skill x (or name) by +y%/-y%. If
  you are using the named notetag and you have multiple skills in your
  database that use multiple names, priority will be given to the skill with
  the highest ID.

  <Guard Unleash: +x%>
  <Guard Unleash: -x%>
  This alters the guard unleash rate for all weapon unleashes by +x%/-x%.

  <Guard Unleash x: +y%>
  <Guard Unleash x: -y%>
  <Guard Unleash name: +y%>
  <Guard Unleash name: -y%>
  This alters the guard unleash rate for skill x (or name) by +y%/-y%. If
  you are using the named notetag and you have multiple skills in your
  database that use multiple names, priority will be given to the skill with
  the highest ID.

Skill Notetags:

  <Command Text: x>
  <Attack Text: x>
  <Guard Text: x>
  If you are using Replace Attack or Replace Guard, you can change the way
  the command name appears in the actor command window to x. If you are
  using the <Command Text: x> notetag, this will apply to both Attack and
  Guard names.

Lunatic Mode

JavaScript.png

For advanced users who have an understanding of JavaScript, you can use the following features added by the plugin to further enhance what you can do with your game project.

Conditional Replace Attack & Guard

For those who have JavaScript proficiency and would like to make attack or
guard replacement work off conditional means, you can use the following
Lunatic Mode notetags:

Actor, Class, Enemy, Weapon, Armor, State notetags:

  --- Replace Attack ---

  <Custom Replace Attack>
  if (user.level > 50) {
    id = 50;
  } else {
    id = 0;
  }
  </Custom Replace Attack>
  This will run a custom conditional check to see if the Attack command gets
  replaced. The 'id' variable is the skill ID that it will change to. If the
  'id' variable is 0, the check has failed and will continue on with the
  list to the next target.

  --- Replace Guard ---

  <Custom Replace Guard>
  if (user.level > 50) {
    id = 50;
  } else {
    id = 0;
  }
  </Custom Replace Guard>
  This will run a custom conditional check to see if the Guard command gets
  replaced. The 'id' variable is the skill ID that it will change to. If the
  'id' variable is 0, the check has failed and will continue on with the
  list to the next target.

Conditional Weapon Unleash and Guard Unleash

For those who have JavaScript proficiency and would like to add Weapon or
Guard Unleashes with conditional success rates, you can use the following
Lunatic Mode notetags:

Actor, Class, Enemy, Weapon, Armor, State notetags:

  --- Weapon Unleash ---

  <Custom Weapon Unleash: x>
  rate = user.hp / user.mhp;
  </Custom Weapon Unleash: x>

  <Custom Weapon Unleash: name>
  rate = user.hp / user.mhp;
  </Custom Weapon Unleash: name>

  This causes the Attack skill to have a chance to randomly use skill x
  (or named). The 'rate' variable will determine the success rate of the
  unleash. This will apply only to the Attack Command. Insert multiple
  copies of this notetag to give more weapon unleashes. If a battler would
  have multiple weapon unleashes, the randomization check will occur in the
  following order:

  States - Highest to Lowest Priority
  Equipment - In order of equip list
  Enemy Aspect
  Class Aspect
  Actor Aspect

  If a weapon unleash check passes earlier in the list while there are still
  weapon unleashes later in the list, that weapon unleash will take priority
  and override all the following weapon unleashes.

  --- Guard Unleash ---

  <Custom Guard Unleash: x>
  rate = user.hp / user.mhp;
  </Custom Guard Unleash: x>

  <Custom Guard Unleash: name>
  rate = user.hp / user.mhp;
  </Custom Guard Unleash: name>

  This causes the Guard skill to have a chance to randomly use skill x
  (or named). The 'rate' variable will determine the success rate of the
  unleash. This will apply only to the Guard Command. Insert multiple
  copies of this notetag to give more guard unleashes. If a battler would
  have multiple guard unleashes, the randomization check will occur in the
  following order:

  States - Highest to Lowest Priority
  Equipment - In order of equip list
  Enemy Aspect
  Class Aspect
  Actor Aspect

  If a guard unleash check passes earlier in the list while there are still
  guard unleashes later in the list, that guard unleash will take priority
  and override all the following guard unleashes.

Tips & Tricks

The following Tips & Tricks effects use this plugin:

Changelog

Version 1.05:
- Bypass the isDevToolsOpen() error when bad code is inserted into a script
call or custom Lunatic Mode code segment due to updating to MV 1.6.1.

Version 1.04:
- Bug fixed for replaced attacks that do not have a selection target.
- Documentation update. Fixed a help file error.

Version 1.03:
- Lunatic Mode fail safes added.

Verison 1.02:
- If a battler is afflicted with berserk, charm, or confusion and they use a
scope other than a single target action, the scope will now be adjusted to
fit the scope of the action if it targets multiple enemies or allies.

Version 1.01:
- Updated for RPG Maker MV version 1.1.0.

Version 1.00:
- Finished Plugin!