[XP] DREAM for Music Files

Started by Blizzard, January 08, 2008, 12:14:12 pm

Previous topic - Next topic

Blizzard

January 08, 2008, 12:14:12 pm Last Edit: March 23, 2019, 11:46:37 am by Blizzard
DREAM for Music Files
Authors: Blizzard
Version: 4.5
Type: Encrpytor / Decryptor / Audio File Player
Key Term: Game Utility



Introduction

This script will allow you to encrypt audio files into the .dea format which can be read from within the Data folder and from within the .rgssad archive.

This work is licensed under BSD License 2.0:
Quote
Copyright (c) Boris "Blizzard" Mikić
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1.  Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.

2.  Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

3.  Neither the name of the copyright holder nor the names of its contributors
    may be used to endorse or promote products derived from this software
    without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.


You may use this script for both non-commercial and commercial products without limitations as long as you fulfill the conditions presented by the above license. The "complete" way to give credit is to include the license somewhere in your product (e.g. in the credits screen), but a "simple" way is also acceptable. The "simple" way to give credit is as follows:
Quote
DREAM for Music Files licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikić


Alternatively, if your font doesn't support diacritic characters, you may use this variant:
Quote
DREAM for Music Files licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikic


In general other similar variants are allowed as long as it is clear who the creator is (e.g. "DREAM for Music Files created by Blizzard" is acceptable). But if possible, prefer to use one of the two variants listed above.

If you fail to give credit and/or claim that this work was created by you, this may result in legal action and/or payment of damages even though this work is free of charge to use normally.



Features


  • encrypts your Audio files in a way, so you can encrypt them together with Data Files and decrease the chance of music theft
  • decrypts and plays the .dea files

v1.0b

  • rewritten conditions using classic syntax to avoid RGSS conditioning bug
  • now beta

v1.01b

  • compatible with StromTronics CMS v5.0b and higher

v1.02b

  • improved coding

v1.03b

  • fixed a bug caused by a typing mistake

v4.5

  • now uses DREAM v4.4
  • added new license
  • added usage and crediting instructions




Screenshots

N/A for this sort of script


Demo

N/A


Script

Just make a new script above main and paste this code into it.
Script Download


Instructions

Inside the script in the first comment.
Download this file:

DREAM files

and extract it into the Data folder of your game.
The Download file includes:
DREAM.dll
DREAM_ext.rb
DREAM Readme.txt


Compatibility

98% compatible with SDK 1.x. 90% compatible with SDK 2.x. 99% compatible with everything else. WILL corrupt your old savegames. Can cause incompatibility issues with custom CMSes that change music playing methods in Game_System. NEEDS DREAM of the provided version or higher. Files will be saved into "DREAM Encrypted Audio" format with .dea extension.


Credits and Thanks


  • Boris "Blizzard" Mikić



Author's Notes

This script will encrypt audio files and save it into .dea format. A file in .dea format can't be played by any normal media player anymore, so be don't delete your old files in case you want to edit them or anything similar. If you use this script without having encrypted all your music into .dea files, your game will eventually crash when trying to play them.

That's it! N-Joy! =D
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Memor-X

hay Blizzard, just wondering if you ended up fixing this problem i found with this script that i posted on the old forum

Quotethe files encrupted, that's good, the intro played at the main menu, also good, but when i go to chnage my selection, i get an error message

in Game_Temp at line 0, Errno::EACCES, Permission denied - tmp.wav

any idea what the hell is going on


and as i said on the old forum the only thing that comes close to tmp.wave is Temp Var Rusola-One Winged Chaos Angel-(Fire and Ice, Lighting Cross Fusion).wav

Blizzard

Are you using Vista? There is a problem with file permissions as you can see. Have you tried to "run RMXP as Administrator"? Right click on RPGXP.exe and you should have an option that says "Run as...".
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Gabbergon

a question:
if I encode some music and eventually publish as a .dea file
someone else who knows how can simply decode it, right?
so, can't you let people encode the file with a key(that can be edited by the script user)
than the encoded file can't be riped by anyone else cause they don't know
how the encryption is done... :???:
I could be wrong...

Blizzard

The thing is that the .dea files are encrypted into the .rgssad file. .dea is more like a wrapper so it can actually be put into the .rgssad since it won't work properly if you use .mp3. It's true that .dea can be decoded easily, but people won't even have access to the .dea files.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.