MVStripper - remove unused assets from your MV project

Ultima2876

Veteran
Veteran
Joined
Oct 25, 2015
Messages
185
Reaction score
232
First Language
English
and js/plugins?
It should recurse through subdirectories, but that may be what the plugin bug is :D

EDIT: I've just checked and confirmed that it does indeed copy plugin script files properly, at least. All of the files in /js/plugins are present in my 'Target' directory after running the process. I believe if it's copying those files, it should also be scanning them for file references.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,139
Reaction score
12,413
First Language
English
Primarily Uses
RMMV
Sorry - I meant does it look through js/plugins to see if any of THOSE have resources hardcoded?

Also, what does it do wrt audio files?  Both the .ogg and the .m4a should be included in a project, and when you export the project it will use whatever file is appropriate for that platform.  Does your program leave both of them there?  (Or are you meant to run it AFTER exporting)?
 

Ultima2876

Veteran
Veteran
Joined
Oct 25, 2015
Messages
185
Reaction score
232
First Language
English
Sorry - I meant does it look through js/plugins to see if any of THOSE have resources hardcoded?

Also, what does it do wrt audio files?  Both the .ogg and the .m4a should be included in a project, and when you export the project it will use whatever file is appropriate for that platform.  Does your program leave both of them there?  (Or are you meant to run it AFTER exporting)?
Yup, it checks through /js/plugins to see if they have resources hardcoded also. It'll incidentally check any subdirectory under /js -- it's a recursive function.

With audio, it copies both the ogg and m4a files. Similarly, with tilesets, it copies the png and txt files for each used tileset.

The recommended workflow is:

- Work on your project

- When you want to export for testing, save project

- Run MVStripper, target new directory

- Open new directory in RPG Maker MV and test to make sure it's fully working

- Export (deploy) from stripped project

EDIT: Had some more time to look into the plugin issue. It does seem to be copying activated plugins properly after all - they're saved in a file called /js/plugins.js and it exists in both the source and target projects. The first time I tested it I may have forgotten to save my project before running MVStripper - I can successfully 'strip' a project and it has all the plugin information in the stripped project as expected.
 
Last edited by a moderator:

Ultima2876

Veteran
Veteran
Joined
Oct 25, 2015
Messages
185
Reaction score
232
First Language
English
No worries! As I mentioned, I mainly wrote it because I needed it myself to distribute my test builds and use file versioning for my project. Once I was done, it hit me that a lot of people could probably benefit from it until Degica get a proper solution going in RPG Maker MV :)
 
Last edited by a moderator:

ssunlimited

Veteran
Veteran
Joined
Oct 3, 2015
Messages
196
Reaction score
19
First Language
Russian
Primarily Uses
RMMV
Okay I have used this program. Problem is I don't see an effect. I see new files in the target directory but the project itself has the same amount of megabytes as before using the program. And when I output the game it still is the same size.

EDIT:oooooooooh! Sorry! Never mind. The second option it asks you doesn't output the unused things like I thought, it outputs the project folder without the unused things. I was confused before.

Thank you OP. This really helps since I need this to be smaller for several reasons. How much is the minimal donation to that place? I don't think I can donate much...
 
Last edited by a moderator:

Ultima2876

Veteran
Veteran
Joined
Oct 25, 2015
Messages
185
Reaction score
232
First Language
English
What were you're before/after file sizes, if I may ask? :) Glad you got it working!

If you're donating by PayPal I believe it's $1. Every dollar helps, so even if that's all you can afford it'd be awesome! Thanks!
 
Last edited by a moderator:

Ultima2876

Veteran
Veteran
Joined
Oct 25, 2015
Messages
185
Reaction score
232
First Language
English
Not bad! If you need to get your project any smaller, try deleting unused default animations, as those take up around 55mb on their own! (However, be careful - animations are a bit of a pain to set up so this should only be done with animations you're sure you won't need!)
 
Last edited by a moderator:

ssunlimited

Veteran
Veteran
Joined
Oct 3, 2015
Messages
196
Reaction score
19
First Language
Russian
Primarily Uses
RMMV
I don't know for the future of this game... I might keep them just in case.

Btw I have donated a little bit.
 

Ultima2876

Veteran
Veteran
Joined
Oct 25, 2015
Messages
185
Reaction score
232
First Language
English
Thanks for donating!

I'd do the same for now. I am tempted to add an option to search for unused animations specifically... I've had a little look and it shouldn't be hard (the only complication is 'Show Animation' events, as far as I can see - if anyone more experienced with RPG Maker can point out anywhere I might be missing that Animations could be referenced, I'd be grateful!). In most projects should knock off another 30mb or so!

