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 Call Enemy - NRP_CallEnemy.js

Plugin desc : v1.06 Implement the "Call Enemy" function.

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

Desc page : http://newrpg.seesaa.net/article/485838070.html

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

File name : NRP_CallEnemy.js

Help of plugin :

Add a "Call Enemy" function to the enemy skill.
 * The enemy that appears will automatically appear in a marginal area.
 * 
 * The following plugin is required for use.
 * - NRP_TroopRandomFormation.js (ver1.06~)
 * 
 * The way the enemy is placed also depends
 * on the plugin parameters of NRP_TroopRandomFormation.js.
 * Please make adjustments there.
 * 
 * Note that if NRP_TroopRandomFormation.js is installed, troops
 * whose name starts with "#" will be subject to automatic placement.
 * Please be careful if you do not want to use this feature.
 * 
 * -------------------------------------------------------------------
 * [Usage]
 * -------------------------------------------------------------------
 * Create skills for "Call Enemy".
 * 
 * First, the scope of the skill should be a single target,
 * such as "User".
 * Be aware that if the range is "None", the skill will not work.
 * 
 * Next, fill in the following in the note field of your skills.
 * <CallEnemy: x>
 * 
 * This will call the enemy with ID x.
 * If you omit it and just write <CallEnemy>,
 * it will call the same enemy as the user of the skill.
 * 
 * Multiple designations are also supported.
 * <CallEnemy: 1~3>
 * Then it will randomly invoke an enemy with ID 1 to 3.
 * <CallEnemy: 1,3,5>
 * Then it will randomly call an enemy with an ID of 1, 3, or 5.
 * 
 * By the way, if you increase repeat,
 * you can call more than one fellow at a time.
 * 
 * -------------------------------------------------------------------
 * [Note of Skills]
 * -------------------------------------------------------------------
 * <CallEnemyDynamic: x>
 * Works with the DynamicAnimation&Motion plugins.
 * Appears with the direction specified for the x numbered skill.
 * 
 * <CallEnemyXY:[X-Coordinate], [Y-Coordinate]>
 * Makes enemies appear at the specified coordinates.
 * 
 * <CallEnemyCtbWt:[Number]>
 * ※For use with NRP_CountTimeBattle.js
 * Change the wait time before the first action
 * to the specified value (100 is standard).
 * For example, <CallEnemyCtbWt:0> will act immediately.
 * If <CallEnemyCtbWt:50>, it will start acting in 1/2 turn.
 * 
 * -------------------------------------------------------------------
 * [Note of Enemies]
 * -------------------------------------------------------------------
 * <DynamicAppear: x>
 * In linkage with the DynamicAnimation&Motion plugins,
 * the skill appears with the direction specified
 * for the x-numbered skill.
 * 
 * Choose your preferred designation method: skill or enemy.
 * If both are specified, the skill side is given priority.
 * 
 * Note that this setting is shared
 * with the appearance direction by NRP_DynamicAppear.js.
 * 
 * <CallEnemy: x>
 * The ID of the target to be called
 * when an enemy character calls an enemy.
 * The ID must not be specified in the skill that calls the enemy.
 * Multiple designations are also supported.
 * 
 * -------------------------------------------------------------------
 * [Sample of DynamicMotion]
 * -------------------------------------------------------------------
 * <D-Motion>
 * frame = 5 // Movement time
 * sx = a._homeX -500 // Start X (off-screen left)
 * sy = a._homeY // Start Y
 * ex = a._homeX // End X
 * ey = a._homeY // End Y
 * </D-Motion>
 * 
 * "a" refers to the called enemy and "b" refers to the user of the skill.
 * "a._homeX" and "a._homeY" are the placement points.
 * Implement it so that it will eventually move there.
 * 
 * -------------------------------------------------------------------
 * [Plugin Command MZ]
 * -------------------------------------------------------------------
 * ◆CallEnemy
 * Freely invoke an enemy within a battle event.
 * Unlike invocation by skill, coordinates can be specified.
 * 
 * -------------------------------------------------------------------
 * [Reference]
 * -------------------------------------------------------------------
 * The following plugin was used as references
 * in the creation of this plugin.
 * 
 * EnemyCallsAlly.js (Sasuke KANNAZUKI)
 * https://forum.tkool.jp/index.php?threads/4795/
 * 
 * -------------------------------------------------------------------
 * [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 Command
 * @------------------------------------------------------------------
 * 
 * @command CallEnemy
 * @desc Calls the specified enemy.
 * 
 * @arg EnemyId
 * @type enemy
 * @desc The ID of the enemy to call.
 * Text input is valid for formulas, etc.
 * 
 * @arg X
 * @type string
 * @desc The X coordinate at which enemy appears.
 * If left blank, it will be calculated automatically.
 * 
 * @arg Y
 * @type string
 * @desc The Y coordinate at which enemy appears.
 * If left blank, it will be calculated automatically.
 * 
 * @arg DynamicId
 * @type skill
 * @desc Specify the appearance direction by DynamicAnimation&Motion.
 * Specify the ID of the skill.
 * 
 * @------------------------------------------------------------------
 * @ [Plugin Parameters]
 * @------------------------------------------------------------------
 * 
 * @param MaxEnemyNo
 * @type number
 * @default 5
 * @desc The maximum number of enemy that can appear.
 * Attempting to call more than that will result in failure.
 * 
 * @param SuccessMessage
 * @type string
 * @default %1 showed up!
 * @desc The message to be displayed when the call is successful.
 *
 * @param FailureMessage
 * @type string
 * @default However, the fellow didn't show up!
 * @desc The message to be displayed when the call is failed.
 * 
 * @param DeleteDeadEnemy
 * @type boolean
 * @default false
 * @desc Deletes dead enemies when Call Enemy is executed.
 * Do not overlap placements with revival.
 * 
 * @param LinkDynamicAppear
 * @type boolean
 * @default true
 * @desc Works with NRP_DynamicAppear.js to execute the appearance direction.

スポンサードリンク

-MZ plugins

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