Quantcast
Channel: yanfly.moe
Viewing all articles
Browse latest Browse all 184

YEP.173 – Stat Allocation – RPG Maker MV

$
0
0

Yanfly Engine Plugins is a plugin library made for RPG Maker MV, a wonderful piece of software to help you make that role playing game of your dreams. You can find out more about RPG Maker MV here.

You can grab the plugin here:
English Dropbox
English Mirror

Support Team Yanfly on Patreon

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.


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


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 – Positioning the Allocate Command


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


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.


Lunatic Mode – Script Calls


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.


Happy RPG Making!



Viewing all articles
Browse latest Browse all 184

Trending Articles