Stat Allocation (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

Yanfly Engine Plugins

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


Introduction

Lots of players love to customization in games. It lets them put a bit of a
personal touch in the games they like to play, and what a better way to do
that than through Stat Allocation? With the Stat Allocation, players can
alter the amount of MaxHP, MaxMP, ATK, DEF, etc. through a new resource, AP,
which stands for Allocation Points. AP is usually gained through leveling up
and is then used to boost stats!

However, if AP is not your thing, you can also allocate stats through JP
(using the Job Points plugin) or through items! This plugin gives you, the
game dev, three different ways to allocate stats with!

Stat Allocation in this plugin is tied to classes and not actors as a whole.
This means that the allocation build that an actor can vary depending on the
class the actor currently is. This means the player can experiment with
multiple allocation builds instead of a one-size fits all allocation build
if class changing is involved.

Classes can also offer different parameters to allocate points into, too.
A warrior class may give options for ATK and DEF while a mage class can give
options for MaxMP or MAT. This can be done through the usage of notetags for
each class.

You can adjust the allocation rules for how each stat, too, from the name to
the icon to the cost to the effect to the maximum number of times the stat
can be allocated into. These can all be done through the plugin parameters.

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.

---

If you want to give certain classes different stats to allocate into, use
the following notetag setups:

Class Notetags:

  <Stat Allocation: x, x, x>

  or

  <Stat Allocation>
   x
   x
   x
  </Stat Allocation>
  - Replace 'x' with a stat to add it to a list of parameters that players
  can allocate points into. Insert as many 'x' entries as you need. They
  will appear in the menu in the order they've been placed. Unaffiliated
  stats will not appear in the menu. Use any of the stats below:

  ---

  Param:    Stands for:

  mhp       Max HP
  mmp       Max MP
  atk       Attack
  def       Defense
  mat       Magic Attack
  mdf       Magic Defense
  agi       Agility
  luk       Luck

  XParam:

  hit       Hit Rate
  eva       Evasion Rate
  cri       Critical Hit Rate
  cev       Critical Evasion Rate
  mev       Magic Evasion Rate
  mrf       Magic Reflection Rate
  cnt       Counterattack Rate
  hrg       HP Regeneration Rate
  mrg       MP Regeneration Rate
  trg       TP Regeneration Rate

  SParam:

  tgr       Target Rate
  grd       Guard Effect Rate
  rec       Recovery Rate
  pha       Pharmacology (Item Effectiveness)
  mcr       MP Cost Rate
  tcr       TP Charge Rate
  pdr       Physical Damage Rate
  mdr       Magical Damage Rate
  fdr       Floor Damage Rate
  exr       Experience Rate

  ---

These can be inserted into the 'Default Parameters' plugin parameter, too,
to change up the default listing and make it apply to every class that does
not have their own unique notetag setup.

Main Menu Manager Integration

To integrate access to a scene from this plugin into Yanfly's Main Menu Manager, use the settings below:

For those using the Main Menu Manager and would like to position the Allocate
command in a place you'd like, use the following format:

      Name: Yanfly.Param.StatAlcCmdName
    Symbol: statAllocate
      Show: $gameSystem.isShowStatAllocate()
   Enabled: $gameSystem.isEnableStatAllocate()
       Ext:
 Main Bind: this.commandPersonal.bind(this)
Actor Bind: SceneManager.push(Scene_StatAllocation)

Insert the above setup within a Main Menu Manager slot. Provided you copy
the exact settings to where you need it, it will appear there while using
all of the naming, enabling, disabling, hiding, and showing effects done by
the plugin parameters.

Remember to turn off 'Auto Add Menu' from the plugin parameters.

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 for various Stat Allocation
related effects in your game!

Plugin Commands:

  ShowStatAllocate
  HideStatAllocate
  - This will show or hide the main menu's Stat Allocation command.

  EnableStatAllocate
  DisableStatAllocate
  - This will enable or disable the main menu's Stat Allocation command.

  ShowRevertAllocate
  HideRevertAllocate
  - This will show or hide the Allocation scene's 'Revert' command.

  EnableRevertAllocate
  DisableRevertAllocate
  - This will enable or disable the Allocation scene's 'Revert' command.

  OpenStatAllocate x
  - This will open up the stat allocation menu for the party member whose
  index is equal to x. 0 is the first slot.

Script Calls

ScriptCallsMV.png

Script Calls are event commands that are used to run JavaScript code during an event to call upon unique functions, usually added by the related plugin.

Here is a list of Script Call(s) that you may use:

You can use the following script calls to give actors extra AP to use.

Script Calls:

  var actor = $gameActors.actor(actorId);
  actor.gainBonusAp(x, classId);
  - Replace 'actorId' with the ID of the actor you wish to affect.
  Replace 'x' with the amount of AP you wish to apply to the actor.
  Replace 'classId' with the ID of the class you wish to give AP to.
  You can keep 'classId' as 0 to make it affect the actor's current class.

  var actor = $gameActors.actor(actorId);
  actor.setBonusAp(x, classId);
  - Replace 'actorId' with the ID of the actor you wish to affect.
  Replace 'x' with the amount of AP you wish to set the actor's AP to.
  Replace 'classId' with the ID of the class you wish to set the AP to.
  You can keep 'classId' as 0 to make it affect the actor's current class.

Changelog

Version 1.02:
- Fixed an exploit that would allow actors to fully regain HP/MP.

Version 1.01:
- Bugfixed for those who didn't have Allocate appear.
- Added plugin command to open up Stat Allocation scene.

Version 1.00:
- Finished Plugin!