RGSS Built-in Functions

The following built-in functions are defined in RGSS.

rgss_main { ... } (RGSS3)

Evaluates the provided block one time only.

Detects a reset within a block with a press of the F12 key and returns to the beginning if reset.

rgss_main { SceneManager.run }
rgss_stop (RGSS3)

Stops script execution and only repeats screen refreshing. Defined for use in script introduction.

Equivalent to the following.

loop { Graphics.update }
load_data(filename)

Loads the data file indicated by filename and restores the object.

$data_actors = load_data("Data/Actors.rvdata2")
This function is essentially the same as:
File.open(filename, "rb") { |f|
  obj = Marshal.load(f)
}

However, it differs in that it can load files from within encrypted archives.

save_data(obj, filename)

Saves the object obj to the data file indicated by filename.

save_data($data_actors, "Data/Actors.rvdata2")
This function is the same as:
File.open(filename, "wb") { |f|
  Marshal.dump(obj, f)
}
msgbox(arg[, ...]) (RGSS3)

Outputs the arguments to the message box. If a non-string object has been supplied as an argument, it will be converted into a string with to_s and output.

Returns nil.

msgbox_p(obj, [obj2, ...]) (RGSS3)

Outputs obj to the message box in a human-readable format. Identical to the following code (see Object#inspect):

msgbox obj.inspect, "\n", obj2.inspect, "\n", ...

Returns nil.