Critical Control (YEP)

From Yanfly.moe Wiki
Revision as of 15:48, 5 July 2019 by Yanfly (talk | contribs)
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

Required Plugins

The following plugins are required in order to use this plugin.

Place the following plugins above this plugin located in the Plugin Manager.

Yanfly Engine Plugins

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


Introduction

This plugin requires YEP_DamageCore.
Make sure this plugin is located under YEP_DamageCore in the plugin list.

This plugin allows you to modify the critical hit rate formula across a
global scale and for an individual skill/item scale.

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.

---

You may use these notetags to adjust various factors for critical success
rates and critical damage adjustments.

Skill and Item Notetags:
  <Critical Rate: x%>
  This sets the skill/item's critical hit rate to x%, ignoring any critical
  hit rate bonuses the user may have and ignoring any critical hit evasion
  bonuses the target may have.
  *Note: Using this tag sets the skill/item to enable Critical Hits.

  <Critical Rate: x.y>
  This sets the skill/item's critical hit rate to the float x.y, ignoring
  any critical hit rate bonuses the user may have and ignoring any critical
  hit evasion bonuses the target may have.
  *Note: Using this tag sets the skill/item to enable Critical Hits.

  <Critical Multiplier: x%>
  This sets the skill/item's critical damage multiplier as x% while still
  factoring in the user's critical damage multiplier bonuses.
  *Note: Using this tag sets the skill/item to enable Critical Hits.

  <Critical Multiplier: x.y>
  This sets the skill/item's critical damage multiplier as x.y while still
  factoring in the user's critical damage multiplier bonuses.
  *Note: Using this tag sets the skill/item to enable Critical Hits.

  <Flat Critical: x% stat>
  Increases the skill/item's flat critical bonus by x% of 'stat'. Replace
  'stat' with 'hp', 'mp', 'atk', 'def', 'mat', 'mdf', 'agi', or 'luk'. Using
  multiple instances of this notetag will override the previous.

Actor, Class, Enemy, Weapon, Armor, and State Notetags:
  <Critical Multiplier: +x%>
  <Critical Multiplier: -x%>
  Alters the damage of a critical hit by x% for this actor, class, enemy,
  weapon, armor, or state. This is an additive trait.

  <Flat Critical: +x>
  <Flat Critical: -x>
  Alters the damage of a critical hit by +x or -x for this actor, class,
  enemy, weapon, armor, or state. This is an additive trait.

  <Certain Hit Critical Rate: +x%>
  <Certain Hit Critical Rate: -x%>
  Alters the critical hit rate chance of certain hit skills for the user by
  +x% or -x% if this notetag exists in the actor, class, enemy, weapon,
  armor, or state notetags. This is an additive trait.

  <Physical Critical Rate: +x%>
  <Physical Critical Rate: -x%>
  Alters the physical critical rate chance of certain hit skills for the user
  by +x% or -x% if this notetag exists in the actor, class, enemy, weapon,
  armor, or state notetags. This is an additive trait.

  <Magical Critical Rate: +x%>
  <Magical Critical Rate: -x%>
  Alters the magical critical rate chance of certain hit skills for the user
  by +x% or -x% if this notetag exists in the actor, class, enemy, weapon,
  armor, or state notetags. This is an additive trait.

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.

For those with a bit of JavaScript experience, you can create more in-depth
formulas for critical hits for individual skills.

Skill and Item Notetags:
  <Critical Rate Formula>
  rate = user.cri + 0.2;
  rate -= 1 - target.cev;
  </Critical Rate Formula>
  This adjusts the critical hit success rate for the skill/item. You can use
  multiplie lines to write out the formula, and 'rate' will be the success
  rate used to determine the skill's critical success rate.
  *Note: Using this tag sets the skill/item to enable Critical Hits.

  <Critical Multiplier Formula>
  value *= 3.0 + bonus;
  value *= $gameVariables.value(1) * 0.01;
  </Critical Multiplier Formula>
  This adjusts the critical multiplier formula for the skill/item. You can
  use multiple lines to write out the formula, and 'value' will be the amount
  of damage adjusted for the critical multiplier.
  *Note: Using this tag sets the skill/item to enable Critical Hits.

  <Flat Critical Formula>
  value += 1.5 * user.luk + bonus;
  value -= 0.75 * target.luk;
  </Flat Critical Formula>
  This adjusts the flat critical formula for the skill/item if you wish for
  there to be one. This is primarily used for a flat increase in critical
  damage and is usually applied after all other applied multipliers.
  *Note: Remember to use a negative number for heals.
  *Note: Using this tag sets the skill/item to enable Critical Hits.

Action Sequences

These are action sequences that you can use with this plugin. Action Sequences will require Yanfly's Battle Engine Core to work.

Action Sequences - ala Melody

Battle Engine Core includes Yanfly Engine Melody's Battle Engine system, where each individual aspect of the skill and item effects can be controlled to a degree. These are called Action Sequences, where each command in the action sequence causes the game to perform a distinct individual action.

Each skill and item consists of five different action sequences. They are as follows:

1. Setup Actions
They prepare the active battler before carrying out the bulk of the action

and its individual effects. Usually what you see here are things such as the active battler moving forward a bit, unsheathing their weapon, etc. This step will occur before the active battler expends their skill or item costs.

2. Whole Actions
These actions will affect all of the targets simultaneously. Although this

