Why isn't the deployment option doing a proper job?

This is something I'm finding REALLY annoying with RPG Maker MV, I know it's a relatively new program and i'm reporting this for the sake of everyone who uses it including me.


I've been trying to deploy a small demo of my project for some friends to look at- but whenever I deploy a demo it randomly decides to exclude certain files that are being used in the game causing me crashes, error missing file pop ups etc. I try several times again-


Fixed everything  and made sure all the files being used are there- when I deploy again only this time places that use audio files decide to not even bother playing the audio even though I've made sure the files are in the directory.


Try again- files are missing or either not being played. I've lost count on how many times I have tried to get a working demo-What the hell..


I have no idea why this is a thing- but people are going to get extremely mad and frustrated when they spend an hour or so uploading a game to only find that it doesn't work for some unknown reason. Especially if it's being sold online.


So my question is why is the deployment function with RPG Maker MV not doing it's job?
Are these files used in plugins, or in settings you create in the editor (System tab, map or event settings or commands)?


Are you checking the box to exclude unused resources, or is this happening even when you leave that blank?


Deploying to PC or a different target?
There are specific reasons why a file might be excluded, and you need to find that reason and remove the problem.


Because in all cases, the problem appears because the editor either don't know about the file or can't handle it, so of course it can't give you an error message.


1) if a file is only used by plugin, then the engine has no way of knowing that it is used at all.


Solution: make a map that you never enter and place events with the commands containing those files there.


2) the filename does not conform to networking rules - windows partially overrides the editor and forces it to use files that it usually shouldn't handle, and that will cause problems if deployed.


Solution: rename those files to follow networking rules for filenames (and yes, that means changing every place where you referred to the wrong filename).
It is probably because the exporter cannot decide what files are used by the plugins in most cases.


This is even worse when you use "Exclude Unused Files".


I always take about 15-20 minutes to manually export the files used by the plugins, and I have found it useful to just keep all the animations and SE without excluding any, because it may get too bothersome to find which of them are used by plugins, one by one.
Additionally, if you are using any MOG plugins or plugins of authors that require you to keep some images/data on a separate folder, make sure to manually copy those folders as well.
Primarily the files that are being excluded from the game exe are plugin commanded- so judging from what I am being told here the program doesn't recognize them as used files because it's handled with a different function that is ordinarily used I.E play SE


Would you agree that the best thing to do would be to not tick the exclude "Exclude Unused Files" and to manually remove unused content such as animations in program and the cells in the file directories.
@Skurge That is one option - but there is no general "best" option because it depends on how the developer works.


I know several people who keep their planning files inside the project directory to simplyfy their backups and have their notices all in one place - for those it would be a lot easier to allow the automatic removal from deployment.


On the other hand, if you keep your project clean and your extra data in other folders, then it is probably the best option to manually decide what to remove and what not
Wouldn't it be easier to just pack up everything in the project folder? Why does the program only... never mind, at this point I'm surprised MV even has an export option. . There are batch programs that convert file names to more browser friendly ones, you just have to give your game one more solid play and see what needs to be edited.
It is probably because the exporter cannot decide what files are used by the plugins in most cases.


This is even worse when you use "Exclude Unused Files".


I always take about 15-20 minutes to manually export the files used by the plugins, and I have found it useful to just keep all the animations and SE without excluding any, because it may get too bothersome to find which of them are used by plugins, one by one.
Additionally, if you are using any MOG plugins or plugins of authors that require you to keep some images/data on a separate folder, make sure to manually copy those folders as well.

agreed, any game ive exported with the "exclude unused files" function hasn't worked but simply unchecking and exporting as a whole has always worked for me. 
So in a way by the looks of it the exclude unused files option works only for projects that don't incorporate plugins that use audio/other files.
In either case, whether you choose to use the exclude files option or not, you will still have to manually rearrange a lot of files.
If you do not use the exclude files option, you will still have to manually remove a lot of files to clear up the unnecessarily used up space, and manual import of some files/folders might still be required.


If you have exported a couple of times and know what files your plugins are using, exclude unused files option can end up being more time saving even if your project relies heavily on plugins.
I'd recommend leaving the RTP stuff in there, it might bloat it a bit but in the case of even a medium size project you just never know what sound, what hidden file a plugin uses. It's way to time consuming, with very little to zero payoff.
This is just bs. I can't even get away with manually removing simple files even without the exclusion option.


I deploy and test- and here we are missing BGS and SE- still at least allowing me to play the game but just down right ignoring my commands.


I think there is a bug with this still. I have no choice but to let it deploy with RTP files I'm not even using. I just don't get it.
A quick and dirty solution would be just to dump the whole file in there. Just to see if it's at least file pointing correctly. 
I stole this from one of @nio kasgami's status updates:

* @requiredAssets img/example/image_1



It goes at the beginning comment block area (probably before/after the parameters stuff). Nio said he found it in the manual. Should help MV deployment in this case.
Yeah i'm updated the full thing since it's the only thing that seems to be working for me atm.


What is that all about there on the code you quoted?

Original thread: https://forums.rpgmakerweb.com/threads/why-isnt-the-deployment-option-doing-a-proper-job.67199/