Well, first you may want to learn more about scripting. You will need to get the basics down before you can learn some more advanced stuff.
You also will need to decide on what method you want to use. There are plenty of ways of screwing up the binary data so that it won't open as an image, which can be de-scrambled when you want to read it. I created a method before that used a string password converted to a char array and uses that as salt to shift the bits on each byte in the file. It used the remainder left over from the shift, and applied it to the next byte, which would make it so that each shift affected the one after it. You weren't cracking it without the same string passed to the reversal process. This method was very inefficient and is not a very good idea, since it is exceedingly slow to iterate every byte in file and convert it every time you want to read it. DO NOT DO IT THIS WAY.
If you are only concerned with stopping novices, the easiest and least performance effecting way would be to remove the headers from all your files like I mentioned above. Modify RPG::Cache.load to add the headers back to the files before attempting to read them. If this is too complicated, then like I said, get some of the basics learned well first. Its a waste of both our times trying to learn something you won't understand. Its kinda like trying to learn long division before you know simple subtraction. You have to understand the first one to be able to know the second.