create_project
Create a new RPG Maker MZ project from scratch by specifying the project path and game title to initiate game development.
Instructions
Create a new RPG Maker MZ project from scratch
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| game_title | Yes | Title of the game | |
| project_path | Yes | Path where the project will be created |
Implementation Reference
- src/game-creation-tools.ts:23-118 (handler)The core handler function that executes the 'create_project' tool logic. It creates the full RPG Maker MZ project directory structure, Game.rpgproject file, default System.json, MapInfos.json, Map001.json, and empty database JSON files.export async function createNewProject(projectPath: string, gameTitle: string) { try { // Validate inputs Validator.requireString(projectPath, "project_path"); Validator.requireString(gameTitle, "game_title"); await Logger.info("Creating new project", { projectPath, gameTitle }); // Check if project already exists try { await fs.access(projectPath); throw new Error(`Project path already exists: ${projectPath}`); } catch (error) { if ((error as NodeJS.ErrnoException).code !== "ENOENT") { throw error; } } // Create directory structure const dirs = [ "audio/bgm", "audio/bgs", "audio/me", "audio/se", "data", "effects", "img/animations", "img/battlebacks1", "img/battlebacks2", "img/characters", "img/enemies", "img/faces", "img/parallaxes", "img/pictures", "img/sv_actors", "img/sv_enemies", "img/system", "img/tilesets", "img/titles1", "img/titles2", "js/plugins", "movies" ]; for (const dir of dirs) { await fs.mkdir(path.join(projectPath, dir), { recursive: true }); } // Create Game.rpgproject file const projectFile = `RPGMZ 1.0.0`; await fs.writeFile(path.join(projectPath, "Game.rpgproject"), projectFile, "utf-8"); // Create System.json const system = getDefaultSystem(gameTitle); await fs.writeFile( path.join(projectPath, "data", "System.json"), JSON.stringify(system, null, 0), "utf-8" ); // Create initial map const mapInfos = [null, getDefaultMapInfo(1, "MAP001")]; await fs.writeFile( path.join(projectPath, "data", "MapInfos.json"), JSON.stringify(mapInfos, null, 0), "utf-8" ); const map001 = getDefaultMap(1, "MAP001"); await fs.writeFile( path.join(projectPath, "data", "Map001.json"), JSON.stringify(map001, null, 0), "utf-8" ); // Create empty database files await fs.writeFile(path.join(projectPath, "data", "Actors.json"), JSON.stringify([null], null, 0), "utf-8"); await fs.writeFile(path.join(projectPath, "data", "Classes.json"), JSON.stringify([null], null, 0), "utf-8"); await fs.writeFile(path.join(projectPath, "data", "Skills.json"), JSON.stringify([null], null, 0), "utf-8"); await fs.writeFile(path.join(projectPath, "data", "Items.json"), JSON.stringify([null], null, 0), "utf-8"); await fs.writeFile(path.join(projectPath, "data", "Weapons.json"), JSON.stringify([null], null, 0), "utf-8"); await fs.writeFile(path.join(projectPath, "data", "Armors.json"), JSON.stringify([null], null, 0), "utf-8"); await fs.writeFile(path.join(projectPath, "data", "Enemies.json"), JSON.stringify([null], null, 0), "utf-8"); await fs.writeFile(path.join(projectPath, "data", "Troops.json"), JSON.stringify([null], null, 0), "utf-8"); await fs.writeFile(path.join(projectPath, "data", "States.json"), JSON.stringify([null], null, 0), "utf-8"); await fs.writeFile(path.join(projectPath, "data", "Animations.json"), JSON.stringify([null], null, 0), "utf-8"); await fs.writeFile(path.join(projectPath, "data", "Tilesets.json"), JSON.stringify([null], null, 0), "utf-8"); await fs.writeFile(path.join(projectPath, "data", "CommonEvents.json"), JSON.stringify([null], null, 0), "utf-8"); await Logger.info("Project created successfully", { projectPath }); return { success: true, message: `Project created at ${projectPath}` }; } catch (error) { await Logger.error("Failed to create project", { projectPath, gameTitle, error }); return createErrorResponse(error); } }
- src/index.ts:1145-1152 (registration)MCP server registration of the 'create_project' tool handler in the CallToolRequestSchema switch statement, which calls the createNewProject function.case "create_project": { const projectPath = args.project_path as string; const gameTitle = args.game_title as string; const result = await createNewProject(projectPath, gameTitle); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
- src/index.ts:208-225 (schema)Input schema definition for the 'create_project' tool, provided in the ListToolsRequestSchema response.{ name: "create_project", description: "Create a new RPG Maker MZ project from scratch", inputSchema: { type: "object", properties: { project_path: { type: "string", description: "Path where the project will be created", }, game_title: { type: "string", description: "Title of the game", }, }, required: ["project_path", "game_title"], }, },