Skill Core (YEP)

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.



Download

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.


Masterarbeit Writer

Extension Plugins

The following plugins are Extension Plugins that require this plugin as its Parent Plugin.

Place the following plugins below this plugin located in the Plugin Manager if you plan on using them.

Yanfly Engine Plugins

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


Introduction

Skills in RPG's consist of three main components: Costs, Damage, and
Effects. Although not all components are required for a skill, they
certainly make up a good chunk of it. Damage will be handled by another
plugin, but this plugin will provide a core handling for skill costs and
skill effects.

This plugin also includes the ability for battlers to swap their HP, MP,
and/or TP gauges for something different if it would fit the character
better (for example, some classes don't use MP and/or TP).

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.

---

These notetags can adjust either skill costs or special skill effects.

Skill Notetags:
  <HP Cost: x>
  Changes the skill to have x as its HP cost. RPG Maker MV's editor lacks
  HP cost functions so this would allow skills to use HP as their cost.

  <HP Cost: x%>
  Changes the skill to cost a percentage of the character's MaxHP value.

  <MP Cost: x>
  Changes the skill to have x as its MP cost.
  This helps bypass the database's hard limit of 9999.

  <MP Cost: x%>
  Changes the skill to cost a percentage of the character's MaxMP value.

  <TP Cost: x>
  Changes the skill to have x as its TP cost.
  This helps bypass the database's hard limit of 99.

  <TP Cost: x%>
  Changes the skill to cost a percentage of the character's MaxTP value.
  Although the default MaxTP is 100, this tag will be useful for any
  plugins that will alter a character's MaxTP values.

  <Hide in Battle>
  This will hide and disable the skill during battle.

  <Hide in Field>
  This will hide and disable the skill outside of battle.

  <Hide if Learned Skill: x>
  <Hide if Learned Skill: x, x, x>
  <Hide if Learned Skill: x to y>
  Will hide and disable this skill if skill x has been learned. If multiple
  skills are listed, the skill will be hidden and disabled if any one of the
  listed skills have been learned. This will ONLY apply to skills that have
  been learned and not skills added through traits.

Gauge Swapping

This plugin also lets you swap around the HP, MP, and TP Gauges to any order
you want assuming that all the plugins you use will keep the same order of
HP, MP, and TP and does not override the default gauge drawing process. If
you use any plugin extensions, they can be swaped in as well.

Note: If you do not have 'Display TP in Battle' checked under the System tab
in the database, nothing will be shown for the third slot.

Class Notetag:
  <Swap Gauge x: y>
  This will change gauge x (1, 2, or 3) to y. Replace y with 'HP', 'MP', or
  'TP' to have it display that gauge type in that gauge slot. If you wish
  for that slot to display nothing, insert 'Nothing' or 'Null' in place of
  y in the notetag.

Weapon, Armor, and State Notetags:
  <Swap Gauge x: y>
  Actors with equipment or states  that contain these notetags or enemies
  with states that contain these notetags will display those swapped gauges
  in place of the default settings or settings defined by the Class or
  Enemy notetags.

  Priority will go in the following order:
    Weapons, Armors, States, Class, Enemy

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.

Skill Costs

For users who want more control over skill costs and skill effects, there
exists notetags that allow you to apply code to the costs and/or effects of
a skill. For effects, this will also extend towards item control, as well.

  <Custom HP Cost>       Example: <Custom HP Cost>
   code                            cost += $gameVariables.value(1);
   code                           </Custom HP Cost>
  </Custom HP Cost>
  This allows the skill to have a custom HP cost based off of code. For the
  piece of code, 'cost' is a variable already predefined with the HP Cost
  and the HP percentage cost.

  <Custom MP Cost>       Example: <Custom MP Cost>
   code                            cost += $gameVariables.value(1);
   code                           </Custom MP Cost>
  </Custom MP Cost>
  This allows the skill to have a custom MP cost based off of code. For the
  piece of code, 'cost' is a variable already predefined with the MP Cost
  and the MP percentage cost.

  <Custom TP Cost>       Example: <Custom TP Cost>
   code                            cost += $gameVariables.value(1);
   code                           </Custom TP Cost>
  </Custom TP Cost>
  This allows the skill to have a custom TP cost based off of code. For the
  piece of code, 'cost' is a variable already predefined with the TP Cost
  and the TP percentage cost.

Custom Show Requirements

For those who would like to show certain skills and disable them under any
custom conditions using their JavaScript knowledge, use the following:

Skill Notetag:
  <Custom Show Eval>
  if (user.level > 50) {
    visible = true;
  } else {
    visible = false;
  }
  </Custom Show Eval>
  If the visible is set to true, the skill is shown (not hidden) and enabled
  if all other conditions are met. If visible is set to false, the skill is
  disabled and hidden from the list.

Custom Requirements and Execution

For those with a bit of JavaScript experience, you can use the following
notetags to restrict a skill and what kind of code to process when executing
the said skill.

Skill Notetags:

  <Custom Requirement>
   if ($gameParty.gold() > 1000) {
     value = true;
   } else {
     value = false;
   }
  </Custom Requirement>
  If value is set to true, the skill will be useable provided that all other
  requirements have been met. If the value is set to false, the skill won't
  be useable.

  <Custom Execution>
   $gameParty.loseGold(1000);
  </Custom Execution>
  This runs the code between the notetags upon using the skill.

Custom Cost Display

For those with a bit of JavaScript experience, you can add new ways to
display the skill cost.

Skill Notetags:

  <Cost Display Eval>
   var variableId = 1;
   var value = 1000;
   $gameVariables.setValue(variableId, value);
  </Cost Display Eval>
  This notetag runs an eval before displaying the skill's cost. This is so
  you can set up variables and whatnot for your skill cost display text.

  <Custom Cost Display>
   \c[4]\v[1]\c[0] Gold
  </Custom Cost Display>
  This is the custom text displayed before the rest of the skill costs. You
  can use text codes with this notetag.

The Skill Phases

For this skill, multiple effects are applied and at different phases. The
various phases are as follows:

   Before Effect Phase (influenced by this plugin)
   if skill successfully lands:
   - Pre-Damage Effect Phase (influenced by this plugin)
   - Damage Phase
   - Post-Damage Effect Phase (influenced by this plugin)
   - Item Trait Effects Phase
   After Effect Phase (influenced by this plugin)

There's four phases which can be influenced by this plugin. Two of which do
not matter if the effect successfully lands or not, two of which do matter
if the skill does land.

Skill and Item Notetags:
  <Before Eval>
   code
   code
  </Before Eval>

  <Pre-Damage Eval>
   code
   code
  </Pre-Damage Eval>

  <Post-Damage Eval>
   code
   code
  </Post-Damage Eval>

  <After Eval>
   code
   code
  </After Eval>
  If you wish to use custom effects for your skill, you can insert the
  respective notetags into the skill (or item) noteboxes and it will run the
  code that appears in between the tags. However, using any form of comments
  in this tag will block out code that follows.

  Those using the <Pre-Damage Eval> and <Post-Damage Eval> are able to make
  use of the damage to be dealt and the damage that has been dealt through
  the 'value' variable. The <Pre-Damage Eval> notetag is capable of altering
  the 'value' variable and return it to have damage affected by its code.

Tips & Tricks

The following Tips & Tricks effects use this plugin:

Changelog

Version 1.13:
- 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.12:
- Updated for RPG Maker MV version 1.5.0.

Version 1.11a:
- Lunatic Mode fail safes added.
- Documentation fix for the help file. Lunatic Mode tags didn't end right.
The help file is now updated to show the correct notetags.

Version 1.10b:
- Fixed a visual bug when using text code font changing for custom skill
cost display.
- <Hide if Learned Skill: x> documentation updated.
- Compatibility update for future plugins.

Version 1.09:
- The <Pre-Damage Eval> notetag now has the ability alter damage dealt. The
'value' variable refers to and returns the damage affected by the action.

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

Version 1.07:
- Fixed a bug that prevented immortal actors at 0 HP from using skills.

Version 1.06a:
- Added <Hide in Battle> and <Hide in Field> notetags.
- Added a failsafe to check for undefined skills.

Version 1.05:
- Added <Hide if Learned Skill: x> notetags.
- Added <Custom Show Eval> Lunatic Mode notetag.

Version 1.04:
- Added four Lunatic Modes notetags: Custom Requirement, Custom Execution,
Cost Display Eval, Custom Cost Display.

Version 1.03:
- Fixed a bug with the Lunatic Mode notetags not working.

Version 1.02:
- Added 'Window Columns' parameter to let users adjust the number of columns
used for the skill window.

Version 1.01:
- Fixed a mathematical error for skill cost padding.
- Added return for drawSkillCost to assist others scripters when making
compatibility notes.

Version 1.00:
- Finished plugin!