I have a very unusual question, but I am currently working on creating a game using rpg maker that essentially breaks all the rules, and in order to break one of these rules, I need to be able to read the RGB values of pixels in an image. I found an external library to do just that, but it is composed of 8-10 different scripts. I would really appreciate it if there is some way I can avoid having to import each of those scripts one at a time into the editor, so is there a way I can access these scripts from outside the editor, with the use of require or something?
Can RPG Maker use external scripts?
● ARCHIVED · READ-ONLY
-
-
You can read the RGB values of a given pixel using the default RM scripts. Just use Bitmap.get_pixel(x,y), and you'll get a Color object. You can then use the r, g, b, and a methods on the color to get the red, green, blue, and alpha values of the given pixel. No external library/scripts needed.
-
Thank you, I was not aware of this feature, guess I need to go look through the script reference again. However, is is still possible to read external scripts in case I really do need help from one?
-
It depends what you mean by external scripts; what format are these external scripts in? Are they written in ruby?
-
Yes, I am referring to .rb files that sit somewhere in the game directory, and can be called in the editor. Is this possible?
I figured it would be with the use of the require keyword, but I just need to make sure all the details if it possible. -
Actually, it is possible, but for it to be available in an encrypted game, you need to do some workarounds. Take a look at the Plugin Framework in my signature for some ideas on how you can do this. I'm sorry to say it's not very well documented at this time, but there are examples and documented code to work with. Shoot me questions if you've got any.
-
Thanks, I'll check that out. This thread can be closed now.
-
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.