|
1 | | - |
2 | | - |
3 | | -### Introductions |
4 | | -This project document the whole MZ codebase allowing programmer to create plugins for rpg maker MZ using typescript. |
5 | | - |
6 | | -### How to use it? |
7 | | -Just download the project and get the files from dist/libs |
8 | | -There's a totals of 7 files (including the external library) |
9 | | -There's two way of using it : |
10 | | - |
11 | | - by using the bundled files and calling the file globally or using the import features such as |
12 | | - ```js |
13 | | - import {Sprite} from "./lib/rmmz_core"; |
14 | | - ``` |
15 | | - |
16 | | - Please take now that in the forseen futur the file will be created as an distributable npm project and the core file will be declared as ambient module. |
17 | | - |
18 | | - ### Plugin Environment |
19 | | - The plugin environment is still a work in progress but will be worked once the definitions files will be released. It will use rollup.js to build your plugins. An integration with gulp is also planned. |
20 | | - |
21 | | - ### Contributing |
22 | | -You can contribute to the project by any means! |
23 | | -use to install all the dependencies. |
24 | | -```npm |
25 | | - npm install |
26 | | - ``` |
27 | | -As the project is open to contribution there's specific rules to follow : |
28 | | - |
29 | | -All class must be declared then exported |
30 | | - ```ts |
31 | | - declare class Dummy {} |
32 | | - export {Dummy} |
33 | | - ``` |
34 | | - due to the fact the project use rollup to bundle the files. |
35 | | - All the appropriate files must be imported into the main file relative to the folder. |
36 | | - i.e : rmmz_core.d.ts , rpg_object.d.ts etc |
37 | | - the structure is at follow : |
38 | | - ```ts |
39 | | - import {Class} from "./module"; |
40 | | - |
41 | | -declare module "rmmz_core" { |
42 | | - export { |
43 | | - Class, |
44 | | - } |
45 | | -} |
46 | | - ``` |
47 | | -#### do and don't |
48 | | - |
49 | | -Do references separated module directly from separated folder |
50 | | -```ts |
51 | | - import {Game_Temp} from "../rpg_object/Game_Temp"; |
52 | | - ``` |
53 | | - In compiled file just using |
54 | | - ```ts |
55 | | - import {Game_Temp} from "../libs/rmmz_api"; |
56 | | - ``` |
57 | | - will work fine. |
58 | | - |
59 | | -## build the files |
60 | | -Simply do rollup configfilename for the time being. In the futur their will be a NPM script command to just build the whole library in one call. |
61 | | - |
62 | | -## Roadmap |
63 | | - * Documents all the classes. |
64 | | - * Create RPG_Object, Manager , etc definitions files |
65 | | - * Convert the project to a NPM project. |
66 | | - * Create plugins helper. |
67 | | - * Establish the plugin environment |
68 | | - * Establish proper NPM command for ease the building. |
69 | | - |
70 | | -## Licenses |
71 | | -MIT |
| 1 | +[source]: https://github.com/niokasgami/Rpg-Maker-MZ-Typescript |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | +# Introduction |
| 9 | + |
| 10 | +This project provides type definitions for the whole MZ codebase allowing the programmer to create plugins for rpg maker MZ using Typescript. |
| 11 | + |
| 12 | +This is a fork of [Nio Kasgami's repository][source], but adapted to be |
| 13 | +used as an NPM dependency. **All credit for the type definitions goes to Nio |
| 14 | +Kasgami and their contributors.** If you'd like to support the project, please |
| 15 | +head to the original repository. |
| 16 | + |
| 17 | + |
| 18 | +# Getting Started |
| 19 | + |
| 20 | +The project can be installed via NPM, both via the default NPM registry and the |
| 21 | +Github NPM Registry: |
| 22 | + |
| 23 | + npm install rmmz@npm:@masked-rpgmaker/rpg-maker-mz-typescript |
| 24 | + |
| 25 | +All types are available from the top-level module: |
| 26 | + |
| 27 | +```ts |
| 28 | +import { DataManager, $gameParty, Game_Character } from 'rmmz'; |
| 29 | +``` |
| 30 | + |
| 31 | +Alternatively, you might import each module separately: |
| 32 | + |
| 33 | +```ts |
| 34 | +import * as core from 'rmmz/rmmz_core'; |
| 35 | +import * as objects from 'rmmz/rmmz_objects'; |
| 36 | +// ... |
| 37 | +``` |
| 38 | + |
| 39 | + |
| 40 | +# Contributing |
| 41 | + |
| 42 | +If you're interested in providing new type definitions, please give preference |
| 43 | +to doing so on the [source repository][source] from Nio Kasgami. |
| 44 | + |
| 45 | +We'll work to integrate any new type definitions added to their repository on |
| 46 | +our side. |
| 47 | + |
| 48 | +If you have any suggestions specific to this fork, please open an issue |
| 49 | +following our templates and/or open a pull request. |
| 50 | + |
| 51 | + |
| 52 | +# Terms of Use |
| 53 | + |
| 54 | +Please read the [license information](./LICENSE.md) for this repository. |
| 55 | + |
0 commit comments