League Mod Toolkit
A comprehensive Rust-based toolkit for creating, managing, and distributing League of Legends mods using the modpkg format.
🔧 Installation
Windows (Recommended)
Via winget (Windows Package Manager):
winget install LeagueToolkit.LeagueMod
Via GitHub Releases:
- Download the latest release from GitHub Releases
- Extract the ZIP file to your preferred location
- Add the extracted directory to your PATH environment variable
🚀 Features
- Project Management: Initialize and manage mod projects with layered structure
- Efficient Packaging: Create compressed
.modpkgfiles for distribution - Layer System: Support for multiple mod layers with priority-based overrides
- Metadata Management: Rich metadata including authors, licenses, and descriptions
- Cross-format Support: Both JSON and TOML configuration formats
- File Transformation: Extensible transformer system for asset processing
📦 Packages
This workspace contains three main crates:
league-mod - CLI Tool
The main command-line interface for mod developers and users.
Features:
- Initialize new mod projects with interactive prompts
- Pack mod projects into distributable
.modpkgfiles - Extract existing
.modpkgfiles for inspection or modification - Display detailed information about mod packages
Usage:
# Initialize a new mod project
# Pack a mod project
# Extract a mod package
# Show mod package information
league-modpkg - Binary Format Library
A robust library for reading, writing, and manipulating the modpkg binary format.
Features:
- Binary serialization/deserialization with
binrw - Zstd compression for efficient storage
- Layer-based file organization
- Hash-based file lookup for performance
- Chunk-based data storage with metadata
mod-project - Configuration Library
Handles mod project configuration files and metadata structures.
Features:
- Serde-based JSON/TOML serialization
- Layer configuration with priority system
- Author and license metadata
- File transformer configuration
- Validation and schema support
Configuration Example:
🏗️ Project Structure
A typical mod project follows this structure:
my-mod/
├── mod.config.json # Project configuration
├── content/ # Mod content organized by layers
│ ├── base/ # Base layer (priority 0)
| | ├── Aatrox.wad.client # Mods for the Aatrox wad file
│ │ | ├── data/
│ │ │ └── assets/
| | ├── Map11.wad.client # Mods for the Map11 (SR) wad file
│ │ | ├── data/
│ │ │ └── assets/
│ ├── high_res/ # High resolution layer
│ └── gameplay/ # Gameplay modifications layer
├── build/ # Output directory for .modpkg files
└── README.md # Project documentation/description
Building from Source
Prerequisites:
- Rust 1.70+ (2021 edition)
- Git
Build steps:
The compiled binary will be available at target/release/league-mod.exe
📖 Quick Start
1. Create a New Mod Project
# Follow the interactive prompts
2. Add Your Content
Place your mod files in the appropriate layer directories:
3. Configure Your Mod
Edit mod.config.json to add metadata, authors, and configure layers:
4. Pack Your Mod
# Creates annie-rework_1.0.0.modpkg in the build/ directory
🔄 Layer System
The layer system allows for modular and overrideable mod content:
- Base Layer: Always present, contains core mod files
- Custom Layers: Additional layers with configurable priorities
- Override Behavior: Higher priority layers override lower priority layers for the same files
- Selective Installation: Users can potentially choose which layers to install
Example layer configuration:
🔗 File Transformers
Transformers allow preprocessing of files during the packing process:
📜 License
This project is licensed under the GNU Affero General Public License v3.0.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Commit Message Format
This project uses Conventional Commits for automated changelog generation and semantic versioning:
# Features (minor version bump)
# Bug fixes (patch version bump)
# Breaking changes (major version bump)
# Other types: docs, style, refactor, test, chore
Development Workflow
All contributions go through our CI pipeline:
- Create a PR - All changes must be submitted via pull request
- CI Checks - Automated checks run on every PR:
- ✅ Code compilation on Linux, Windows, and macOS
- ✅ Test suite execution
- ✅ Clippy linting for code quality
- ✅ Code formatting verification
- ✅ Security audit for vulnerabilities
- ✅ License and dependency checks
- Review & Merge - Maintainer review and merge approved PRs
Release Process
Releases are automated using release-plz:
- Make commits using conventional commit format
- Push to main branch
- Release-plz creates a Release PR with version bump and changelog
- Merge the PR to trigger automatic release with Windows binaries
📚 Documentation
For detailed documentation about the modpkg format and advanced usage, visit our GitHub Wiki.
🙋♀️ Support
If you encounter any issues or have questions:
- Check the GitHub Issues
- Consult the Wiki documentation
- Join our community discussions
Made with ❤️ for the League of Legends modding community.