Skill Learn System (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 enables your game's actors to learn skills from the skill menu.
This can be done via either gold, items, or Job Points. It provides the
player an alternate way of acquiring skills aside from leveling up.

This plugin can be used with YEP_JobPoints.js.

It is recommended to place this plugin under the YEP_JobPoints.js plugin
in the Plugin Manager.

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.

Use the following notetags to make use of the Skill Learn System.

Class Notetag:
  <Learn Skill: x>
  <Learn Skill: x, x, x>
  <Learn Skill: x to y>
  Enables the class to be able to learn skill(s) x from the menu. Replace
  x with the skill's ID. If x to y is used, this enables the class to learn
  all the skills from x to y. Replace x and y with skill ID's.

Skill Notetags:
  <Learn Cost: x Gold>
  Sets the gold cost of learning this skill to x gold.

  <Learn Cost: x JP>
  Sets the JP cost of learning this skill to x JP. This note requires
  YEP_JobPoints.js in order to work.

  <Learn Cost>        or     <Learn Cost>
   Item x: y                  item name: y
   Weapon x: y                item name: y
   Armor x: y                </Learn Cost>
  </Learn Cost>
  Allows you to set the item, weapon, and armor costs of learning the skill.
  Replace x with the item's ID and y with the quantity of that item needed.
  If you decide to use the item name variant, replace the item name with the
  item's name as it appears in the database. If multiple items share the
  same name, the item with the highest ID will be used in the order of item,
  weapon, and then armor.
  *Note: If you are using YEP_ItemCore.js and Independent Items, the learn
  costs will not include independent items.

  <Learn Require Level: x>
  Causes the skill to require the actor's current level to be at least x
  before the skill even appears on the list to learn.

  <Learn Require Skill: x>
  <Learn Require Skill: x, x, x>
  <Learn Require Skill: x to y>
  In order for the skill to appear, the actor must know the other skill(s)
  of x. If x to y is used, the actor must know all the skills from x to y.
  Replace x and/or y with skill ID's.

  <Learn Require Switch: x>
  <Learn Require Switch: x, x, x>
  <Learn Require Switch: x to y>
  In order for the skill to appear, the switch(es) x must be on. If x to y
  is used, all of the switches from x to y must be on in order for the skill
  to appear. Replace x and/or y with switch ID's.

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.

Custom Requirements and Costs

For those who understand a bit of JavaScript and wish to go further with
customizing the process for the skill learning process, you can use the
following notetags:

Skill Notetags:

  <Learn Show Eval>
   value = true;
   value = false;
  </Learn Show Eval>
  For using a custom code to hide or show the skill, you can use these
  notetags. Returning value as true will cause the skill to appear
  regardless of all other requirements being unmet while returning value as
  false will cause the skill to appear regardless of all other requirements
  being met.

  <Learn Require Eval>
   value = true;
   value = false;
  </Learn Require Eval>
  For those who wish to use their own custom requirements using code. This
  must return value as true in order for the skill to appear to be
  learnable. Avoid using comments that may potentially block out further
  code.

  <Learn Cost Eval>
   code
   code
  </Learn Cost Eval>
  For those who know JavaScript, you can have custom actions be performed
  after learning the skill through the learn skill menu.

  <Learn Custom Text>
   text
   text
  </Learn Custom Text>
  This will be the custom text shown underneath all the main costs. You can
  use text codes for this.

Custom JP Costs

For those who have basic JavaScript knowledge and would like to make the JP
costs for skills dynamic, you can use the following notetags:

Skill Notetags:

  <Custom Learn JP Cost>
   cost = user.level * 100;
  </Custom Learn JP Cost>
  The 'cost' variable is the value that will be returned as a result of this
  Lunatic Mode notetag. The value returned here from this code will be added
  on top of the <Learn Cost: x JP> value.

Plugin Commands

PluginCommandsMV.png

Plugin Commands are event commands that are used to call upon functions added by a plugin that aren't inherently a part of RPG Maker MV.

Here is a list of Plugin Command(s) that you may use:

You can use the following Plugin Commands from the Event Editor to alter
whether or not you want the 'Learn Skill' command to appear in the skill
scene or to have it enabled.

Plugin Command:
  ShowLearnSkill            Shows the 'Learn Skill' command.
  HideLearnSkill            Hides the 'Learn Skill' command.
  EnableLearnSkill          Enables the 'Learn Skill' command.
  DisableLearnSkill         Disables the 'Learn Skill' command.
  OpenLearnSkill actor x    Opens Learn Skill menu for actor x.
  OpenLearnSkill party x    Opens Learn Skill menu for party member x.

Tips & Tricks

The following Tips & Tricks effects use this plugin:

Changelog

Version 1.17:
- 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.16:
- Fixed a bug with the JP Cost not loading properly and causing a crash.

Version 1.15:
- Fixed a bug that did not count custom eval costs as a cost.

Version 1.14:
- Updated for RPG Maker MV version 1.5.0.

Version 1.13:
- Lunatic Mode fail safes added.

Version 1.12:
- Updated for RPG Maker MV version 1.3.2.

Version 1.11:
- Removed dependency on YEP_JobPoints.js if using Integrated skill learn.

Version 1.10:
- Added <Custom Learn JP Cost> Lunatic Mode notetag. Look in the plugin's
helpfile for more details!

Version 1.09:
- Compatibility update with Class Change Core's <Use Nickname> notetag.

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

Version 1.07:
- Updated the <Learn Require Level: x> notetag. If you are using the Class
Change Core, the requirement will now depend on the level of the class.

Version 1.06b:
- Added 'Confirm Window', 'Confirm Text', 'Confirm Yes', 'Confirm No' to the
plugin's parameters. This confirm window only appears for non-integrated
menus as the integrated menus have a class confirmation window already.
- Confirm Text now supports text codes.
- Fixed a visual bug when learning skills.

Version 1.05:
- Fixed a bug with the 'OpenLearnSkill party x' plugin command not opening
the correct party member.

Version 1.04:
- Fixed a bug that would duplicate non-independent items.
- Fixed a bug with class portraits not updating properly.

Version 1.03a:
- Fixed a bug where JP values weren't updated upon learning.
- Fixed a bug where the help description didn't update if a skill vanished.

Version 1.02:
- Reversed the display for item requirements so it is now Held/Needed.
- Preparations for compatibility for Class Change Core.

Version 1.01:
- Added an actor refresh to learn and forget skills.

Version 1.00:
- Finished Plugin!