I've made a plugin. What it does is, base64 encoding of every dataFile. And if you're playtesting, it will take data from the original files (because the encoded ones don't get created until you launch the game for the first time), but in the deployed game it will take data from the encoded ones. So after deployment you just delete the unencoded ones and you're good to go.
EDIT: I just realized that since MV first loads all plugins, then it launches the game, I can create the files even before the game gets launched. So I removed one if and one alias, meaning you can see any performance hits this plugin is bound to inflict by decompression even on playtest.
Also, the reason why I call it compression is simple - the LZString function is "compressToBase64" and "decompressFromBase64".
😛
EDIT: I uploaded it to my repository.
https://github.com/Poryg1/RPG-maker-MV-small-plugins
Oh, that was unexpected - I'm not so accustomed to having things done for me but I shall have a look at what you've put together
🙂
And fair enough on the Compression statement - I'm just anal about definitions & terminologies, apologies.
😛
@MusicalSamurai you probably don't know it yet, but we have
rules against
double posting (posting right underneath yourself). You can just edit your previous post if you have more to add
🙂
Apologies, I was trying not to but the response timings have been strange and I've caught myself just finishing a response and seeing another post pop up which I feel to immediately respond to also, resulting in the doubles...
To add insult to injury, I cannot delete my duplicates even though I'm capable of copying the text from one and pasting it into a single message... This place has some strange restrictions... (I'm used to being a dev/admin on so many systems, it feels strange to be a pawn without even the ability to remove his own messages)
But I shall look out for posts before sending, and then try to include it all into a single post
🙂
(Also didn't realise this bit stays open at the bottom while switching between pages - quite handy!)
A workaround is to create a map that the player will never visit. In this map, you can add music, images, sprites, etc. whatever needs to be in the deployed version that's missing now, and the engine will add it because now it thinks it's being "used".
I have thought of this briefly, but I'm a bit OCD and the thought of an unused map with random stuff loaded on it makes me shudder; even my Debug Room is like a fully working mini-game with its own little secrets in it
😛
But yes... It is a very sensible suggestion and perhaps I will resort to your workaround if I'm somehow at a loss with defining my assets programmatically - many thanks
🙂
I uploaded it to my repository
I just took a look at your code now; I'd sniff at your naming conventions if it weren't for the amazingly concise code! - I don't think I could have written better than that, other than having slightly different variable names and I don't tend to use var but the scope you're using it in is just right! - I don't like using other people's stuff but you've definitely given me an amazing bit of insight into how this could be practically pulled off! Thank You!
(If I come up with anything different myself, I will certainly share it with you)