Welcome to PGMZ! My goal is to make it easy for everyone to find and share great plugins for creating amazing games. As a plugin developer myself, I'm excited to grow this community with all of you.
NRP State EX - NRP_StateEX.js
Plugin desc : v1.161 Extend the functionality of the state in various ways.
License :
・Copyright: Retained
・Commercial Use: Allowed
・Modification: Allowed
・Redistribution: Allowed
・Details: See Download Page / In-plugin documentation
Author : Takeshi Sunagawa (http://newrpg.seesaa.net/)
Website : https://github.com/NewRPGProject/MZMV_Plugin/blob/main/NRP_StateEX.js
Desc page : http://newrpg.seesaa.net/article/488957733.html
Download Page : https://raw.githubusercontent.com/NewRPGProject/MZMV_Plugin/main/NRP_StateEX.js
File name : NRP_StateEX.js
Help of plugin :
Extend the functionality of the state in various ways.
*
* For example, the following states can be created.
*
* - Poisons and parameter changes that are not percentage effects.
* - Poisons and parameter changes
* that become more effective the higher the user's magic power.
* - States that inflict damage when hit.
* ※In other words, it is a damaging technique
* whose hit is determined by state resistance.
* - State that activates a skill when it is released after a turn.
* For example, Mortal Ray is possible.
*
* You can also have a popup appear when an add state misses.
* ※Normally, only the decision based
* on the success rate of the skill is displayed.
*
* -------------------------------------------------------------------
* [Regeneration Value Settings]
* -------------------------------------------------------------------
* Specify the following in the notes field of the state.
*
* <HrgExValue:?>
* Sets the HP regeneration value according to the specified formula.
*
* <MrgExValue:?>
* Sets the MP regeneration value according to the specified formula.
*
* <TrgExValue:?>
* Sets the MP regeneration value according to the specified formula.
*
* ※Both are "regeneration value", not "regeneration rate".
* A value that is not a percentage can be specified.
*
* -------------------------------------------------------------------
* For example, the following formula sets "Magic Power - Magic Defense".
*
* <HrgExValue:b.mdf - a.mat>
*
* Continuously inflicts damage for as long as the magic power
* exceeds the target's magic defense.
* ※When dealing damage, the value should be negative.
*
* "a" is the side that gave the state
* and "b" is the side that received it.
* The value is calculated at the timing when the state is applied.
* Random width and other settings are not available.
*
* ◆Application
* <HrgExValue:Math.min(b.mdf - a.mat, -1)>
*
* The previous formula "b.mdf - a.mat" will recover conversely
* if the target's magic defense is high.
* So the formula is set so that the maximum value is less than -1.
*
* -------------------------------------------------------------------
* [Parameter Change Settings]
* -------------------------------------------------------------------
* Specify the following in the notes field of the state.
*
* ◆Regular Parameters
* <MhpEx:?>
* Sets the Max HP(mhp) according to the specified formula.
*
* <MmpEx:?>
* Sets the Max MP(mmp) according to the specified formula.
*
* <AtkEx:?>
* Sets the AttacK Power(atk) according to the specified formula.
*
* <DefEx:?>
* Sets the Defense Power(def) according to the specified formula.
*
* <MatEx:?>
* Sets the Magic Attack Power(mat) according to the specified formula.
*
* <MdfEx:?>
* Sets the Magic Defense Power(mdf) according to the specified formula.
*
* <AgiEx:?>
* Sets the Magic Agility(agi) according to the specified formula.
*
* <LukEx:?>
* Sets the Luck(luk) according to the specified formula.
*
* -------------------------------------------------------------------
* ◆Example
* <AtkEx:a.mat / 2>
* Increases attack power by half the skill user's magic power.
*
* Note that these correction values are added or subtracted later
* than the normal parameter corrections and Buff/Debuff calculations.
*
* -------------------------------------------------------------------
* ◆Ex-Parameters
* ※In both cases, 1 is 100%.
*
* <HitEx:?>
* Sets the Hit Rate(hit) according to the specified formula.
*
* <EvaEx:?>
* Sets the Evasion Rate(eva) according to the specified formula.
*
* <CriEx:?>
* Sets the Critical Rate(cri) according to the specified formula.
*
* <CevEx:?>
* Sets the Critical Evation Rate(cev) according to the specified formula.
*
* <MevEx:?>
* Sets the Magic Evation Rate(mev) according to the specified formula.
*
* <MrfEx:?>
* Sets the Magic Reflection Rate(mrf) according to the specified formula.
*
* <CntEx:?>
* Sets the Counter Attack Rate(cnt) according to the specified formula.
*
* <HrgEx:?>
* Sets the HP Regeneration Rate(hrg) according to the specified formula.
*
* <MrgEx:?>
* Sets the MP Regeneration Rate(mrg) according to the specified formula.
*
* <TrgEx:?>
* Sets the TP Regeneration Rate(trg) according to the specified formula.
*
* -------------------------------------------------------------------
* ◆Sp-Parameter
* ※In both cases, 1 is 100%.
*
* <TgrEx:?>
* Sets the Target Rate(tgr) according to the specified formula.
*
* <GrdEx:?>
* Sets the Guard Effect Rate(grd) according to the specified formula.
*
* <RecEx:?>
* Sets the Recovery Effect Rate(rec) according to the specified formula.
*
* <PhaEx:?>
* Sets the Pharmacology(pha) according to the specified formula.
*
* <McrEx:?>
* Sets the MP Cost Rate(mcr) according to the specified formula.
*
* <TcrEx:?>
* Sets the TP Charge Rate(tcr) according to the specified formula.
*
* <PdrEx:?>
* Sets the Physical Damage Rate(pdr) according to the specified formula.
*
* <MdrEx:?>
* Sets the Magic Damage Rate(mdr) according to the specified formula.
*
* <FdrEx:?>
* Sets the Floor Damage Rate(fdr) according to the specified formula.
*
* <ExrEx:?>
* Sets the Experience Rate(exr) according to the specified formula.
*
* -------------------------------------------------------------------
* These are registered in the ParameterList of plugin parameters.
* If you have added your own parameters with external plugins,
* you may be able to define them additionally.
* (※It depends on the implementation
* and cannot be guaranteed with certainty.)
*
* -------------------------------------------------------------------
* [Damage When Adding State]
* -------------------------------------------------------------------
* Specify the following in the notes field of the state.
*
* <StateChangeHp:?>
* HP is changed by the formula specified when the state is added.
*
* <StateChangeMp:?>
* MP is changed by the formula specified when the state is added.
*
* <StateChangeTp:?>
* TP is changed by the formula specified when the state is added.
*
* -------------------------------------------------------------------
* In both cases, a value of plus means recovery
* and a value of minus means damage.
*
* Note that overwriting an ongoing state has no effect.
* If the "AlwaysUpdateState" plugin parameter
* is turned on, or if the skill is set to add
* and remove states at the same time, it will be enabled continuously.
*
* <StateDamageSilent>
* Numerical values are not displayed during the above.
*
* ◆Example
* <StateChangeHp:-b.hp>
* The above will result in an immediate death state.
*
* When combined with <StateDamageSilent>,
* the damage display is also eliminated.
*
* -------------------------------------------------------------------
* [Other Effects]
* -------------------------------------------------------------------
* Specify the following in the notes field of the state.
*
* <StateEndSkill:100>
* When the state is released after a turn,
* the number 100 skill is activated.
* Note that the target will be random.
*
* <StateEndSkillUseCheck>
* Check if it can be used to trigger the <StateEndSkill> above.
* For example, if the battler is restricted, the skill will fail.
*
* <StateRateReferenceId:100>
* Change the ID that refers to the state rate (Resist) to 100.
* For example, if you create a state called poison and deadly poison,
* you can make the state rate of deadly poison the same as poison.
*
* <DefeatState>
* Same as dead, subject to a defeat determination.
* Assumes a petrification-like state
* that is not automatically released.
*
* <IgnoreRecoverAll>
* It will no longer be released by the event command Recover All.
* Can only be released if a state is specified.
*
* <IgnoreRecoverDie>
* It will not be released in dead state.
* Can only be released if a state is specified.
*
* <RemoveState:10>
* When a state is added, state #10 is removed.
* Multiple comma-separated specifications are allowed (<RemoveState:10,11>)
*
* <AutoRemovalActionStart>
* Change Auto-removal Timing to Action Start.
* ※The setting on the database should be “End Action”.
*
* <AutoRemovalCommandStart>
* Change Auto-removal Timing to Command Input Start.
* Basically, it is intended to be used in conjunction
* with NRP_CountTimeBattle.js.
* ※The setting on the database should be “End Action”.
*
* <BattlerInvisible>
* Hides battlers.
* Can be used for jumping skills with DynamicMotion.
* https://newrpg.seesaa.net/article/479020531.html
*
* -------------------------------------------------------------------
* [Original Parameters]
* -------------------------------------------------------------------
* You can also set your own parameters
* by selecting Original for the ParameterList type.
*
* For example, suppose that the Id is set to 0, the Tag to “TestParam”,
* and the note field of the state is set to <TestParam:a.level>.
* In that case, you can refer to the value by
* writing “a.stateExOriginalParam(0)” in the skill calculation formula.
* ※Key is not used, but should be set to a value that is unique.
*
* We envision states that reduce damage only
* for specific skills, for example.
*
* -------------------------------------------------------------------
* [Terms]
* -------------------------------------------------------------------
* There are no restrictions.
* Modification, redistribution freedom, commercial availability,
* and rights indication are also optional.
* The author is not responsible,
* but will deal with defects to the extent possible.
*
* @------------------------------------------------------------------
* @ Plugin Parameters
* @------------------------------------------------------------------
*
* @param ParameterList
* @type struct<Parameter>[]
* @default ["{¥"Type¥":¥"r¥",¥"Id¥":¥"0¥",¥"Key¥":¥"mhp¥",¥"Tag¥":¥"MhpEx¥"}","{¥"Type¥":¥"r¥",¥"Id¥":¥"1¥",¥"Key¥":¥"mmp¥",¥"Tag¥":¥"MmpEx¥"}","{¥"Type¥":¥"r¥",¥"Id¥":¥"2¥",¥"Key¥":¥"atk¥",¥"Tag¥":¥"AtkEx¥"}","{¥"Type¥":¥"r¥",¥"Id¥":¥"3¥",¥"Key¥":¥"def¥",¥"Tag¥":¥"DefEx¥"}","{¥"Type¥":¥"r¥",¥"Id¥":¥"4¥",¥"Key¥":¥"mat¥",¥"Tag¥":¥"MatEx¥"}","{¥"Type¥":¥"r¥",¥"Id¥":¥"5¥",¥"Key¥":¥"mdf¥",¥"Tag¥":¥"MdfEx¥"}","{¥"Type¥":¥"r¥",¥"Id¥":¥"6¥",¥"Key¥":¥"agi¥",¥"Tag¥":¥"AgiEx¥"}","{¥"Type¥":¥"r¥",¥"Id¥":¥"7¥",¥"Key¥":¥"luk¥",¥"Tag¥":¥"LukEx¥"}","{¥"Type¥":¥"x¥",¥"Id¥":¥"0¥",¥"Key¥":¥"hit¥",¥"Tag¥":¥"HitEx¥"}","{¥"Type¥":¥"x¥",¥"Id¥":¥"1¥",¥"Key¥":¥"eva¥",¥"Tag¥":¥"EvaEx¥"}","{¥"Type¥":¥"x¥",¥"Id¥":¥"2¥",¥"Key¥":¥"cri¥",¥"Tag¥":¥"CriEx¥"}","{¥"Type¥":¥"x¥",¥"Id¥":¥"3¥",¥"Key¥":¥"cev¥",¥"Tag¥":¥"CevEx¥"}","{¥"Type¥":¥"x¥",¥"Id¥":¥"4¥",¥"Key¥":¥"mev¥",¥"Tag¥":¥"MevEx¥"}","{¥"Type¥":¥"x¥",¥"Id¥":¥"5¥",¥"Key¥":¥"mrf¥",¥"Tag¥":¥"MrfEx¥"}","{¥"Type¥":¥"x¥",¥"Id¥":¥"6¥",¥"Key¥":¥"cnt¥",¥"Tag¥":¥"CntEx¥"}","{¥"Type¥":¥"x¥",¥"Id¥":¥"7¥",¥"Key¥":¥"hrg¥",¥"Tag¥":¥"HrgEx¥"}","{¥"Type¥":¥"x¥",¥"Id¥":¥"8¥",¥"Key¥":¥"mrg¥",¥"Tag¥":¥"MrgEx¥"}","{¥"Type¥":¥"x¥",¥"Id¥":¥"9¥",¥"Key¥":¥"trg¥",¥"Tag¥":¥"TrgEx¥"}","{¥"Type¥":¥"s¥",¥"Id¥":¥"0¥",¥"Key¥":¥"tgr¥",¥"Tag¥":¥"TgrEx¥"}","{¥"Type¥":¥"s¥",¥"Id¥":¥"1¥",¥"Key¥":¥"grd¥",¥"Tag¥":¥"GrdEx¥"}","{¥"Type¥":¥"s¥",¥"Id¥":¥"2¥",¥"Key¥":¥"rec¥",¥"Tag¥":¥"RecEx¥"}","{¥"Type¥":¥"s¥",¥"Id¥":¥"3¥",¥"Key¥":¥"pha¥",¥"Tag¥":¥"PhaEx¥"}","{¥"Type¥":¥"s¥",¥"Id¥":¥"4¥",¥"Key¥":¥"mcr¥",¥"Tag¥":¥"McrEx¥"}","{¥"Type¥":¥"s¥",¥"Id¥":¥"5¥",¥"Key¥":¥"tcr¥",¥"Tag¥":¥"TcrEx¥"}","{¥"Type¥":¥"s¥",¥"Id¥":¥"6¥",¥"Key¥":¥"pdr¥",¥"Tag¥":¥"PdrEx¥"}","{¥"Type¥":¥"s¥",¥"Id¥":¥"7¥",¥"Key¥":¥"mdr¥",¥"Tag¥":¥"MdrEx¥"}","{¥"Type¥":¥"s¥",¥"Id¥":¥"8¥",¥"Key¥":¥"fdr¥",¥"Tag¥":¥"FdrEx¥"}","{¥"Type¥":¥"s¥",¥"Id¥":¥"9¥",¥"Key¥":¥"exr¥",¥"Tag¥":¥"ExrEx¥"}"]
* @desc List of parameters.
* If you have your own parameters, you can add them as well.
*
* @param AlwaysUpdateState
* @type boolean
* @default false
* @desc The update process is also performed for states that are in effect.
* Duration in Turns is updated even when false.
*
* @param UpdateType
* @parent AlwaysUpdateState
* @type select
* @option 0:Latest Priority @value 0
* @option 1:Maximum Priority @value 1
* @default 0
* @desc Latest Priority: Priority is given to new states.
* Maximum Priority: Priority is given to stronger states.
*
* @param ShowStateMiss
* @type boolean
* @default false
* @desc Displays a miss when the state is missed.
* This applies to skills with a damage type of None.
*
* @param SlipOverKill
* @type boolean
* @default false
* @desc For slip damage (e.g. poison), enable values that exceed the current HP.
*
* @param QuickStateEndSkill
* @type boolean
* @default true
* @desc Perform skills triggered by <StateEndSkill> with speed as the limit. Adjustment for CTB.