antidotecrk
Newbie
- May 3, 2023
 
- 48
 
- 21
 
- 60
 
I just created a script to add plugins without having to modify 
	
	
	
			
All you need to do is drop a properly formatted plugin json file (same exact format from RPG Maker) in 
	
	
	
			
	
		
			
		
		
	
								js/plugins.js which could cause conflicts, I'm also starting to come up with ideas on how mod load order can be handled (and how to properly handle multiple mods modifying the same CommonEvent)
		JavaScript:
	
	/* MOD_Preboot
* Written by Phillip 'Antidote' Stephens
* USAGE:
* Modify index.html and add `<script type="text/javascript" src="mod_preboot.js"></script>` after plugins.js
*/
(function(){
    'use strict'
const fs = require('fs')
const path = require('path')
const preboot_plugins = fs.readdirSync('./preboot_plugins')
preboot_plugins.forEach(plugin => {
    const plugin_data = fs.readFileSync(path.join('./preboot_plugins', plugin));
    $plugins.push(JSON.parse(plugin_data.toString()))
});
// TODO: Add other preboot hooks that may be necessary
})();
	www/preboot_plugins for example
		JSON:
	
	{
    "name":"TDDP_PixelPerfect",
    "status":true,
    "description":"1.1.1 Enable pixel perfect scaling mode for your game",
    "parameters": {
        "enableIngameOptions":"true",
        "labels":"",
        "en":"Pixel Perfect Mode",
        "ja":"ピクセルパーフェクトモード",
        "zh":"像素完美模式",
        "ko":"픽셀 퍼펙트 모드",
        "ru":"Режим Pixel Perfect"
    }
}