> For the complete documentation index, see [llms.txt](https://enls.gitbook.io/rgss-reference-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enls.gitbook.io/rgss-reference-manual/game-library/rgss-built-in-functions.md).

# RGSS Built-in Functions

The following built-in functions are defined in RGSS.

### load\_data(filename)

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

```ruby
$data_actors = load_data("Data/Actors.rxdata")
```

This function is essentially the same as:

```ruby
File.open(filename, "rb") { |f|
  obj = Marshal.load(f)
}
```

However, it differs in that it can load files from within [encrypted archives](/rgss-reference-manual/rgss-specifications.md#encrypted-archives).

### save\_data(obj, filename)

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

```ruby
save_data($data_actors, "Data/Actors.rxdata")
```

This function is the same as:

```ruby
File.open(filename, "wb") { |f|
  Marshal.dump(obj, f)
}
```

It is unlikely you will ever use this function during a game, but it is defined as a counterpart to [load\_data](#load_data-filename).

Also, the built-in functions p and print are redefined for use in message box output.
