RPG Maker VX Script: Customizing your Window Messages
In this article, we’ll explore how to modify the window messages in your game, like this one:
RPG Maker Script: Changing the Opacity
As usual, head to the Script Editor only this time you will head to the Windows section and select Window_Base.
In the script window on your right, look for line #27 “self.back_opacity”.
All you need to do to change the opacity of your window is to modify this number. You can set a value ranging from 0 (completely transparent) to 255 (no transparency).
Here are two different windows with different values (0 and 255).
RPG Maker VX Script: Changing the Default Text Color of your Title Screen
Changing the default text color of your title screen, although a bit more complicated, is still pretty simple.
Scroll down to line #87 and you will find this:
By changing the number between the brackets (in this case 6) you will change your game’s default text color.
Now you might be wondering what exactly the numbers are referring to. In order to explain this, we’ll need to look at the Window graphic file.
Press F10 to open the Resource Manager, select Graphic: System on the left hand side, select Window and finally click on Preview. Here’s a picture to show you how to proceed:
This will display the graphic Window file like so (I have enlarged the file so that we can have a better look):
The colors indicated by the red arrow are the various text colors available in your game. Now this is where it gets interesting.
Each color square has a number value. This is what the number in brackets referred to in the script. The first white square in the top left has a value of “0” while the blue square to its right has a value of “1” and the orange square next to it has a value of “2”.
I have created this little picture for visual support.
And now some screenshots to show the result of our experimentations:
More Text Color Changing Fun
At this point you might think that changing the color of the text of the title screen is not very useful.
Fear not however as there are plenty of ways to change the color of other game elements.
A. For instance, by changing the value of line #93:
You will change the color of text elements available in Database/Terms:
Allow me to demonstrate with an example:
B. By changing the value of line #117 and #123, you will change the gradient color of the HP gauge while changing the value of line #129 and #135 will change the gradient color of the MP gauge.
Once again, here are some gauges with different values to better illustrate how this works:
There are, of course, plenty more ways to customize your game through scripts and this is what we’ll cover in our next article.