Plugin to manipulate the "exclude unused files" option

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
458
Reaction score
334
First Language
English
Primarily Uses
RMMV
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?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,111
Reaction score
13,713
First Language
English
Primarily Uses
RMMV
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.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,434
Reaction score
7,713
First Language
German
Primarily Uses
RMMV
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".
 

EthanFox

Veteran
Veteran
Joined
Oct 15, 2018
Messages
458
Reaction score
334
First Language
English
Primarily Uses
RMMV
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.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,047
Messages
1,018,540
Members
137,834
Latest member
EverNoir
Top