yes... though that will also be true for even simply using the save function which will not work unless admin rights is used... IMHO, installing RM in PF is not really a good idea...
Simple Audio Encryption
RGSS3 Scripts (RMVX Ace)If you set it to a folder in My Documents or something like that, it wouldn't ask, even if the game WERE installed into Program Files. It's not a good idea to rely on the user knowing where to install it and where not to - Microsoft (and developers) have been drilling into people for such a long time that everything should go into Program Files.
(Sorry Hime, we're getting more into the theoretical here)
(Sorry Hime, we're getting more into the theoretical here)
And this is why installing programs in program files is such a horrible idea. Although most people who have been nagged by that before probably have their UAC turned off and system security knocked down to nothing just to stop all the 'nag' screens. Way to go Microsoft! :golf clap:
I don't think so though... A simple test would tell for sure, but a game has to be able to play files in it's own "space" anyway, and I KNOW that a lot of commercial software uses techniques like these to protect their assets. Let's say I decided to license some Lynryd Skynyrd or "Wayward Son" from Harry Fox for my game (that'd take the greenlight voters attention off the RTP). I'd have to protect the audio somehow. Every major game title has these issues.
Those are valid concerns since the way the script currently works, it requires write-access to the disk.
It also means if someone, for example, tried to play the game off a CD (because they used a script to change where the save files are stored), it will also fail.
If there was some library that I could use to just decode and stream an audio file from memory, that would solve this problem, and would also make it more secure because now there's no way to just copy-paste a file on your disk; you'd have to either hack the archive or scour the process memory.
So far I have not found one.
I guess I could change the name of the folder, and maybe obfuscate the filenames, but I don't know if those really make a difference.
Can't we access the Temp folder?
Like using Dir.mktmpdir and access the files from there?
Like using Dir.mktmpdir and access the files from there?
Here's a simple launcher application written in Java.
I spent 30 seconds to write it as a simple proof of concept. The time is not for bragging, but to show that it is really simple.
It does not delete anything. It simply renames your Audio folder to a different filename (we can just as easily delete it)
Tool: https://www.dropbox.com/sh/sz6mpw5n2d6zxi2/wPVbh0jSOn/Library/RMLauncher.zip
Usage: unpack the launcher in the same folder as game.exe and then run the launcher.
Source:
When you close your project, the launcher will go ahead and clean up things for you.
Now, obviously, anyone can simply bypass the launcher and go straight to game.exe. Even if you hide `game.exe`, I show all hidden files anyways so it's easy to access it.
For some people, it might be weird to have a jar file. You could easily write this in C or something and simply fork a process that will execute game.exe and then have the parent wait until the child returns. This is probably something someone would learn if they were in a introductory lesson to forking.
I spent 30 seconds to write it as a simple proof of concept. The time is not for bragging, but to show that it is really simple.
It does not delete anything. It simply renames your Audio folder to a different filename (we can just as easily delete it)
Tool: https://www.dropbox.com/sh/sz6mpw5n2d6zxi2/wPVbh0jSOn/Library/RMLauncher.zip
Usage: unpack the launcher in the same folder as game.exe and then run the launcher.
Source:
import java.io.File;public class RMLauncher { public static void renameDir(String src, String dest) { new File(src).renameTo(new File(dest)); } public static void main(String[] args) { try { Runtime.getRuntime().exec("Game.exe").waitFor(); renameDir("Audio", "AudioDELETED"); } catch (Exception e) { } }}
Now, obviously, anyone can simply bypass the launcher and go straight to game.exe. Even if you hide `game.exe`, I show all hidden files anyways so it's easy to access it.
For some people, it might be weird to have a jar file. You could easily write this in C or something and simply fork a process that will execute game.exe and then have the parent wait until the child returns. This is probably something someone would learn if they were in a introductory lesson to forking.
That method does not seem to be available in RM.
Yeah, I tested that just now. We still can use the environment variables though. ENV['TEMP'] will return the full path to the Temp folder. Might want to use that.
RGSS3's ENV only returns a few values though... it doesn't seem to know things like ENV['CD']
That is because by default, there is no Environment Variable for 'CD'. If you defined it yourself (in WIndows' System Properties), it should be there. Check with msgbox_p ENV.
Also, if you add the environment variable manually, a computer restart might be needed.
I found it on some thread on the internet about ENV variables so I thought it should work right away...
PS: checked the environment variables on the system properties. somehow things like 'ProgramFiles' seem to work even if the list doesn't show them
PS: checked the environment variables on the system properties. somehow things like 'ProgramFiles' seem to work even if the list doesn't show them
The environment variables that deals with directory paths (that I've seen since the windows 98 era) is only "windir", "path", and "tmp/temp", actually. Usually, installing an environment (like Ruby) appends the path to the executable to the "path" environment variable.
maybe the languages that the list I saw was for actually makes the variables or something...
PS: I tried using ProgramFiles for my Game Custom Data script's ENV call and it actually worked...
PS: I tried using ProgramFiles for my Game Custom Data script's ENV call and it actually worked...
ProgramFiles, CommonProgramFiles, and AppData are not editable ENV, it is not appearing in the System Properties, but it is added after it.
The problem is that the default RPG::Audio play function only searches the Audio folder and RTP.
The problem is that the default RPG::Audio play function only searches the Audio folder and RTP.
That not really a problem, since all you have to do is specify the absolute path to where the file is located.
I can put it in the temp folder, but since there is no proper clean-up when the program exits, you end up with leftover junk.
I can put it in the temp folder, but since there is no proper clean-up when the program exits, you end up with leftover junk.
"you may notice some delay depending on your hardware"
What do you mean by this? Delay in Archiving or Delay in music while playing?
What do you mean by this? Delay in Archiving or Delay in music while playing?
Slight delay the first time you play the music.
I don't know if I am the only one having this issue but, when my first battle comes up, it says it cant find the audio file. But the audio file just played before in a previous scene with no problem.
Now, I am using another script from you (Troop Battle BGM) and I am not sure if it is not compatible or something with this script.
Note: When I play it in my own computer it works fine, it asks for the file if I play the game in another computer.
Please help, I've been having headaches trying to figure this out. Thanks in advance.
Now, I am using another script from you (Troop Battle BGM) and I am not sure if it is not compatible or something with this script.
Note: When I play it in my own computer it works fine, it asks for the file if I play the game in another computer.
Please help, I've been having headaches trying to figure this out. Thanks in advance.
Original thread: https://forums.rpgmakerweb.com/threads/simple-audio-encryption.25235/