No project description provided
Project description
Library and Utility for converting encrypted stalcraft game files, such as models and textures into well-known formats.
You can use compiled cli utility from Releases page.
⚠️ Disclaimer
Do not use game assets folder directly.
You can get banned for any changes in game client.
Copy files you need to another folder and work there.
📁 Formats
Type |
Source format |
Output format |
Model |
.mcsa |
.obj |
Texture |
.mic |
.png |
Texture |
.ol |
.dds |
💻 CLI Utility
Usage
You can drag and drop one or multiple files to scfile.exe.
From bash:
scfile [OPTIONS] [FILES]...
Arguments
FILES: List of file paths to be converted. Multiple files should be separated by spaces. Accepts both full and relative paths. Does not accept directory.
Options
-O, --output: One path to output file or directory. Can be specified multiple times for different output files or directories. If not specified, file will be saved in the same directory with a new suffix. You can specify multiple FILES and a single --output directory.
Examples
Convert a single file:
scfile file.mcsa
Will be saved in the same directory with a new suffix.
Convert a single file with a specified path or name:
scfile file.mcsa --output path/to/file.obj
Convert multiple files to a specified directory:
scfile file1.mcsa file2.mcsa --output path/to/folder
Convert multiple files with explicitly specified output files:
scfile file1.mcsa file2.mcsa -O 1.obj -O 2.obj
If the count of FILES and -O is different, as many files as possible will be converted.
Convert all .mcsa files in the current directory:
scfile *.mcsa
In this case, -O accepts only a directory. Subfolders are not included.
Convert all .mcsa files with subfolders to a specified directory:
scfile **/*.mcsa -O path/to/folder
In this case, -O accepts only a directory. With -O specified, the folder structure is not duplicated.
📚 Library
Install
Pip
pip install sc-file -U
Manual
git clone git@github.com:onejeuu/sc-file.git
cd sc-file
poetry install
Usage
Simple
from scfile import convert
# Output path is optional.
# Defaults to source path with new suffix.
convert.mcsa_to_obj("path/to/file.mcsa", "path/to/file.obj")
convert.mic_to_png("path/to/file.mic", "path/to/file.png")
convert.ol_to_dds("path/to/file.ol", "path/to/file.dds")
Advanced
from scfile import McsaFile
with McsaFile("path/to/file.mcsa") as mcsa:
obj: bytes = mcsa.to_obj()
with open("path/to/file.obj", "wb") as fp:
fp.write(obj)
Build
poetry install
poetry run build
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.