Sure, let's start with the Status screen, which you get by going into the in-game Menu (esc), scrolling to Status, then pressing enter on our handsome player named uhhh Sappho..n. Sapphon sounds good.
Here's the entire Window_Status code for reference.
this is our ugly status screen :I
How does that incomprehensible script generate that?! Honestly, I don't know, but we can find out. I also don't know Ruby (the language used to write the script) but I'm pretty good at guessing.
The first lines go like this (remember that the pastebin link has pretty colors, which is easier to read)
#==============================================================================
# ** Window_Status
#------------------------------------------------------------------------------
# This window displays full status specs on the status screen.
#==============================================================================
Cool, we're in the right place.
class Window_Status < Window_Selectable
Dunno what this is, but I can guess that WindowStatus is a specialized type of Window_Selectable. Not important.
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
Cool, let's skip this part and go to the next comments. We don't need to know how to initialize the window.
#--------------------------------------------------------------------------
# * Set Actor
#--------------------------------------------------------------------------
I don't know what exactly the code after this does, but I can guess (from the comments) that we're setting the actor. No probs, skip to next block.
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
This part probably is not important. I guess that it's when the screen has to be redrawn from scratch for some reason... However, since it says draw_block four times and draw_line three times, and if you count the elements in the screenshot at the top, I can guess that it fills in text in 4 areas and draws 3 lines.
#--------------------------------------------------------------------------
# * Draw Block 1
#--------------------------------------------------------------------------
Looks like I guessed right--it says Draw Block 1 in the comments, and the functions (draw_actor_name, draw_actor_class, draw_actor_nickname) look exactly like what's in the screenshot here.
In fact, if you look in the Database/Actors, the text there is exactly the same as the text here. Name: Sapphon. Nickname: Silver Reaper. Class: Soldier.
Let's look at the code.
def draw_block1(y)
draw_actor_name(@actor, 4, y)
draw_actor_class(@actor, 128, y)
draw_actor_nickname(@actor, 288, y)
end
So it does three things. You probably know that a screen has x coordinates and y coordinates, and typically functions that draw things on the screen have an x parameter followed by a y parameter. The programmers who made this probably didn't use "y" to represent the x-coordinate, so let's guess that 4, 128, and 288 are the "x" coordinates of the text. To test, I can try changing the numbers. I swap around the coordinates for class and nickname, then run the game:
Magical
Continue with block 2:
#--------------------------------------------------------------------------
# * Draw Block 2
#--------------------------------------------------------------------------
def draw_block2(y)
draw_actor_face(@actor, 8, y)
draw_basic_info(136, y)
draw_exp_info(304, y)
end
Cross-comparing with the screenshot's second area from the top, draw_actor_face probably draws the actor portrait starting at (8,y). Basic Info is probably the LV and HP and MP, and exp_info is probably Current Exp and To Next Level.
And so on for blocks 3 and 4. But there's more lines under that.
#--------------------------------------------------------------------------
# * Draw Basic Information
#--------------------------------------------------------------------------
def draw_basic_info(x, y)
draw_actor_level(@actor, x, y + line_height * 0)
draw_actor_icons(@actor, x, y + line_height * 1)
draw_actor_hp(@actor, x, y + line_height * 2)
draw_actor_mp(@actor, x, y + line_height * 3)
end
That seems familiar--"draw_basic_info"... hmm...
So basically, this is a part of the code that specializes in drawing the "basic info". If I want to not draw MP, because magic is silly in my particular world, I can "comment out" line 89, or the one with "draw_actor_mp". To do that, I type a thorpe (#) at the beginning of the line. The line turns green! It also means that whatever is on that line is
not counted as code, but just extra text that the game ignores.
sorcery!
I have to admit, this is a pretty nice experience for me, too. I remember using RPG Maker long long ago and back then this was all arcane magicks to me...
There is a slight problem though. You want to hide parameters, but the line has strange code in it:
#--------------------------------------------------------------------------
# * Draw Parameters
#--------------------------------------------------------------------------
def draw_parameters(x, y)
6.times {|i| draw_actor_param(@actor, x, y + line_height * i, i + 2) }
end
?!
Long things short, it basically does everything in the {}s 6 times. draw_actor_param is called 6 times, except that i changes from 0 to 5 each time it is called. So it's the same thing as
draw_actor_param(@actor, x, y + line_height * 0, 0 + 2)
draw_actor_param(@actor, x, y + line_height * 1, 1 + 2)
draw_actor_param(@actor, x, y + line_height * 2, 2 + 2)
draw_actor_param(@actor, x, y + line_height * 3, 3 + 2)
draw_actor_param(@actor, x, y + line_height * 4, 4 + 2)
draw_actor_param(@actor, x, y + line_height * 5, 5 + 2)
except with less typing. Look at the Status screen again: from top to bottom, ATK, DEF, MAT, MDF, AGI, LUK. That's six stats. So I can make a hypothesis that if I comment out the third line, MAT will disappear.
\o/
Feel free to ask if you have more questions. I'm admittedly not a good explanationator (I don't have much experience in teaching stuff y'know x3) but I'm ready to try.
edit: My code looks like this right now:
#--------------------------------------------------------------------------
# * Draw Parameters
#--------------------------------------------------------------------------
def draw_parameters(x, y)
draw_actor_param(@actor, x, y + line_height * 0, 0 + 2)
draw_actor_param(@actor, x, y + line_height * 1, 1 + 2)
#draw_actor_param(@actor, x, y + line_height * 2, 2 + 2)
draw_actor_param(@actor, x, y + line_height * 3, 3 + 2)
draw_actor_param(@actor, x, y + line_height * 4, 4 + 2)
draw_actor_param(@actor, x, y + line_height * 5, 5 + 2)
end
This is from lines 91 to 101. Right after this is "draw experience information".