# Valve Data File

### 🗂 **Top-Level Structure**

```vdf
"mod"
{
    // Metadata
    "name" "..."
    "id" "..."
    "description" "..."
    "version" "..."
    "author" "..."

    // Subsections:
    "LocalizationFiles" { ... }
    "PakLoadOnPlaylists" { ... }
    "ConVars" { ... }
}
```

### 🔖 **Key Sections**

**1. Metadata**

* `"name"` – Display name of your mod
* `"id"` – Unique identifier&#x20;
* `"description"` – Mod description
* `"version"` – Mod version string
* `"author"` – Mod author's name

**2. LocalizationFiles**

```vdf
"LocalizationFiles"
{
    "resource/sdk_%language%.txt" "1"
}
```

✅ Loads **language resource files** to support different in-game languages.

* `%language%` is replaced by the player’s language setting (e.g. `sdk_english.txt`).
* All language files R5Reloaded supports should be present.

**3. PakLoadOnPlaylists**

```vdf
"PakLoadOnPlaylists"
{
    "survival_dev" 1
    "winter_express" 1
    ...
}
```

✅ Defines **.rpak files to  auto-load** when specific playlists are active.

* **Key:** Name of the gamemode.
* **Value:**
  * `1` means **enable loading** on that playlist.

Example usage:

* If a player starts **playlist** `survival_dev,` the mod loads all the rpaks that is in mod's pak folder automatically.

**4. Convars**

The `ConVars` section declares **custom console variables** for your mod. Each convar:

* Defines **variable name**
* Includes a `helpText` description
* Sets **flags** (usually `ARCHIVE` to save across sessions, and `RELEASE`)
* Lists allowed **Values**, including:
  * `default` – The default setting
  * `min` – Minimum allowed value
  * `max` – Maximum allowed value

**Example:**

```vdf
"enable_healthbar"
{
    "helpText" "Displays healthbars"
    "flags" "ARCHIVE|RELEASE"

    "Values"
    {
        "default" "1"
        "min" "0"
        "max" "1"
    }
}
```

This defines a toggle for displaying healthbars, with `0` as off and `1` as on.

***

### 🔧 **How the VDF System Works in Practice**

1. **Placement**:\
   The `.vdf` file is placed in your mod’s folder within the R5Reloaded mods directory.
2. **Startup Loading**:\
   When R5Reloaded boots:
   * It scans all active mods’ `.vdf` files.
   * If mod is enabled, registers declared convars.
   * Loads required localization files.
   * Sets up pak loading logic based on the current playlist.
3. **Runtime Usage**:
   * ConVars can be read or modified in the developer console or scripts.
   * Pak files are mounted dynamically when their playlists activate.
   * Currently there is no way to choose which rpaks are loaded for which gamemodes. As game will just load every rpak inside Win64 folder.

{% hint style="info" %}
More details on pak loading explained in the next page.
{% endhint %}
