erri120 / rpgmpacker

Simple CLI program for packaging RPG Maker games to use in an automated build/deploy pipeline.
MIT License
28 stars 3 forks source link

Plugin images not exported with --exclude-unused flag #19

Closed auragamedev closed 2 years ago

auragamedev commented 3 years ago

Version Information:

According to official MZ documentation, to ensure that resources used by custom plugins are deployed correctly with the exclude-unused flag, they should be registered in the MaterialBasePlugin.js. It seems that the MZ export also somehow crawls the plugins.js for paths.

grafik

When exporting with default MZ deploy, this gives the expected result and all images appear in the picture folder. When exporting with RPGMPacker, these images are missing.

erri120 commented 3 years ago

This is a rather big problem that might need some rather complex solution. A plugin can have parameters which are parsed from the huge doc string at the start of the plugin:

/*
 * @param Some Image
 * @desc Some nice Image
 * Default: MyImage
 * @default MyImage
 * @require 1
 * @dir img/system/
 * @type file
 */

The parameters are saved to /js/plugins.js but in order to know which parameter is a file, the tool has to parse all plugins and map each parameter. There is also the problem with what folder the file is in aswell as figuring out the file extension based on that folder. Will probably have to wait till I get #21 done.

erri120 commented 2 years ago

Done in 05f1c054f6c2f0692728aa37e3b65ac6c3f6f501