Core Plugin MZ

This is the documentation for the “Core Plugin” for RPG Maker MZ. Here you’ll get all the information you need to use its functions.

Core Settings

Core Settings

Global Settings

General Info

This plugin does not provide any directly gameplay related settings. Instead it’s supposed to help with the development process aswell as provide functions for my other plugins to use to keep the codebase small. You can think off it as sort of a library that is used by my plugins. All my RPG Maker MZ plugins are going to need this in order to run properly. Some only for the version check, others use a lot (if not even all) of the internal functions it provides.

Please make sure to fill out all the settings in order to avoid JSON Errors.

If you’re receiving JSON Errors, you can always check the Console by pressing F12. The plugin is written in a way that it will hint at the setting that contains the faulty JSON.

Back to top

Core Settings

The core settings cover development process of your game and support you with certain functionialities. Make sure to check them before starting to work on your profile aswell as before deploying your game to avoid Errors.

Settings

Core Settings
Back to top

Developer Mode

The Developer Mode enables certain functionalities that do not work on all release platforms. It uses nwjs/nodejs internal filesystem functions to allow easy file handling. However those functions do not work on browser exports unless the website runs on nodejs natively. To compensate for that, the plugin sets up config files during testplay in Developer Mode. Those config files are then used in Release Mode. The plugin does not need to use those eventually unavailable functions anymore then.

It is very important that you start a testplay in Developer Mode at least once!

On top of providing special functionalities for plugins to build config files the mode also supports you. It throws error messages when the order of my plugins is wrong and specifies where errors are inside JSON elements (nested settings). Usually the engine only says “JSON Error at position xyz”, but does not specify which JSON it is or where it came from. That’s where the core helps you in Developer Mode. It shows exactly which setting is wrong/missing.

If you’re getting an error message popup you can open the console (F12) to get more detailed information about the error.

Back to top
Core Settings

Release Mode

In Release Mode the plugin will use the config files built in Developer Mode instead of the nwjs/nodejs functions. Also all alerts and console logs are turned off. This ensures that the deployed game runs on all platforms aswell as avoiding any unneccessary error messages.

You still have to keep this plugin registered and active in order for any other of my plugins to work in the finished game. It just switches into a somewhat more passive mode.

Back to top
Core Settings

Update Notifications

Update notifications will inform you when there are new versions of any of my plugins that you are using. Version checks can also be viewed in the console (F12) during testplay. Successful update checks that don’t contain a new version are also logged there so you can see that the checks are working. When the setting is set to “OFF” OR the mode is switched to Release mode, there won’t be any update notifications.

Important info on how the version checks work:

In order to check if there are newer versions available, the plugin needs to connect to some sort of list. It does that by connecting to this website, reading this file. Then it compares the version info inside the file with the version info stored in the plugins of me that you have installed.

I keep the file up to date at all times so you’ll always get the latest information.

The connection to this file only occurs when “Upate Notifications” are set to “ON” and “Developer Mode” is enabled. The process of checking does NOT store any of your data. The only thing transfered is the version info of the plugins.

Back to top
Core Settings

Global Settings

The global settings interact more actively with other plugins. While there currently isn’t a lot available, there will be more in the future.

Please make sure to take a look at the settings and check them even if you don’t use them to avoid any errors.

Settings

Global Settings
  • Fonts:

    Lets you register all fonts that you want to use with my other plugins. More info can be found here

  • Hooks:

    Lets you set up “Hooks” that can be used by other plugins to interact with each other. More info can be found here

Back to top

Fonts

You can register as many as you want as long as they are located inside the fonts folder of your project. Make sure to include the file type with the name. Example: “Quikhand” won’t work, but “Quikhand.ttf” will. When setting up the font names inside the plugins themselves you only need to use the name without the ending. Font names are case sensitive

Fonts

Fonts folder

  • Fonts folder

Back to top
Global Settings

Hooks

Hooks allow you to “hook in” functions from certain plugins which can then be used/altered by certain other plugins. All you have to do to create a hook is to set up a name for it. You can then reference the name in the internal hook setup of the plugins you want to link together to then use the extra functions.

If a plugin is able to provide/use hooks it will state a list of what it can do inside the manual. It will also provide the setup settings needed to put everything together

Hooks
Back to top
Global Settings

Engine Bugfixes

While developing my plugins I sometimes run into bugs inside the RPG Maker MZ engine, or at least things that I would consider bugs. I “fix” them in order for my plugins to work.  This section will provide info on those bugs and workarounds if you want to get the “functionality” back.

  • Event Command Call:

    Usually when an event is empty and it gets triggered by the action button, the event does not move at all. But if there is a plugin command inside and nothing else, it turns towards the player for a few frames. I consider this a bug and so I made sure this does not happen when the Core Plugin is running.

    If you still want to trigger an event like that, simply put an empty comment inside and it will work just like before.

Back to top

Special Features

While this plugin does not have many active features it does provide some special features that can be used by the plugins. Those will be listed here. Make sure to read them carefully as some of them might be quite complex.

Back to top

File Management

The internal file management functions allow the plugins to create folders inside the project and also create and read config files. As described in the Developer Mode section, the writing functions only work during Developer Mode. The plugins are not able to change other files outside of the project. If you want to read up on file system functions, please check the nwjs documentation. Those are the basis for what is happening inside the plugin. However, I changed them a bit to avoid errors.

Back to top
Special Features

JSON Parser

While JavaScript has its own JSON Parser function, the error messages it provides can be hard to read. And sometimes they won’t even show the faulty string at all or fail to point at the correct place. That’s why this plugin provides a custom wrapper for the JSON Parse which enables other plugins to use it and throw very specific error messages so that you’ll always know where to look when an error occurs.

If you’re getting a JSON Error that does not provide a popup alert, it is most likely not related to any of my plugins.

If you’re getting a JSON Error with a popup, you can check the console after confirming to get information about where the error happened (F12).

JSON Error

Sample JSON Error

  • Sample JSON Error

JSON Error

Sample JSON Error console view

  • Sample JSON Error console view

Back to top
Special Features

Active & Passive Commands

When using my plugins you will come across the phrase “Active and Passive Commands” quite often as some plugins use a special feature that allows plugin commands to be executed without actually having to trigger the corresponding event.

From other authors you might know a similar feature when they use the event command “Comment” to read certain data without the event being triggered. However, this allows for a lot of error potential which I don’t like. And as some commands can get quite complex, those manual inputs are hard to deal with.

I came up with a solution that allows me to use the regular plugin commands while still being able to read them from events without having to trigger them in advance.

Active Command:

Active commands work like any other plugin command. The event needs to be triggered for the command to run at all.

Passive Command:

The command will be executed as soon as the map loads if it sits on the currently active page of the event. If the event page changes the commands will also be checked. This way you can manage passive commands and have a bit more control over when they are executed.

When a passive command is used, only the command itself will be executed, the rest of the eventcode will not be run until it is triggered like it’s supposed to. When the event is triggered, the passive command will be ignored.

Back to top
Special Features