Plugin to manipulate the "exclude unused files" option

Just wanted to find out if anyone's ever done this, as part of me feels someone may have.

When I deploy, I tend to use the "exclude unused files" option, because it removes a bunch of stuff I'm not using.

However, as we all know I'm sure, this option is a bit "over-zealous" and removes, for example, assets that are only referenced by plugins.

To combat this, I have a common event which I never call in-game, which just has a load of "play SE" and "show picture" calls, to "reserve" these files so they don't get stripped out during deployment.

Unfortunately this results in a slight problem; the game strips out the images in my titles1, and overlays folders (and a couple of others), and I have no way to reference those in that common event.

Has anyone ever written a plugin where I can somehow specify a list of files that would be excluded, but I want the deployment to include them anyway?
Maybe http://blog.dreamsavior.net/2018/01/rmmv-scrubber-prevent-unused-resource.html can help.
This looks promising, haven't tested it: https://raw.githubusercontent.com/triacontane/RPGMakerMV/master/ExcludeMaterialGuard.js
All you've got to do is add your own .js file to the plugins folder and insert it in the plugin manager, and list your resources in the header comments in the correct format. The format is in the help file.
Has anyone ever written a plugin where I can somehow specify a list of files that would be excluded,
The editor can't be modified, so the only way is to have a different program handle the sorting if you want that - or make that list in a map of the editor.

However from the way you've written your explanation I think that there are a few facts that you've missed about the entire complex, especially point 2 below:

1) the exclude unused works perfectly for everything in the regular engine. If a file is used somewhere in events or in maps or in the database, then it will be detected as used and included - if it is not there it goes to point 2 for further checks.
2) If the resource is not used in the default engine, it checks if the resourse is registered by a plugin.
YES, the engine specifically has functions with which the plugins can tell it what pictures they use and include them into the deployment.
If a resource is used only by a plugin and is then stripped of, it means that the plugin writer failed to tell the editor to not strip that resource.
3) a resource is only removed if it is neither used in default nor registered by the plugin.

Unfortunately a lot of plugin writers never bothered with the correct handling of their pictures after that option and its javascript commands were added to the engine. It would have been a lot better if they had added the registration for their resources.
So one other option aroud this is to create a map that is unused and unconnected to the rest of the game and use the pictures and sounds and whatever in events there to have them be detected as "used".
So one other option aroud this is to create a map that is unused and unconnected to the rest of the game and use the pictures and sounds and whatever in events there to have them be detected as "used".

Yeah, this is what I do for most of the stuff - I actually do it as a single "common event" which is never called, that contains all the "Play SE" and "Show Picture" calls; I've found that works. Unfortunately "Show Picture" can't access pictures in the /titlesX and /overlays etc. folders, so it's not a perfect solution.

Thanks for your points about plugins and the other suggestions though - and thanks everyone else! I'm sure I'll find something here.

Original thread: https://forums.rpgmakerweb.com/threads/plugin-to-manipulate-the-exclude-unused-files-option.111118/