> For the complete documentation index, see [llms.txt](https://xeavin.gitbook.io/ff12-lua-loader/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xeavin.gitbook.io/ff12-lua-loader/events/functions/register-load-handler.md).

# Register Load Handler

### Signature

```csharp
bool registerLoadHandler(string id, function callback)
```

### Description

Registers a load handler for a specific identifier that loads additional information for a save game.

Each identifier is loaded from a separate JSON file (`{id}.json}`) which is located in a directory named after the save game (e.g. `FFXII_000.dir`).

Returns whether the operation was successful (`true`) or not (`false`).

### Arguments

#### Identifier

The unique identifier of the save data.

#### Callback

The [Callback](/ff12-lua-loader/events/functions/register-load-handler/callback.md) function that is executed when save data is loaded.

### Notes

{% hint style="warning" %}
A load handler is triggered even if no data exists for the identifier, or if the data could not be deserialized due to an error.
{% endhint %}

{% hint style="info" %}
Multiple scripts can register a handler for the same identifier.
{% endhint %}

{% hint style="info" %}
Identifiers are not validated during registration since it is unknown if they exist in a given save game.
{% endhint %}
