BlacksmithPluginManager v0.2.1
[email=Connor%20%22Saelorable%22%20Macleod<Blacksmith@saelora.com>]Connor "Saelorable" Macleod <Blacksmith@saelora.com>[/email]
Introduction
Blacksmith Plugin Manager is the first of a
suite of plugin development tools i am working on. Originally for personal use, but now being shared.
The aim of the Plugin Manager is to provide an easy way to manage dependencies without having to worry about plugin load order. As well as allowing users to include plugins from the internet far easier.
Features
- Online plugin download: Plugins can be included using a URL to download at runtime. These plugins can also be cached so they are only downloaded once for offline projects. Any plugin can be included in this manner.
- Dependancy management: Compatible Plugins are not initialised until their dependancies are ready.
- Access compatible plugins from anywhere: compatible plugins are stored in an object for access from other plugins, allowing for a clean global scope.
How to Use
End users: Either copy the below script and save it as a text file "BlacksmithPluginManager.js" or else right click on the github link and select "save as" or "download" depending on your browser.
However you get the file, save it in your projects js/plugins folder.
Once you have the file, enable it in the plugin manager within RPG Maker.
You can then include any plugins you have a direct url to in the plugin parameters on the page within. and they will be included within your project, no further work needed.
Plugin developers: Instead of using a Self-Executing Anonymous Function to isolate your code, compatible plugins should use the following structure:
Code:
Script
Github Link: https://github.com/Connor-Macleod/blacksmith-plugin-suite/blob/master/BlacksmithPluginManager.js
Code:
FAQ
Q: I'm working on a plugin that depends on another plugin and it's not a compatible plugin, how do i include it?
A: Just include the dependancy in the same way you would a compatible plugin. All non-compatible plugins are loaded before blacksmith plugins, so you can guarantee the dependancy will be loaded first.
Q: I'm insane and want to include a plugin available over ftp.
A: Why? what even... ?!? Luckily i'm insane too and included a rudimentary FTP client in the code, so there is partial support for including ftp sources. You will need to enable caching online plugins, and run the game once in test mode for it to work though.
Q: What's this i hear about JSON files?
A: You can include configuration for any plugins in a json file named after the plugin. I.E. "js/plugins/examplePlugin.json"
Licencing
Copyright (c) 2019 Connor "Saelorable" Macleod
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish and/or distribute copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
- That no additional charge is ascribed to the inclusion of the software.
- That attribution is included with any use of the software such that it is visible to end users, either within any bundled software or on any related download pages.
- That no bundled items intentionally promote hate speech or discrimination of protected minorities.
Additionally, permission to sublicense, and/or sell copies of the Software may be obtained by contacting the copyright holder. This permission may come with additional and/or more specific costs and/or conditions.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Author's Notes
All feedback is greatly appreciated!
本贴来自国际rpgmaker官方论坛作者:Saelorable处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/plugin-manager-and-download-tool-blacksmithpluginmanager-v0-2-1.105933/