> For the complete documentation index, see [llms.txt](https://docs.r5reloaded.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.r5reloaded.com/pak-loading.md).

# Pak Loading

Check here to learn how REPak works and how to build a rpak.

### Pak Types and Load Paths

**RPAK** loading behavior depends on the server type:

* Client / Listen Server
  * Loads `.rpak` files from the `paks/Win64` folder.
  * These files must include **all dependencies** required for loading.
  * If any `.starpak` files are associated, they **must** also be included.
* Dedicated Server
  * Loads `.rpak` files from the `paks/Win64_Server` folder.
  * Server only `.rpak` files should exclude unnecessary assets such as textures, materials, and UI assets.
    * Avoid using client rpaks on dedicated servers. Doing so will increase memory usage and slow down load times.
  * `.starpak` files are **not required** for dedicated server.

### Loading RPAK Files

The SDK supports two methods for loading `.rpak` files:

* Preloaded Rpaks
  * These `.rpak` files are loaded during the first map load and **remain loaded for the entire session**.
  * To designate `.rpak` files as preloaded, a `preload.rson` file is required in the same directory.

#### Preload.rson Format:

```yaml
Paks:
[
    common_sdk.rpak,
    example2.rpak,
    ui_sdk.rpak
]
```

* Playlist Controlled Rpaks
  * These `.rpak` files are dynamically loaded/unloaded based on the selected playlist and level changes.
  * To use this system, specify the `.rpak` and related playlist names in the `mod.vdf` file.

{% hint style="warning" %}
The structure and usage of mod.vdf are described on the previous page.
{% endhint %}


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.r5reloaded.com/pak-loading.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
