#league-of-legends #modding #toolkit #gaming

ltk_fantome

Helper library for working with League of Legends mods in the legacy Fantome format

5 releases

Uses new Rust 2024

new 0.1.4 Dec 2, 2025
0.1.3 Nov 30, 2025
0.1.2 Nov 21, 2025
0.1.1 Sep 29, 2025
0.1.0 Sep 28, 2025

#1679 in Game dev

MIT/Apache

46KB
628 lines

Fantome

A Rust library for creating League of Legends mods in the legacy Fantome format.

Overview

The fantome crate provides functionality to pack mod projects into the legacy .fantome format (renamed ZIP files) that are compatible with any current (future legacy) mod managers. This format was widely used in the League of Legends modding community before the introduction of the newer .modpkg format.

Fantome Format Structure

The library creates ZIP files with this structure, following the official Fantome specification:

my_mod_1.0.0.fantome
├── WAD/
│   ├── Aatrox.wad.client/
│   │   ├── data/
│   │   └── assets/
│   └── Map11.wad.client/
│       ├── data/
│       └── assets/
└── META/
    ├── info.json          # Mod metadata
    ├── README.md          # Project documentation (optional)
    └── image.png          # Mod thumbnail (optional)

Usage

Basic Example

use fantome::pack_to_fantome;
use mod_project::ModProject;
use std::fs::File;
use std::io::BufWriter;
use std::path::Path;

// Load your mod project configuration
let mod_project = ModProject::load("mod.config.json")?;
let project_root = Path::new(".");

// Create output file
let file = File::create("my_mod.fantome")?;
let writer = BufWriter::new(file);

// Pack to Fantome format
pack_to_fantome(writer, &mod_project, project_root)?;

Metadata Structure

The info.json file contains metadata in the format expected by Fantome:

{
  "Name": "Display Name",
  "Author": "Author Name",
  "Version": "1.0.0",
  "Description": "Mod description"
}

Limitations

  • Base layer only: Only content from the content/base/ directory is included
  • No layer support: Additional layers defined in the project are ignored
  • Fixed structure: Must follow the exact WAD folder structure expected by League of Legends

Integration with League Mod Toolkit

This crate is primarily used through the league-mod CLI tool:

# Pack to Fantome format
league-mod pack --format fantome

# Pack with custom filename
league-mod pack --format fantome --file-name "my-mod.fantome"

When packing to Fantome format, the CLI will warn users if their project contains additional layers that won't be included.

Project Structure Requirements

For the library to work correctly, your mod project should follow this structure:

my-mod/
├── mod.config.json           # Project configuration
├── content/                  # Mod content
│   └── base/                 # Base layer (required)
│       ├── Aatrox.wad.client/
│       └── Map11.wad.client/
├── README.md                 # Optional project documentation
└── thumbnail.webp            # Optional thumbnail (any format)

Contributing

This crate is part of the larger League Mod Toolkit project. See the main project README for contribution guidelines.

License

Licensed under the same terms as the parent project.

Dependencies

~25MB
~539K SLoC