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 Put Random Events - NRP_PutRandomEvents.js

Plugin desc : v1.052 Placement automation for symbol encounters.

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

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

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

File name : NRP_PutRandomEvents.js

Help of plugin :

Randomly place events on the map.
 * Placement can be conditioned on passage information,
 * region, terrain tag, tile ID, and auto-tile type.
 * 
 * Basically, it is intended for
 * automatic placement of enemy events in symbol encounters and ARPGs.
 * 
 * The following official launch plugins are required to use this plugin.
 * 
 * - TemplateEvent.js
 * - EventReSpawn.js
 * 
 * Both are available from.
 * [RPG Maker MZ]¥dlc¥BasicResources¥plugins¥launch
 * 
 * -------------------------------------------------------------------
 * [Usage]
 * -------------------------------------------------------------------
 * 1. Create a template event following
 *    the instructions in TemplateEvent.js.
 * 2. Execute each plugin command and specify the template event ID
 *    and other information.
 *    ※See the following plugin commands for details.
 * 
 * Note that the behavior of placed events follows
 * the specifications of TemplateEvent.js and EventReSpawn.js.
 * 
 * -------------------------------------------------------------------
 * [Plugin Commands]
 * -------------------------------------------------------------------
 * ◆PutEventsByPassage
 * Randomly place events based on map passage information.
 * 
 * ◆PutEventsByRegion
 * Randomly place events in the specified region ID.
 * 
 * ◆PutEventsByTerrain
 * Randomly places events on the specified terrain tag.
 * 
 * ◆PutEventsByTile
 * Randomly places events on the specified tiles.
 * Can also be specified by Autotile Type.
 * 
 * -------------------------------------------------------------------
 * In common with both commands, the event will not be placed
 * at coordinates where an event has already been placed.
 * ※Duplicate placement is allowed only in the case of Through.
 * Placement will be stopped when all coordinates become unplaceable.
 * 
 * For Region ID, Terrain Tag, Tile ID, and Autotile Type,
 * you can use formulas or specify multiple (e.g.1: 1,2,3 e.g.2: 1~3).
 * 
 * -------------------------------------------------------------------
 * [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 Commands
 * @------------------------------------------------------------------
 * 
 * @command PutEventsByPassage
 * @desc Randomly place events based on map passage information.
 * 
 * @arg TemplateId
 * @type string
 * @desc Template ID of the event to be placed.
 * Specify the event name/ID for TemplateEvent.js.
 * 
 * @arg NumberOfEvents
 * @type number
 * @default 1
 * @desc The number of events to place.
 * 
 * @arg PassageType
 * @type select
 * @option All @value ALL
 * @option Passable Only @value ON
 * @option Impassable Only @value OFF
 * @default ALL
 * @desc This is a passage type of event placement.
 * 
 * @arg Range
 * @type struct<Range>
 * @desc The range where the event will be placed.
 * If omitted, the entire map is covered.
 * 
 * @------------------------------------------------------------------
 * 
 * @command PutEventsByRegion
 * @desc Randomly place events in the specified region ID.
 * 
 * @arg TemplateId
 * @type string
 * @desc Template ID of the event to be placed.
 * Specify the event name/ID for TemplateEvent.js.
 * 
 * @arg NumberOfEvents
 * @type number
 * @default 1
 * @desc The number of events to place.
 * 
 * @arg RegionId
 * @type string
 * @desc The ID of the region where the event will be placed.
 * 
 * @arg Range
 * @type struct<Range>
 * @desc The range where the event will be placed.
 * If omitted, the entire map is covered.
 * 
 * @------------------------------------------------------------------
 * 
 * @command PutEventsByTerrain
 * @desc Randomly places events on the specified terrain tag.
 * 
 * @arg TemplateId
 * @type string
 * @desc Template ID of the event to be placed.
 * Specify the event name/ID for TemplateEvent.js.
 * 
 * @arg NumberOfEvents
 * @type number
 * @default 1
 * @desc The number of events to place.
 * 
 * @arg TerrainTag
 * @type string
 * @desc This is the terrain tag where the event will be placed.
 * 
 * @arg Range
 * @type struct<Range>
 * @desc The range where the event will be placed.
 * If omitted, the entire map is covered.
 * 
 * @------------------------------------------------------------------
 * 
 * @command PutEventsByTile
 * @desc Randomly places events on the specified tiles.
 * Can also be specified by Auto-tile Type.
 * 
 * @arg TemplateId
 * @type string
 * @desc Template ID of the event to be placed.
 * Specify the event name/ID for TemplateEvent.js.
 * 
 * @arg NumberOfEvents
 * @type number
 * @default 1
 * @desc The number of events to place.
 * 
 * @arg TileId
 * @type string
 * @desc Tile ID where the event will be placed.
 * 
 * @arg AutotileType
 * @type string
 * @desc Autotile ID where the event will be placed.
 * 
 * @arg Range
 * @type struct<Range>
 * @desc The range where the event will be placed.
 * If omitted, the entire map is covered.
 * 
 * @------------------------------------------------------------------
 * @ Plugin Parameters
 * @------------------------------------------------------------------
 * 
 * @param KeepPlayerDistance
 * @type number
 * @default 0
 * @desc The placement of events is prohibited at coordinates within a specified range from the player.
 * 
 * @param ProhibitedRegion
 * @type number
 * @desc Regions where placement is prohibited.
 * 
 * @param CheckOpenDistance
 * @type number
 * @default 0
 * @desc Confirms that the event's placement coordinates are in an open area to the extent specified.
 * 
 * @param CheckEventCollision
 * @parent CheckOpenDistance
 * @type boolean
 * @default true
 * @desc For CheckOpenDistance, check for event collisions.
 * 
 * @param PassableOnly
 * @type boolean
 * @default true
 * @desc Place only at points where the event is passable.
 * See also the setting by other plugins (e.g. NRP_ChangePassage).
 * 
 * @param IgnoreStarTile
 * @type boolean
 * @default false
 * @desc When specifying tiles, ignore ☆ tiles (upper layer).
 * That is, it will place them on the hidden lower tiles.

スポンサードリンク

-MZ plugins

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