Skip to content

darkseal-org/Shadowflame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shadowflame

A tool for extracting, modifying, and repacking League of Legends skin files while maintaining their integrity and proper structure.

Features

  • 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

Quick Start

  1. Install Python 3.10 or higher
  2. Install required package:
pip install requests
  1. Download CSLOL Mod Tools
  2. Copy wad-extract.exe and wad-make.exe to utils/ directory
  3. Run the script:
python replace.py

File Organization

Place 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

How to use?

Tutorials:

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

Using Capture Groups to Preserve Parts of Text

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.

How Capture Groups Work:

  1. Creating a capture group: Use parentheses ( ) around the part of the pattern you want to capture
  2. Referencing captured content: In the replacement, use \1 for the first group, \2 for the second, etc.
  3. 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

Practical Example:

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.)
  • \\1 in the replacement inserts that same digit (note the double backslash needed in JSON)
  • Everything else stays the same except for .dds changing 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 at search_pattern
{
  "search_pattern": "your_pattern_here",
  "replacement": "your_replacement_here",
  "backup": true,
  "encoding": "utf-8"
}

Basic operation:

python replace.py

The script will:

  1. Download and verify required files
  2. Extract your archives
  3. Process all files
  4. Create modified versions in output/

Warning

Always verify your output files before using them in-game

Troubleshooting

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

Credits

Built with tools from:

Contact

Disclaimer

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.

About

Shadowflame is a search-and-replace tool for fast fix of custom skins using REGEX

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages