This guide explains how to use the Pocket Events plugin in RPG Maker MZ and MV, allowing players to place and manipulate events from a specified 'template' map in the current map.
-
Template Map:
The plugin allows you to place events from a designated 'template' map. The template map can be set in the plugin's "Templates Map" parameter. -
Placement Items Setup:
Define placement rules and setup events using the 'Placement Items' plugin parameter.
To place and remove events, use the following plugin commands:
-
PlacePocketEvent PlacementItemID RemoveItemID
- PlacementItemID: The index of the Placement Item from the 'Placement Items' plugin parameter.
- RemoveItemID (Optional): The ID of the item that will be removed from the player's inventory after placing the item.
-
PickUpPocketEvent PlacementItemID GainItemID
- PlacementItemID: The index of the Placement Item from the 'Placement Items' plugin parameter.
- GainItemID (Optional): The ID of the item that will be added to the player's inventory after removing the item from the map.
-
PickUpThisPocketEvent GainItemID
- This command will remove the currently selected Pocket Event (which must have been placed using this plugin).
- GainItemID (Optional): The ID of the item that will be added to the player's inventory when the event is removed from the map.
See plugin command inside RPG Maker
You can change the direction of placed events. Ensure the template event has "Direction Fix" disabled.
- Keyboard: Hold Shift and press the Arrow Key to rotate.
- Mouse: Hold Shift and use the Mouse Scroll Wheel to rotate.
If the Pocket Event has the Allow Y Offset?
parameter enabled, you can adjust the Y offset as follows:
- Keyboard: Hold Ctrl and press the Arrow Key.
- Mouse: Use the Mouse Scroll Wheel to adjust.
This feature allows you to expand the collision size of an event, which can be useful for both draggable and pocket events.
To expand the collision size of an event, add the following comment on the event's page:
expandSize:[DX, DY],...
- DX, DY: These represent the extra collision cells added to the event, measured in tiles.
-
Expand to the left:
expandSize:[-1,0]
-
Expand to the left and right:
expandSize:[-1,0],[1,0]
-
Expand up and down:
expandSize:[0,-1],[0,1]
-
Expand in all directions:
expandSize:[-1,0],[1,0],[0,-1],[0,1]
Note: Please note that this comment should be added on every page of the event. If the event switched to a page without this comment, it will revert to its original 1x1 size.
You can set Timer for Pocket Event.
- See plugin parameter
Timer
for setup Timer settings. - After Timer is expired, you can set action for Pocket Event.
You can add pocket events to the map in the editor. To do this, add the following comment to the event's page:
initialPocketEvent:ID
Where ID is the index of the placement item from the plugin parameters.
Note: The event must be set to "Below Characters" in the editor for it to be placed correctly. And event must be empty (not image, no trigger, etc.). Event body will be replaced with the pocket event.
First you should turn ON Place On Events?
plugin parameter in placement item config. This will allow you to place pocket events over other events.
Then, you can restrict the placement of pocket events to only certain event types.
Add types to the Events Types
plugin parameter. Example: "Table".
For set type to the map event, add the following comment to the event's page: placeOverType:NAME
Where NAME is the name of the type you want to allow place over this event.
Note: You can set special comment placeOverType:none
to disable placement over this event.
You can create events that the player can drag across the map using the mouse. To enable this feature:
- Set the plugin parameter "Event Drag Drop?" to
true
. - Define draggable event rules in the "Draggable Templates" plugin parameter.
To make an event draggable, add the following comment to the event's page:
draggable:X
Where X is the number of the dragging template from the plugin parameters.
The following script calls are available for use in your events:
-
PE_Place(PlacementItemID, RemoveItemID);
Place a Pocket Event with the specified item. Optionally remove an item from the inventory after placement. -
PE_PickUpByItem(PlacementItemID, GainItemID);
Pick up (remove) a Pocket Event and optionally gain an item. -
PE_PickUpByEvent(GainItemID);
Pick up the currently selected Pocket Event and optionally gain an item. -
PE_LastEventId();
Returns the ID of the last placed Pocket Event or draggable event. -
PE_LastEventRegion();
Returns the region of the last placed event. -
PE_LastEventTerrain();
Returns the terrain tag of the last placed event. -
PE_LastEvent();
Returns the Game_Event object of the last placed event. -
PE_ForceStopTimer(eventID, mapID);
Stops the timer for a specified Pocket Event. If mapID is not provided, the current map ID is used. -
PE_ForceCompleteTimer(eventID, mapID);
Completes the timer action for a specified Pocket Event. If mapID is not provided, the current map ID is used.