# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xeavin.gitbook.io/ff12-lua-loader/events/functions/register-load-handler.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