EDIT: Another idea is to integrate pngcrush into the process. A few initial tests show that using pngcrush method 10 we can shave off another 10-20% off of almost all of the png files in a project. In a project with 100mb of art assets, that's going to be a significant chunk. PNG is completely lossless so there is no disadvantage to doing this, other than the 'stripping' time being quite a bit longer (as a guess, minutes instead of seconds for the average project... it'll be a checkbox most likely ;) )
 
Last edited by a moderator:

y0da

Villager
Member
Joined
Oct 27, 2015
Messages
21
Reaction score
1
Hello.

First of all thank you for this tool. I got my project stripped to 198 mb.

Is it reasonable to hope for a game under the 100mb mark after your optimisations?
 

Ultima2876

Veteran
Veteran
Joined
Oct 25, 2015
Messages
185
Reaction score
232
First Language
English
For desktop deployment, not really. Unfortunately, they have to include a 95mb runtime, which would leave 5mb for all of your game's music, art and code. 150mb for a small project is more realistic (but bear in mind that the runtime is not applicable for web/mobile projects).
 

y0da

Villager
Member
Joined
Oct 27, 2015
Messages
21
Reaction score
1
I wasn't specific in my reply but I was thinking about an android game. I stripped it to 153mb on android only by using your script and exporting it to Android/iOS.

Thank you.

However, do you know why my BGM files are not playing on my device? I tried with and without the ogg files in addition to the m4a ones.

They only play after a ME is played. Therefore I also have no battle music.

This is certainly offtopic but you may help me in PM if you want.

Have a nice day
 

Ultima2876

Veteran
Veteran
Joined
Oct 25, 2015
Messages
185
Reaction score
232
First Language
English
I wasn't specific in my reply but I was thinking about an android game. I stripped it to 153mb on android only by using your script and exporting it to Android/iOS.

Thank you.

However, do you know why my BGM files are not playing on my device? I tried with and without the ogg files in addition to the m4a ones.

They only play after a ME is played. Therefore I also have no battle music.

This is certainly offtopic but you may help me in PM if you want.

Have a nice day
Oh, in that case, we can probably get it down to under 100mb with a future update. Animations take up quite a bit (53mb) so that's my next target. On top of that I want to add an option to PNGCrush all the images, which will take a while to export (at least a few minutes) but should trim all of the images down by another 30% or so (so we're looking at saving 15-25mb there). Finally, I'm considering ways to use the TinyPNG API to get even greater reductions on certain types of images - TinyPNG works especially well on battlebacks, parallaxes and animation sheets, giving around a 70% reduction in size (but that's more of a tricky implementation, and again will increase the 'stripping' time by quite a bit).

No idea on the music stuff, sorry -- as far as I know, if you have both the m4a and ogg files in the project there shouldn't be any issues. Does the music play OK on desktop/web?
 

y0da

Villager
Member
Joined
Oct 27, 2015
Messages
21
Reaction score
1
Thomas Phan is helping me on the audio issues. Some devices play them and others just don't,  until a ME is played...

Please keep working on this. I am developping little apps with kids and it would be easier for me to distribute games for them on the play store (parents afraid when apk installation is blocked by google).

I didn't look for splitting the files but it must be tricky.

Have a nice day and keep us posted.
 

Ultima2876

Veteran
Veteran
Joined
Oct 25, 2015
Messages
185
Reaction score
232
First Language
English
This has been put on the back burner for a bit while I work on improving my other tool/site, MVFU (http://www.kickbackgames.com/mvfu). I will be working on it again in the coming weeks, but unfortunately I have to balance my free time and at the moment MVFU is the higher priority (mainly because people will use that more at the beginning of their projects, whereas MVStripper is more of an end-of-project tool).

If anyone does have requests in the meantime for features that I haven't already mentioned, please drop them here!
 

Joewoof

Veteran
Veteran
Joined
Oct 28, 2015
Messages
106
Reaction score
46
First Language
English
This is going to be amazing when I need it at the end of my project!
 

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

Latest Threads

Latest Profile Posts

Ive got a long lost half uncle. Thats real cool.
I forget what is bumping rule in this forum. Is anyone know? Thank you.
BCj
Ew, why does my blogpost on the rpgmaker.net site look like a garbled mess? Are html codes disabled or something?
I feel that I should cut down on my order queue so I can get some more time for my projects, its been quite a longggg while since I worked on them LOL
I friend of mine insisted on practicing dubbing things with him... and its quite funny, yet, it really takes a huge amount of practice!

Forum statistics

Threads
97,892
Messages
947,679
Members
129,127
Latest member
rawegg
Top