your are a genious tsukihime!
it is pretty usefull~
Useeefulll. Another option to use 🙂
After it's been used, does the script remove the files that were created outside of the archive?
It is not removing the created files.
Well, you can do deleting the folder after main process, but to ensure it you need to somehow disable alt+f4 to make sure the code runs.
Or make some codes that delete it run upon program exiting....
If the files need to be cleaned up I would write a launcher app that will run RM, and then perform clean up when RM process closes.
To be really useful, the game engine should create the audio on playing, and then delete the file immediately upon switching to new background music. I'm saying background music as an assumption that that's where most of the 'custom audio' that people want encrypted is going to go. That would make it a little harder to grab the file since it would be 'in use'.
I don't know how much of a performance hit that would take, but I'm assuming most of us aren't worried about ALL the sounds and music played during the game, though I could be wrong about that.
The only time I've really come across this issue was when I was thinking of doing a 3D game. Daz makes great 3D models - after an email exchange they confirmed the models could be used in a game, so long as they were encrypted and the end user could not extract them as a model (ie: they couldn't get Victoria 4.0 for "free" by playing your game).
A file being 'in use' does not stop it from being copied. It merely stops it from being changed/saved/renamed/moved/deleted.
I've added an option to delete all unpacked audio files when a new audio file is loaded.
This means that when they close the game via alt+F4, there will be one file lying around.
But I don't understand why the script would only be useful if it cleans up the files.
The purpose of the script isn't to prevent people from taking your audio.
I thought the whole purpose of this is so that players cannot easily copy the audio files...
My understanding was the purpose of the script was to stop people from "spoilers" with the audio. So you can't just open the audio folder and listen to all the music, you have to first experience it in game.
I wouldn't go with a hidden folder (I agree with you on that), but a normal folder in the game's directory should be good - it just doesn't have to be called "audio files here". That should also help with prevent any accidental deletions since only files in that folder would be eligible to be deleted - so all the games normal background sounds and anything else you don't encrypt would be safe.
Btw - to people thinking of using this: it's better to _not_ encrypt everything.
If you don't, most people will assume the audio they see is all there is.
If you try to hide everything, they start looking...
you could always put a little extra audio files here and there 🙂
Making a new file in the game's folder, and extracting the audio to there (in fact, even extracting the audio to where the script currently does) could cause problems if the player has installed the game into something like Program Files. Every time it went to play a new piece, they'd get a popup asking if they want Windows to allow it. Wouldn't they?