update_map_event
Modify map event properties in RPG Maker MZ/MV projects to adjust character interactions, dialogue, or triggers within game maps.
Instructions
Update a map event's properties
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapId | Yes | ||
| eventId | Yes | ||
| updates | Yes |
Implementation Reference
- src/tools/mapTools.ts:172-190 (handler)The actual implementation of the update_map_event tool handler.
export async function updateMapEvent( projectPath: string, mapId: number, eventId: number, updates: Partial<MapEvent> ): Promise<MapEvent> { const map = await getMap(projectPath, mapId); if (!map.events[eventId]) { throw new Error(`Event ${eventId} not found on map ${mapId}`); } map.events[eventId] = { ...map.events[eventId]!, ...updates }; const mapPath = getMapPath(projectPath, mapId); await writeJsonFile(mapPath, map); return map.events[eventId]!; } - src/index.ts:411-420 (registration)The registration of the update_map_event tool, including its schema.
name: 'update_map_event', description: 'Update a map event\'s properties', inputSchema: { type: 'object', properties: { mapId: { type: 'number' }, eventId: { type: 'number' }, updates: { type: 'object' }, }, required: ['mapId', 'eventId', 'updates'],