
- #Rpg maker vx ace variables how to#
- #Rpg maker vx ace variables code#
- #Rpg maker vx ace variables windows#
#Rpg maker vx ace variables code#
We should assume there’s code in another class that’s creating a new instance of Window_Gold. You might be tempted to think that we could just delete Window_Gold and be done, but code doesn’t exist in a vacuum. That’s OK, because we’ve narrowed down our search. Note that if the classes, properties, and methods are named well, we don’t actually have to read through each one line-by-line to guess what it does.)Īfter skimming the code, it looks like Window_Gold doesn’t actually help us–it defines what the gold window looks like when it’s shown, not whether it’s shown. Indentation and comments–lines that start with a #, which indicate to Ruby they shouldn’t be executed–are used to make it more readable. Each of these blocks is closed by an end statement. (How do we know that? Well, the code for a class is contained in the class block, and each def block represents a property or method within that class. It has properties like window_width that define how the gold window is shown, and value and currency_unit that define what the gold window shows. Upon further inspection, this class has methods like initialize, refresh, and open. The Window_Gold class might catch our eye–it sounds exactly like what we’re looking for: Since we have a vague idea of what the class that shows the gold window might be named, we can identify possible classes and skim them to see if they actually affect whether or not it’s shown on the menu screen. Within these groupings, we know we’re probably looking for a class with Gold, Menu or Status in the name (since we’re looking for the gold window on the status menu screen).
#Rpg maker vx ace variables windows#
We know we’re looking for a window, so odds are the code is in a class that starts with Window_ or Scene_ (since scenes often show and hide windows on the screen). It’s intimidating–unless you have both copious programming and RPG Maker experience, it takes some effort to scan through it and figure out what it does.įortunately, we have a few guidelines to help us. Step 1: Where’s the code that affects this?Īs discussed in the last post, there’s a lot of Ruby code in a default RPG Maker project. Our first step is to dive into the Script Editor: The player won’t be distracted by trying to figure out which features are used and which aren’t, and won’t feel like we hacked this together. We could leave this window in, but it’s going to contribute to a tighter experience for the player if we remove unnecessary bits. In this sort of game, we might not have the concept of “gold.” However, because RPG Maker provides a complete JRPG engine, it’s there on our status screen anyway:

Let’s say we’re building a narrative-only game (like To The Moon), or a game where we want to tightly control the player’s progression by giving items or skills at key narrative points (sort of like Legend of Zelda).

(Admittedly, this is exactly how I did the LD37 project.) It’s sort of like taking a list of common phrases when traveling to a foreign country.

#Rpg maker vx ace variables how to#
Note that I’m not formally teaching you how to write Ruby here–I’m just teaching you enough to be able to guess what a particular line of code might do. If you want to create a new project, you should be able to follow along. So, let’s walk through how we’d think through a very simple change.
