xuyanwen2012/rmmz-plugins-starter(opens in a new tab)
Language: JavaScript
A starter template to develop RPG Maker plugins utilizing ES6 and modules.
- stars
- 4
- watchers
- 1
- forks
- 0
- open issues
- 0
- Last updated
- 08/28/2020
Language: JavaScript
A starter template to develop RPG Maker plugins utilizing ES6 and modules.
RPG Maker MV/MZ plugin development starter in TypeScript
This repository is a monorepo that allows easy development of for RPG Maker MV/MZ plugins. It serves as a starting point for plugin developer who loves to write RM plugins in TypeScripts. The monorepo is especially useful for developers who produce many plugins. Rather than having many repositories each filled with redundant toolchains and dependencies, we can manage them as a whole in this template.
Simply clone this repository to start building your plugins.
Under the plugins directory, lies each plugin
rmmz_plugins-starter
│
└───dist
│ │ Plugin1.js // The generated ready-to-use plugins,
│ │ Plugin2.js // simply copy them to your RPG Maker Plugin folder
│ │ ...
│
└───plugins
│ │
│ └───Plugin1
│ │ │ _header.txt // Plugin parameters goes here etc.
│ │ │ package.json // Should specify the plugin's name here, used by the pnpm.
│ │ │ rollup.config.js
│ │ │ tsconfig.json
│ │ │
│ │ └───src
│ │ │ index.js // The entry point of your plugin
│ │ │ others.js
│ │ │ ...
│ │
│ └───plugin2
│ │ │ ...
│ │
│ │ ...
When making a new plugin, just copy paste the example Plugin1 directory (excluding node_modules).
Give the plugin a proper name in the package.json.
Run pnpm install again to install some dependency.
Then you are ready to go.
We recommend using pnpm since this is a monorepo.
Alternately you can still use npm, which then involves extra manual work.
Once pnpm is installed, just use pnpm in place of npm/Yarn.
E.g., install dependencies via:
pnpm install
To compile a plugin you wrote. For example plugin1,
where plugin1 is the package name specified in plugins/Plugin1/package.json.
pnpm build // build all plugins
pnpm build --filter plugin1 // build only plugin 'plugin1'
Note, npm package name does not allow upper case characters, thus all package name should be named in lower case.
Then the compiled RM plugin will be at /dist/Plugin1.js
You can also do a style check or fix on your plugin code via:
pnpm run check --filter plugin1 // check all plugins
pnpm run fix // automatically fix all source code
Released under the MIT License.