Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: Heretic86 on July 24, 2016, 07:51:04 pm

Title: How do I get the Transparent Color for Characters in Scripts?
Post by: Heretic86 on July 24, 2016, 07:51:04 pm
Under the Tools -> Options Menu, there is an option for Transparent Color.  I need to be able to read the Custom Data from inside a script.  How and Where is that information located?

Also, under Materialbase -> Graphics/Characters -> Import, you are given two for "Transparent Color (L-Click)" and "Semi-Transparent Color (R-Click)".  How and where do I get that information?
Title: Re: How do I get the Transparent Color for Characters in Scripts?
Post by: KK20 on July 24, 2016, 09:07:52 pm
It's not related to any scripting. It's all editor stuff.

When you choose the transparent colors for graphics, it makes the changes to the graphic file itself--go look in your Graphics folder and see that your transparent color is removed.
For the Options transparency, it's probably some registry key.

EDIT: HKEY_CURRENT_USER\Software\Enterbrain\RPGXP

You will see ImportColor 1 and 2 as well. I'm not sure if you need these values specifically since it really is just to keep track of what colors the user last used.
Title: Re: How do I get the Transparent Color for Characters in Scripts?
Post by: Heretic86 on July 25, 2016, 07:09:25 pm
Youre right.  I dont think I need it.  I do suspect that the images are altered when they are loaded by RPG maker as using get_pixel reveals the alpha value of the pixel is 0 for transparent backgrounds, regardless of color.
Title: Re: How do I get the Transparent Color for Characters in Scripts?
Post by: KK20 on July 25, 2016, 07:42:48 pm
Well, yeah, that's kinda the definition of a transparent color :P
But yeah, all that transparent processing is done by the editor, not the engine.