Simple Audio Encryption

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English



This script provides very simple audio encryption. It allows you to store audio files inside the rgss3a archive.


The data is decrypted and created outside of the archive when the game wants to play an audio file.


This means that while it is possible to easily copy the file once the game starts playing it,


you can still protect files that they have not managed to unlock during the game.


Get it at Hime Works!
 
Last edited by a moderator:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
your are a genious tsukihime! 

it is pretty usefull~
 

Misaki

Pikalyze
Veteran
Joined
Apr 21, 2013
Messages
156
Reaction score
26
First Language
English
Primarily Uses
RMMV
Useeefulll. Another option to use :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
After it's been used, does the script remove the files that were created outside of the archive?
 

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
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....
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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.
 

Mouser

Veteran
Veteran
Joined
Aug 19, 2012
Messages
1,245
Reaction score
264
First Language
English
Primarily Uses
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).
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
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.
Well, IMHO, for this to be really useful, it needs to clean the files afterwards.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
A file being 'in use' does not stop it from being copied. It merely stops it from being changed/saved/renamed/moved/deleted.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
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.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This means that while it is possible to easily copy the file once the game starts playing it,


you can still protect files that they have not managed to unlock during the game.
I thought that WAS the purpose of the script?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I thought the whole purpose of this is so that players cannot easily copy the audio files...
 
Last edited by a moderator:

Mouser

Veteran
Veteran
Joined
Aug 19, 2012
Messages
1,245
Reaction score
264
First Language
English
Primarily Uses
I thought the whole purpose of this is so that players cannot easily copy the audio files...
That was my thought - this sort of goes along with the 'How do I protect my copyright?" thread.

For people who have custom audio files created for their games, protecting them is a big deal.

For people who have licensed music for their games, protecting the files may be a requirement.

Yes, there will always be the 'analog hole' with music (or video), but you can show you've taken precautions to protect the work, which CYA in some settings. It also makes copying the files illegal under the DMCA through the circumvention clause.
 

Halrawk

Veteran
Veteran
Joined
Dec 14, 2012
Messages
97
Reaction score
24
First Language
English
Primarily Uses
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.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
For people who have custom audio files created for their games, protecting them is a big deal.


For people who have licensed music for their games, protecting the files may be a requirement.


Yes, there will always be the 'analog hole' with music (or video), but you can show you've taken precautions to protect the work, which CYA in some settings. It also makes copying the files illegal under the DMCA through the circumvention clause.
Being able to pack up your files in a secured archive where the files are only created when you actually play them provides a lot of protection over simply leaving it out in the open.


It also provides much more security than other schemes that simply dump all of the audio in a hidden folder in your system.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Why not do the unpacking on a different folder too? that way it won't be too obvious that you're just unpacking the files when played. :)


Unpacking only when played + doing that into a hidden folder + deleting the old unpacked files after usage

I've added an option to delete all unpacked audio files when a new audio file is loaded.
What happens if I'm playing a BGM then loads a new file (SE for example), or play a 2nd SE while one is still not finished?
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Why not do the unpacking on a different folder too? that way it won't be too obvious that you're just unpacking the files when played. :)
No, I will not do anything like that. It is the same as what malware do when they install junk in hidden places.

What happens if I'm playing a BGM then loads a new file (SE for example), or play a 2nd SE while one is still not finished?
I've made it so that it doesn't crash when you try to do this.


Now another common problem people might run into is losing ALL OF YOUR MUSIC.


This is because all audio files get deleted if you choose to enable auto-deletion, which I discourage.


To address this issue, the files I generate have an arbitrary ".tmp" extension added, and only those will be deleted automatically.
 
Last edited by a moderator:

Mouser

Veteran
Veteran
Joined
Aug 19, 2012
Messages
1,245
Reaction score
264
First Language
English
Primarily Uses
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...
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
you could always put a little extra audio files here and there :)
 

Shaz

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

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

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top