An open library of RPG Maker MZ plugins, powered by the community.

PGMZ - The Community-Driven Plugin Library for RPG Maker MZ

MZ plugins

NRP Substitute - NRP_Substitute.js

Plugin desc : v1.03 Extends the substitute effect.

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_Substitute.js

Desc page : https://newrpg.seesaa.net/article/500482565.html

Download Page : https://raw.githubusercontent.com/NewRPGProject/MZMV_Plugin/main/NRP_Substitute.js

File name : NRP_Substitute.js

Help of plugin :

Extends the substitute effect.
 * 
 * -------------------------------------------------------------------
 * [Usage]
 * -------------------------------------------------------------------
 * Plugin parameters allow you
 * to adjust the standard substitution behavior.
 * You can also insert a direction when the substitution is triggered.
 * ※The direction to the actor cannot be displayed in the front view.
 * 
 * In addition, the flow of the performance
 * by the substitute will be changed.
 * Normally, only damage and other effects are substituted,
 * but this plug-in changes the target of the skill itself.
 * In other words, the animation will be displayed for the battler
 * who performs the substitution.
 * 
 * If you want to be even more particular,
 * you can set up a substitution effect for objects with traits.
 * 
 * For example, you can create separate
 * "states that only protect against physical attacks" and
 * "states that only protect against magical attacks".
 * 
 * -------------------------------------------------------------------
 * [Note (actor, enemy, class, equipment, state, skill, item)]
 * -------------------------------------------------------------------
 * ※As for skills, they are passive skills
 *   that only need to be learned to be effective.
 * ※Formulas can also be used for each item.
 * 
 * ◆Required
 * <Substitute:50>
 * 50% chance to execute the substitute.
 * When omitted (<Substitute>), it is activated at 100%.
 * 
 * ◆Performance
 * <SubstituteAnimationId:100>
 * The number 100 animation is displayed
 * to the activator of the substitution.
 * 
 * <SubstituteDynamicId:100>
 * In conjunction with DynamicAnimation & Motion,
 * a substitute activator executes the production of Skill ID. 100.
 * ※It takes precedence over the animation described above.
 * 
 * <SubstituteWait:30>
 * The waiting time (in 1/60 second increments)
 * when the substitute is activated.
 * 
 * ◆Condition
 * <SubstituteHpRate:50>
 * Protects fellow members with less than 50% HP.
 * 
 * <SubstituteDamageType:1,5>
 * Damage type 1,5 skills are targeted for substitution.
 * 1:HP Damage, 2:MP Damage, 3:HP Recover, 4:MP Recover,
 * 5:HP Drain, 6:MP Drain
 * If omitted, the plugin parameter settings are used.
 * If left blank, all are valid.
 * 
 * <SubstituteHitType:1>
 * Targets skills of hit type 1 for substitution.
 * 0:Certain Hit, 1:Physical Attack, 2:Magic Attack
 * If omitted, the plugin parameter settings are used.
 * If left blank, all are valid.
 * 
 * <SubstituteSkillType:0,2>
 * Skill type 0,2 skills are targeted for substitution.
 * Skill types can be set in the database.
 * Normally, 1 is Magic, 2:Special.
 * Also, 0 is treated as a normal attack.
 * If omitted, the plugin parameter settings are used.
 * If left blank, all are valid.
 * 
 * <SubstituteForOne>
 * Only skills with a single (& random) range
 * are targeted for substitution.
 * <SubstituteForOne:false> for all.
 * If omitted, the plugin parameter settings are used.
 * 
 * <SubstituteItem> / <SubstituteItem:false>
 * Performs substitution for items as well. (Off with false)
 * If omitted, the plugin parameter settings are used.
 * 
 * <SubstitutePriority:1>
 * You can specify the priority
 * when multiple substitution effects are triggered.
 * The higher the number, the higher the priority.
 * If not specified, it is treated as 0. Negative values are also valid.
 * 
 * ◆Counter Group
 * <CounterGroupInclude:attack>
 * It takes the place of the skill's counter group name "attack".
 * For counter groups, see below.
 * 
 * <CounterGroupExcept:attack>
 * It does not substitute
 * when the skill's counter group name is "attack"
 * 
 * -------------------------------------------------------------------
 * [Note (skill, item)]
 * -------------------------------------------------------------------
 * <SubstituteDisabled>
 * This skill is not to be taken as a substitute.
 * 
 * <CounterGroup:attack>
 * Set the counter group to "attack".
 * 
 * -------------------------------------------------------------------
 * [Note (state]
 * -------------------------------------------------------------------
 * <SubstituteDisabled>
 * Prohibits substitution while this state is in effect.
 * 
 * Note that battlers who are in the "Cannot Move" restriction state
 * will not execute the substitution from the beginning.
 * 
 * -------------------------------------------------------------------
 * [Counter Group]
 * -------------------------------------------------------------------
 * Supports integration with the counter plugin (NRP_CounterSkill.js),
 * allowing counter skills
 * and substitutes to share counter group settings.
 * ※This plugin is also effective on its own.
 * 
 * The counter group is useful when you want
 * to make detailed judgments for each skill.
 * For example, if you want to set up that bow skills
 * cannot be substituted, you can do so as follows
 * 
 * Set the note for the bow skill and the counter group to 'bow'.
 * <CounterGroup:bow>
 * 
 * Next, set the note for the substitute state
 * and disable the counter group "bow".
 * <CounterGroupExcept:bow>
 * 
 * Conversely, if you wish to create a state in which only
 * the bow skill is the target of the substitution,
 * set the following in the note.
 * <CounterGroupInclude:bow>
 * 
 * -------------------------------------------------------------------
 * [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 CoverDefaultSubstitute
 * @type boolean
 * @default true
 * @desc The default substitution should also be handled by this plugin.
 * 
 * @param SubstituteHpRate
 * @type number
 * @default 25
 * @desc Performs a substitution if a fellow member's HP falls below this percentage.
 * 
 * @param TargetDamageType
 * @type string
 * @default 1,5
 * @desc Damage type targeted for substitution. 0:None, 1:HP Damage, 2:MP Damage, 3:HP Recover, 4:MP Recover, 5:HP Drain, 6:MP Drain
 * 
 * @param TargetHitType
 * @type string
 * @default 1,2
 * @desc The hit type of the skill targeted for substitution.
 * 0:Certain Hit, 1:Physical Attack, 2:Magic Attack
 * 
 * @param TargetSkillType
 * @type string
 * @default 0,1,2
 * @desc Skill type to be targeted for substitution.
 * With standard, 0: Normal Attack, 1: Magic, 2: Special.
 * 
 * @param TargetForOneSkill
 * @type boolean
 * @default false
 * @desc Only skills with a single range are targeted for substitution.
 * 
 * @param SubstituteItem
 * @type boolean
 * @default false
 * @desc It also executes a substitution for the item.
 * 
 * @param AnimationId
 * @type animation
 * @desc This is an animation that is executed when a substitute is activated.
 * 
 * @param DynamicSkill
 * @type skill
 * @desc A DynamicAnimation&Motion skill that is executed when a substitute is activated. It has a higher priority than AnimationId.
 * 
 * @param SvMotionDuration
 * @parent DynamicSkill
 * @type number
 * @desc Priority display of SV motion at the time of substitution for a specified time. If blank, use Wait.
 * 
 * @param Wait
 * @type numer
 * @default 10
 * @desc The waiting time when the substitution is activated, in 1/60 second increments.
 * 
 * @param <Counter Skill>
 * 
 * @param CounterGroup
 * @parent <Counter Skill>
 * @type string
 * @desc This is a counter group where substitution becomes effective.
 * 
 * @param CounterGroupNG
 * @parent <Counter Skill>
 * @type string
 * @desc This is a counter group for which the substitution is invalid.

スポンサードリンク

-MZ plugins

Copyright© PGMZ - The Community-Driven Plugin Library for RPG Maker MZ , 2026 All Rights Reserved.