Using Plugins in MZ
Hiddenone
by
Hiddenone
on
October 13, 2020
October 13, 2020

Using Plugins in MZ

Using Plugins in MZ
by

Hiddenone

on

October 13, 2020

In some of our recent Resource Spotlights, we’ve looked at some of the amazing plugins creators have shared with all of us to use to improve our games. It’s great to know about all these options, but let’s take a closer look at plugins for those new users who aren't familiar with how to use them.

New users of RPG Maker have probably heard the term ‘plugin’ thrown around a lot without any explanation, which can be pretty confusing when there are so many other engine terms to learn. Before we get into how to add and use these plugins, let’s first figure out what exactly a plugin is.

What is a plugin?

At their most basic, plugins are JavaScript files that contain code that changes how MZ functions. When they’re added to a game plugins can do almost anything the coder imagines, from relatively straightforward things like removing the HP bar from the menus to recreating the entire battle system to have a unique style. What this means for MZ users is simple: it gives us more ways to make our dream game become a reality, without having to have a in-depth knowledge of JavaScript coding.

Plugins can seem overwhelming at first, and it’s true that some of them require us to put in a lot of effort so that it works well, but most of them have clear instructions so as long as we follow those we should be able to use them without problems. Of course, before we can use any plugin, we need to get it into our game.

Adding a new plugin to your game

The first thing we need to do is pick our plugins. We don’t want to add in a bunch of unneeded plugins just because they’re cool since feature creep can be a real problem. Learning when to say enough is enough is important, so when we’re choosing what plugins to add we’re picking ones that will add to our players’ enjoyment and keep us sane as developers.

MZ comes with a bunch of plugins included as dlc with the engine which aren’t added to new projects by default, so let’s add some of those.

Once we’ve picked the plugins we want to use, we need to add our new plugin’s file into the game’s project. Open up our project folder and find the ‘js’ folder. The ‘js’ folder is where the game’s magic happens, so we don’t want to touch any of the JS files in that folder unless we’re well-versed with coding (and even then, it’s best to not edit those files directly). We’ll pick the ‘plugins’ folder and then just drop our plugin’s file into that folder, and we’re ready to use the plugin in our game!

MZ doesn’t automatically use the plugins in our folder though, we need to activate it in the engine. So let’s find the Plugin Manager. There are two easy ways to get to it, we can either find the Plugin Manager under the Tools menu or just click on the puzzle piece next to the Database icon.

With our Plugin Manager open, all we have to do is double-click, add our plugins to the list, and we’re ready to go!

Now that our plugins are in our game, we can finally use them.

Using a plugin

There are quite a few ways we can interact with plugins, and not all plugins have the same options for us. The possible plugin options and what we can do with them depend on what exactly the plugin is meant to do and how its creator decided to code, so there isn’t a single method when it comes to using plugins. That said, there are a few commonly seen ways that we can take a look at.

The first possible option is the easiest for us as users, where the plugin doesn’t actually offer any ways to change things. 

It’s simply a plug-and-play plugin, so as soon as we’ve added the plugin to our Plugin Manager it will start working when we start playtesting. While this type of plugins are easy to use they do have the minor issue of not giving us a way to adjust things, which means if we’re not happy with how something looks we either have to live with it or not use the plugin.

One of the most common ways for us to interact with plugins is through their Parameters. 

The parameters themselves vary between plugins (from simple true/false options to lists that require multiple numerical inputs), but the main thing is that it gives us a way to adjust how the plugin behaves. Most of the time Parameters need to be set up before we can jump into playtesting to see the changes the plugin has made, since we obviously can’t expect a plugin to know we want it to do something if we never tell it.

Plugin Commands are an in-event way to call plugins. They’re a way to tell the plugin that it should do something now, giving us ways to control when and where the plugin’s effect is happening.

Usually they’re well-labelled so we just need to pick the right command and set up any extra details in the Arguments section, but when in doubt it’s simple to go back to the Plugin Manager and see if anything is mentioned in the Help section.

Notetags are the last option we’ll look at. Often these pop up in plugins that affect things in the Database, like Items or Actors, but can also work with notetags in other areas like events or even maps.

They’re commonly set up as <notetag>, so that a plugin will know it’s not just a dev’s note to themself about something. Since we have to write out the notetags ourselves, it’s important to make sure we don’t accidentally mistype something (or add in an extra ‘s’ when the plugin only needs one…). Luckily we can pull up Plugin Help by hitting F1 or right-clicking in the Note box and choosing the help option, so it’s straightforward to copy-paste any notetags we want to use.

What if the plugin isn’t working?

While plugins give us incredible new options for our games, there is still always the chance of something going wrong. Running into a crash caused by a plugin is never fun, for either us or the players, so when it happens we’ve got to make sure we can fix the problem. Before deciding to throw out the plugin and find another way to do something, we can check for a few reasons why the crash happened.

The first thing to do is check our Plugin Manager. At the bottom of the Manager is a handy little area that will point out some issues, like if we’ve accidentally added the same plugin twice.

It can also tell us if a plugin is meant for MV instead of MZ (which could possibly cause problems) or if we need to add certain plugins is a specific order, so checking to make sure that section is clear is a good thing to do each time we add a new plugin.

Once we know the Plugin Manager doesn’t see any causes, it’s time to start testing. First thing we want to do is to make sure to test the game with a new save file! Some plugins can’t work with older save data that doesn’t include the plugin, so any time we add a new plugin we want to not use any old saves.

If the crash still happens even with a new game, then it’s time to figure out which plugin is the one causing the crash. Sometimes this can be done simply by reading the crash info or hitting F8 to check the console log while playtesting, but if you can’t recognize the plugin from those then one option is to go in and turn off all our plugins so that we can check them one by one to see which is the culprit. If the crash is happening with an event in the middle of the game it can seem like a hassle to test this way, but creating a ‘dev room’ map means we can just copy over the event to check on the crash.

Once we’ve narrowed down the cause of the crash, we need to reread the plugin’s help section to make sure that it’s not happening due to user error. With a complicated plugin it’s easy to overlook directions, so taking some extra time to make sure we’re doing everything right is important. 

Of course, even if we’re sure we’re doing everything right and following the plugin’s directions, there’s still the chance that we’re doing something wrong or the plugin just has a bug. In that case, the best thing to do is ask for assistance on the RPG Maker forum or contact the plugin creator to let them know. Make sure to be as detailed as possible with the crash and what plugins you’re using so that it’s easier on people to help you spot what’s causing the problem.

Plugins can add a lot to a game when used, but they can definitely seem overwhelming at first. The point of plugins is to help us make our games a reality, but just like every other part of game development it’s what we do with them that counts. Don’t be afraid to hold off on using plugins if your game doesn’t need them, or to ask for help when you can’t understand what the directions mean.

Recommended Posts