A tool for extracting, modifying, and repacking League of Legends skin files while maintaining their integrity and proper structure.
- Extract and process .fantome and .zip skin files
- Handle WAD and skin0.bin files
- Search and replace file contents
- Automatic file cleanup and validation
- Parallel processing for better performance
- Maintains folder structure between input and output
- Install Python 3.10 or higher
- Install required package:
pip install requests- Download CSLOL Mod Tools
- Copy wad-extract.exe and wad-make.exe to utils/ directory
- Run the script:
python replace.pyPlace your skin files in the skins/ folder. The tool supports any structure: Inside any quantity of folders:
skins/
├── folder1/
│ ├── skin1.fantome
│ └── skin2.zip
├── folder3/
│ ├── folder4/
│ └── skin93.fantome
│ └── skin2.zip
└── folder2/
└── skin3.fantome
Direct skin files:
skins/
├── 1.fantome
├── 2.fantome
├── 3.zip
├── 4.fantome
└── 5.zip
Warning
- Files must have unique names or paths
- Mixing .fantome and .zip files is supported
- Output will mirror your input structure
- Duplicate filenames in different folders will conflict if they contain different skins
Tutorials:
- Replacing static strings: https://youtu.be/hM7dsENFfDg
- Replacing dynamic strings: https://youtu.be/gQHPL9WIjQw
- Replacing part of the code: https://www.youtube.com/watch?v=3L612Rr2Diw
Configure replacements in replace_config.json:
WARNING: This project uses REGEX to find and replace the files. You can learn about REGEX clicking here. Regex allows you to search for specific patterns in text using powerful pattern matching rules. This means you can:
- Find exact text matches
- Match text that follows specific patterns (like numbers, words, or special characters)
- Replace multiple variations of text at once
- Use capture groups to preserve parts of the matched text
- Perform complex search and replace operations with wildcards and special characters
Capture groups are a powerful feature in regex that allows you to "remember" parts of the matched text and reuse them in your replacement pattern.
- Creating a capture group: Use parentheses
( )around the part of the pattern you want to capture - Referencing captured content: In the replacement, use
\1for the first group,\2for the second, etc. - Example: If you want to change file extensions but keep filenames:
- Search pattern:
(filename_)(\d+)(\.old_extension) - Replacement:
\1\2.new_extension - This keeps the base name and number intact while changing only the extension
- Search pattern:
To replace all instances of LuxLoadScreen_7.dds to LuxLoadScreen_7.tex while preserving any number:
{
"search_pattern": "ASSETS/Characters/Lux/Skins/Skin07/LuxLoadScreen_([0-9]).dds",
"replacement": "ASSETS/Characters/Lux/Skins/Skin07/LuxLoadScreen_\\1.tex",
"backup": true,
"encoding": "utf-8"
}In this example:
([0-9])captures the digit (7, 5, etc.)\\1in the replacement inserts that same digit (note the double backslash needed in JSON)- Everything else stays the same except for
.ddschanging to.tex
For multiple digits, use ([0-9]+) instead.
Example patterns:
\b\w+\b- matches whole words\d+- matches one or more digits(old)\s*(text)- matches "old text" with any spaces between, capturing each word.*?pattern.*?- matches any text containing "pattern" Make sure to test your regex patterns carefully before running replacements on your files. You can place the REGEX code atsearch_pattern
{
"search_pattern": "your_pattern_here",
"replacement": "your_replacement_here",
"backup": true,
"encoding": "utf-8"
}Basic operation:
python replace.pyThe script will:
- Download and verify required files
- Extract your archives
- Process all files
- Create modified versions in output/
Warning
Always verify your output files before using them in-game
For missing files:
- Run the script to auto-download components
- Manually add WAD tools from CSLOL Mod Tools
- Check your internet connection For processing errors:
- Verify input file formats
- Check directory permissions
- Review error messages
Built with tools from:
- LoL-Fantome (CSLOL Mod Tools)
- CommunityDragon (Hash Files)
- moonshadow565 (Ritobin)
- Support: [email protected]
- Made by @koobzaar
This project is not endorsed by Riot Games and doesn't reflect Riot Games' views or opinions. League of Legends and related properties are trademarks of Riot Games, Inc.