Skip to content

tool to decode and encode sc files from supercell games

Notifications You must be signed in to change notification settings

lilmuff2/X-coder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

X-coder

ДЛЯ РУССКИХ

A tool for decoding (sc to png) and encoding (png to sc) sc files used in Supercell games. Menu

How to use

  1. Download the version you need from releases (apk - for android, setup.exe - installer for Windows, zip archive with exe for Windows)
  2. Select the desired option (each one is described below)
  3. Select or type the input file or folder
  4. Optionally select either type the out folder or file, or it will be selected automatically !IT WILL BE DELETED!
  5. Press the button at the bottom (not close) and wait

DECODE FILE:

Converts sc to png
Input file - _tex.sc , not .sc! or _dl.sc in rare cases
Starting with the 54th version of brawl stars, zktx files appeared. They need to be placed in the same folder as the input file
Out folder - the folder in which the apg will be saved

Decode example

ENCODE FOLDER:

Converts png to sc
Input folder - folder with png and json file(optionally)
The name of the json file must match the name of the folder
Out file - where to save sc
If you need sc for the old version, change the compression in the json file from Zstandard to Lzma

Encode example

DECODE FILES:

Converts a lot of sc files to png, it is usfull to simply copy the sc folder from the apk and decode them all at once Input folder - folder with _tex.sc , not .sc! or _dl.sc files
Outfolder - the folder where the folders will be created in which the pngs will be saved

Decode folder example

ENCODE FOLDERS:

Converts many png folders to sc files
Input folder - a folder with folders containing png
Output folder - the folder where the sc files will be saved

Encode folder example

.json file:

This file generated after decoding example:

{
    "Textures": [ 
        {
            "Encoding": "khronos",
            "PixelFormat": "RGBA8",
            "Filtering": "LINEAR_NEAREST",
            "Linear": true
        },
        {
            "Encoding": "khronos",
            "PixelFormat": "RGBA8",
            "Filtering": "LINEAR_NEAREST",
            "Linear": true
        }
    ],
    "IsDL": false,
    "HasZKTX": true,
    "Compression": "Zstandard"
}

Encoding

Can be khronos (low weight) and raw (fast encoding) if HasZKTX enabled textures are encoded in khronos

Example ui_highres_tex with Zstandard compression:

Encoding Encoding time File size
khronos 35 s 30 MB
raw 7 s 41 MB

I recommend using raw during mod development and khronos on release.

HasZKTX

Parameter responsible for the existence of zktk files

ISDL

Parameter responsible for creating dl file (combining sc and tex_sc), usually used in Clash Royale requires sc file in the folder.

Compression

File compression, with HasZKTX enabled, Zstandard is always used. Example of compression on ui_highres_tex

Compression File encoding time File weight Total
Lzma 41 s 26MB Longer but compresses better.
Lzham 73sec 27MB It's useless.
Zstandard 35secs 30MB Standard, fast and compresses well.

Any questions?

My social networking nickname is lilmuff1 message me or join Telegram or Discord

About

tool to decode and encode sc files from supercell games

Resources

Stars

Watchers

Forks

Packages

No packages published