Skip to content

File Transformers

Crauzer edited this page Nov 23, 2025 · 3 revisions

File Transformers

File transformers are a powerful feature that allows you to automate file conversions during the pack process. Instead of manually converting files (like textures or scripts) before adding them to your mod, you can include the source files (e.g., .png, .py) and let league-mod handle the conversion for you.

Configuration

Transformers are configured in the mod.config.json file under the transformers array. Each transformer applies to a set of files defined by patterns or files.

{
  "transformers": [
    {
      "name": "transformer-name",
      "patterns": ["**/*.ext"],
      "options": {
        "option_key": "value"
      }
    }
  ]
}

Available Transformers

1. TEX Transformer (tex-converter)

Converts standard image formats and raw DDS files into the custom .tex format used by League of Legends.

  • Name: tex-converter
  • Input Formats: .png, .jpg, .jpeg, .dds
  • Output Format: .tex

Example Configuration:

{
  "name": "tex-converter",
  "patterns": [
    "**/*.png",
    "**/*.dds"
  ],
  "options": {
    "format": "bc7",        // Texture compression format (bc7, bc1, etc.)
    "generate_mips": true   // Whether to generate mipmaps
  }
}

2. Ritobin Transformer (ritobin)

Automatically converts .py (Ritobin) into the binary .bin format required by the game engine.

  • Name: ritobin
  • Input Formats: .py, .ritobin
  • Output Format: .bin

Example Configuration:

{
  "name": "ritobin",
  "patterns": ["**/*.py", "**/*.ritobin"]
}

Using this transformer allows you to keep your source code (Python files) in the mod project, making it easier to read and edit, while ensuring the game receives the compiled binary files it expects.

Clone this wiki locally