Plugin Sanity

Silvi

Villager
Member
Joined
Aug 8, 2017
Messages
6
Reaction score
4
First Language
English
Primarily Uses
RMMV

Description


This is a utility plugin, as in you use it for other plugins. It makes writing and managing plugins easier, adding a top level API that plugins can draw upon. As the name suggests, this is a highly opinionated work.

Notes

- This is for RPG Maker MV v1.5

- I have tested the code on desktop and everything seems to work, however it's not feature complete and I would prefer testing it on various OS releases before calling it version 1.

- I probably won't finish documenting everything until I've rounded out the features and tested it more. That said most of the functions are thoroughly commented inline, so if you have experience with plugins you should be able to follow what the plugin is doing.

Features (there's some other odds and ends that you can find in the code that may or may not stay)
  • Register Plugin

    By using this your plugin will be wrapped in a function which will prevent your variables from bleeding into global scope. (While you can do this with a self executing anonymous function, it will also link your plugin to the dependency manager).

  • Dependency Manager

    With the dependency manager you can require other plugins be run before this plugin, assuming they've been registered. What this means is that you can organize plugins in the official plugin manager in whatever order you want, and your plugins won't break. This will also make it easier for plugin users to identify missing plugins.

  • Event Listening

    The normal way to plug code into the life cycle of RPG Maker is to wrap their methods with an overload. Figuring out which one you should wrap can be tricky, and if you're not careful you could introduce bugs. For simple code injection, I've created a very simple eventing system that wraps all the scenes as well as a few other key game points. This lets you do things like onInit which fires after the database has been loaded and all plugins have been run.

  • Note Tag Pre-Processing

    This is actually what inspired me to write this plugin. I've noticed that plugins that use notetags are looping through all the game objects looking for their specific tags. While this is fine on a single plugin basis, when you have 50+ plugins that's a lot of wasted cycles. I have noticed, what I believe to be new, the meta tag parameter on game objects but it isn't quite everything we need for notetags. This feature loops through every game object, collecting them to an independent dictionary for quick reference with the hasNotetags method.

  • Register Plugin Command

    The registerPluginCommand method works similarly to the on[event] methods and lets you avoid writing if statements and switches for all of your plugin commands.
Terms of Use

- MIT Licensed. This means you can use this plugin for whatever you want. The only restriction is you have to keep a reference to the license somewhere in the code.

https://github.com/Sivli-Embir/rpg_maker_plugins/blob/master/LICENSE


WIP Code

Here is the plugin itself: https://raw.githubusercontent.com/Sivli-Embir/rpg_maker_plugins/devel/Siv_Plugin_Sanity.js
Here's a link to my in development page (all scrips wip in this link): https://github.com/Sivli-Embir/rpg_maker_plugins/tree/devel
Please note that the code in those links will be changing over time until I release a version 1.

For my completed code see the master branch: https://github.com/Sivli-Embir/rpg_maker_plugins

Right now I'd like to get feedback with this plugin. Since I'm new to using RPG Maker, I'm hoping some JS devs with lots of experience using it can give this a look over and let me know what they think.

Also if anyone happens to use this plugin with a near finished project, I'd like to know if there's any lag or features that don't scale.

~Thanks!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect
I have gathered enough feedback from a few selected people. But it is still available if you want to sign up https://forums.rpgmakerweb.com/index.php?threads/looking-for-testers-a-closed-tech-demo.130774/

Forum statistics

Threads
105,992
Messages
1,018,189
Members
137,771
Latest member
evoque
Top