> For the complete documentation index, see [llms.txt](https://luffyyy.gitbook.io/beardlib/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://luffyyy.gitbook.io/beardlib/modules/narrativemodule.md).

# Narrative

## Module Definition

The module is inherited from [ModuleBase](https://luffyyy.gitbook.io/beardlib/modules/modulebase). So base parameters can be found there.

### Module name

The name of the module you use as the meta of the module definition is 'narrative' or 'NarrativeModule' if `_force_search` is set to true in the module definition.

### XML Structure

```markup
<narrative id name_id brief_id contact jc briefing_event debrief_event>
    <chain>
        <table level_id type_id type ...>
            ...
        </table>
    </chain>
    <crimenet_callouts>
        <value_node value/>
    </crimenet_callouts>
    <crimenet_videos>
        <value_node value/>
    </crimenet_videos>
    <payout>
        <value_node value/>
    </payout>
    <contract_cost>
        <value_node value/>
    </contract_cost>
    <experience_mul>
        <value_node value/>
    </experience_mul>
    <min_mission_xp>
        <value_node value/>
    </min_mission_xp>
    <max_mission_xp>
        <value_node value/>
    </max_mission_xp>
    <merge_data ...>
        ...
    </merge_data>
</narrative>
```

#### `<narrative id name_id brief_id contact jc briefing_event debrief_event>`

* `id` The narrative tweak key, which must be unique. \[REQUIRED]
* `name_id` The localization id of the name of the narrative. Defaults to heist\_ID\_name
* `brief_id` The localization id of the briefing of the narrative. Defaults to heist\_ID\_brief

#### `<merge_data ...> ...`

* `...` Any additional data you wish to be included in the narrative tweak definition table.

### Example

See [MapFramework](https://luffyyy.gitbook.io/beardlib/api/frameworks#mapframework)

## Functions

### NarrativeModule:RegisterHooks()

This is used to register the hooks that are used for inserting the tweak definitions. Usually this will be called by the MapFramework if this is running under that, otherwise you need to call it yourself.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://luffyyy.gitbook.io/beardlib/modules/narrativemodule.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.
