RPG Maker VX Ace

RPG Maker VX Ace

Not enough ratings
A beginer's guide to editing a RPG Maker VX Ace project
By ギョー
This is a basic guide to editing your game project.
It explains how to Disable Menu Choices, make Save Points, remove the Gold Window, Change script for Battle End
as well as a brief outline on fault finding.
   
Award
Favorite
Favorited
Unfavorite
Introduction
The RPGMaker VX Ace Database is very powerful
The RPG Maker VX Ace Database is very effective. It is sometimes annoying having to search for the command buttons (which tab is it under?), but through the database you can easily modify many game features and the look and feel of your poject.

This guide is to help you modify your game beyond the options in the database. It will introduce some simple modifications you can make by editing the RGSS (Ruby Game Scripting System), and hopefuly give you some confidence to look for other ways to modify your project for a unique RPG Maker game.


Disabling Save from Menu
No save button in game_menu
In this section we quickly show how to remove access to the Save option from the Menu Script, and make an event (object) to allow saving the game from.

Maybe you will like this to tidy up your Menu system, and allow save points in towns or other base locations.



Remove Save from Menu Script

In the Script Editor (press [F11]),
Scroll to the Window section, then Window_MenuCommand page.

Here you can comment out the Save Function by adding a Hash(#) to the start on the following line:
40 add_save_command

When a line is commented out, the text should turn green in the editor.

comment out add_save_command from the script to disable Save option


Create an event object to save games from

Now we can use the Open Save Screen command to allow exclusive access to save the game.

add access to the save menu from an eventOpen Save Screen command is on page 3
Add the command
  • Open Save Screen from page 3 of the commands popup.

This will open up the save slot screen for the player to save their process to.

Note: by default the only place to load a saved game is from the title menu.


Managing Saves (Disabling Saving and Limiting Save Files)
Save option visible but unselectable in menu
Rather than removing the Save Option from the Menu script, you may want to keep the option available in the menu (but unselectable).

This section will explain how you can manage save points using the Change Save Access flag.



Make a Common Event to Disable Saving

a common event that disables savingChange Save Access is on the third page of event commands
First, open the Database [F9] and go to the third last tab - Common Events.

Select one of the common events, give it an appropriate name and set the trigger"Autorun".
In the contents section add
  • Change Save Access command, setting it to Disable.

Note: Change save access can is one page 3 of Event Commands.

When you play the game, now the <Save> Menu item will be unselectable.



Make a Save Event
To allow saving, you will make a save Event that sets Change Save Access to enable, then open the save menu before disabling save access.
an example of an item that allows saving
Create an event in the location of your Save Item.
In the Contents
add the three commands
  • Change Save Access set to Enable,
  • Open Save Screen, and
  • Change Save Access set to Disable.

We could get more creative and set events to make saving possible by the menu when next to a Save Point, or allow saving when indoors, or during the day by using events to cycle the Chane Save Access flag.



Limiting Save Files

It also only requires changing one line in the Script to limit the number of Save Files.

By default the max limit for Save Files is 16, set by self.savefile_max.

To change the max limit,
  • Open Script Editor [F11]
  • Go to the Modules - DataManager page.
  • change the number on line 125 to your desired max save file number.
where to change the max number of saves in DataManager script
Removing a Window from Menu
 no window saying 0 G in bottom left corner
If your game has no gold, you probably want to remove the window from the ingame Menu showing the ammount of gold.

This can be done quickly by:
  • Opening Script Editor
  • Going to Scenes - Scene_Menu
  • Commenting out line 14 - "create gold_window" (using "#" hash at the start of the line).
  • (To be doubly sure the window is gone you can comment out lines 34-38 defining the gold_window method)
comment out lines 14 and 34-38 in Scene_Menu to disable gold_window
Changing how the script ends Battles
In this section we will explore changing scripted events for loosing a battle.

Adding a step to unequip all items when character is revived

adding actor.clear_equipments in the revive members section will remove their equipmentmethods for actors are in the Game_Actor script page here
To add a step to the Revive Battle Members on Defeat process, you will need to open the Script Editor [f11]
  • go to the BattleManager script,
  • navigate down to the Revive Battle Members on Defeat section (around line 257)
  • locate a method for the desired action, (I found removal all equipment method on the Game_Actor page, around line 251) also check that it doesn't branch off and stop the rest of the script you desire.
  • add the command into the script. i.e. At line 261 of BattleManager we add the command:
    actor.clear_equipments
  • play test to ensure the script change has desired effect



Changing Defeat processing

by changing this goto(gameover) statement you can alter whay happens on defeat
In the BattleManager script, there is a section handling Defeat (it starts at line 240).

You could edit the script here to change the <Game Over> on defeat, to something more appropriate for your game. Maybe the system will revert to the load game screen, or the characters continue the adventure in the afterlife.


Errors caused by changing the script
In this section the Exception error messages RPG Maker VX Ace generate are explained.

Script Error
As you change the script, errors can creep in.
Maybe a typo causing a method or class that does not exist to be called. Or not deleting a call for a method you have disabled.

When an instance of an error occurs the game will crash and give you a popup like the one to the left. This is an exception error



What information is in the Exception Error

An exception error with colour coding
The exception error gives a few bits of useful information for fixing the error.
  • The Script Name where the exception was found (circled in Red)
  • The Line number where the exception occured (circled in Blue)
  • The exception class - what explains what type of exception it is (highlighed Yellow)
  • More information about the exception (circled in Green)

With this informaiton you should be able to review your script and locate the code that is causing an error.



An example of fault finding:

Error at bottom of Screen_Title?I did have a not very complex error, where I accidentally removed a line in a class on the Screen_Title script.

The first Exception Error suggests the error is at line 137 (the last line of the script) with an extra end.

So I commented out that line, and started the game again.

the error moved in the Screen_Title script...
This move of error, highlighed that a command was called without being in a method.

To fix it I had to add a line:
def methodname

When I ran the game again, a missing end error occured. So I followed the bouncing ball, replaced end from the first error, ran the game again. Then had to rename the method to something more appropriate ("start") for the script and game to work again...



RPGMaker Help file showing locations of Exception Error Information
Info in the help file

There are 24 exception classes/types, and a bit of information on the exception message layout listed in the help file (Located in the RGSS Reference Manual, under Standard Library / Built-in Classes / Object / Exception).
But this information is very scant and propably will require a deep dive with your search engine of choice to find more information to fix more complex bugs.



Test, test, test...
This section only explained Exception Errors there are also errors that you will only find by Play testing your game.

Errors like awarding XP instead of Gold when winning a battle, or forgetting to set the flag to open the last level.

When making your project, you should be thinking about ways to test that the game is working. Then get other people to test it, so they can use a new approach to try help makesure your game is robust, fun and doesn't cause people to rage quit 2 minutes after pressing start.


Conclusion
Hopefuly this guide explained some small ways you can edit your script and modify your game.

There are many scripts available in the RPGMaker VX Ace Steam Workshop to add more features to your project, or hack at to figure out ways to make your own scripts.
2 Comments
the4thiceclimber 21 May, 2023 @ 3:35pm 
This is good shit thank you so much
gundambison 29 Dec, 2022 @ 8:27am 
Prefer not using common event autorun without added condition to off in last script. Learning back from 2K3.. I suggest using paralel process.. And put 1 switch as the save disable/enable save. You can change the switch.. And the save menu enable/disable from this.