Valve Data File

The .vdf file is a Valve Data Format configuration that defines your mod’s metadata, loaded resources, convars, and load conditions for R5Reloaded.

πŸ—‚ Top-Level Structure

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

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

πŸ”– Key Sections

1. Metadata

  • "name" – Display name of your mod

  • "id" – Unique identifier

  • "description" – Mod description

  • "version" – Mod version string

  • "author" – Mod author's name

2. LocalizationFiles

"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

"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:

"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.

More details on pak loading explained in the next page.

Last updated

Was this helpful?