section does not need to be used, most actions will use this for displaying animations upon all enemies. This step occurs after skill and item costs.

3. Target Actions
This section will affect all of the targets individually. Used primarily

for physical attacks that will deliver more personal forms of damage. Actions that occur here will not affect other targets unless specifically ordered to do so otherwise.

4. Follow Actions
This section will dedicate towards cleanup work after the individual

targeting actions. Here, it'll do things such as removing immortal flags, start up common events, and more.

5. Finish Actions
This section will have the active battler close up the action sequence.

Usually stuff like running waits and holds at the last minute for skills and items, moving back to place, and others.

Now that you know each of the five steps each action sequence goes through, here's the tags you can insert inside of skills and items. Pay attention to each tag name.

1. <setup action>
    action list
    action list
   </setup action>

2. <whole action>
    action list  
    action list  
   </whole action>

3. <target action>
    action list
    action list
   </target action>

4. <follow action>
    action list
    action list
   </follow action>

5. <finish action>
    action list
    action list
   </finish action>

They will do their own respective action sets. The methods to insert for the action list can be found below in the core of the Help Manual.

Furthermore, to prevent overflooding every single one of your database item's noteboxes with action sequence lists, there's a shortcut you can take to copy all of the setup actions, whole actions, target actions, follow actions, and finish actions with just one line.

<action copy: x:y>

Replace x with "item" or "skill" to set the type for the action list code to directly copy. The integer y is then the ID assigned for that particular object type. For example, to copy 45th skill's action sequences, the code would be <action copy: skill:45> for anything that will accept these action codes. If you do use this notetag, it will take priority over any custom that you've placed in the notebox.

Target Typing

You may notice that in some of the actions below will say "refer to target typing" which is this section right here. Here's a quick run down on the various targets you may select.

user This will select the active battler.
target, targets These will select the active targets in question.
actors, existing actors These will select all living actors.
all actors This will select all actors including dead ones.
dead actors This will select only dead actors.
actors not user This will select all living actors except for the user.
actor x This will select the actor in slot x.
character x This will select the specific character with actor ID x.
enemies, existing enemies This will select all living enemies.
all enemies This will select all enemies, even dead.
dead enemies This will select only dead enemies.
enemies not user This will select all enemies except for the user.
enemy x This will select the enemy in slot x.
friends This will select the battler's alive allies.
all friends This will select the all of battler's allies, even dead.
dead friends This will select the battler's dead allies.
friends not user This will select the battler's allies except itself.
friend x This will select the battler's ally in slot x.
opponents This will select the battler's alive opponents.
all opponents This will select the all of the battler's opponents.
dead opponents This will select the battler's dead opponents.
opponent x This will select the battler's opponent in slot x.
all alive Selects all living actors and enemies.
all members Selects all living and dead actors and enemies.
all dead Selects all dead actors and enemies.
all not user This will select all living battlers except user.
focus Selects the active battler and its targets.
not focus Selects everything but the active battler and its targets.
prev target Requires Action Sequence Impact.

During <Target Actions>, this will get the previous target in the targets list.

next target Requires Action Sequence Impact.

During <Target Actions>, this will get the next target in the targets list.

$UnisonMemberX Requires Unison Attack.

Replace X with the Unison Attack participant where X is slot used based on the <Unison Skill: x, y, z> notetag.

$UnisonMembers Requires Unison Attack.

Returns all of the participating Unison Skill members.

Action Sequence List

The following is a list of Action Sequences provided by this plugin.

If you have YEP_BattleEngineCore.js installed with this plugin located
underneath it in the Plugin Manager, you can make use of these extra
damage related action sequences.

=============================================================================
CRITICAL MULTIPLIER: x%
CRITICAL MULTIPLIER: x.y
CRITICAL MULTIPLIER: VARIABLE x
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This changes the critical multiplier for the skill/item until the end of the
action sequence. This will only take effect if there is a critical hit. If
you use a variable, it is treated as a percentage.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Usage Example: critical multiplier: 50%
               critical multiplier: 8.667
               critical multiplier: variable 3
=============================================================================

=============================================================================
FLAT CRITICAL: +x
FLAT CRITICAL: -x
FLAT CRITICAL: VARIABLE x
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This changes the flat critical increase for the skill/item until the end of
the action sequence. This will only take effect if there is a critical hit.
This will automatically adjust for damage or healing.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Usage Example: flat critical: +100
               flat critical: -250
               flat critical: variable 3
=============================================================================

=============================================================================
FORCE CRITICAL
FORCE NO CRITICAL
NORMAL CRITICAL
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This forces the following action effects in the action sequence to either
always be a critical hit or not a critical hit ignoring all other factors.
Using 'normal critical' will reduce the following action effects to use the
regular critical hit rate calculation.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Usage Example: force critical
               force no critical
               normal critical
=============================================================================

Tips & Tricks

The following Tips & Tricks effects use this plugin:

Changelog

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

Version 1.04:
- Bug fixed where the physical critical modifier replaced the magical
critical modifier. This should be fixed now.

Version 1.03:
- Lunatic Mode fail safes added.

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

Version 1.01b:
- Fixed a bug regarding Lunatic Critical Hit Rates.
- Fixed a default formula that caused critical hits to heal unexpectedly.

Version 1.00:
- Finished Plugin!