Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 23 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
name: Lint
name: Lint and test

on: [push, pull_request]
on: [push]

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{matrix.os}}
strategy:
matrix:
python: ["3.11", "3.12"]
os: ["ubuntu-latest", "windows-latest"]

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
- uses: actions/checkout@v4
- name: Set up Python ${{matrix.python}}
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: ${{matrix.python}}

- name: Install requirements
- name: Install poetry
run: |
pip install flake8 pyright
pip install -r requirements.txt
pip install pipx
pipx install poetry

- name: Linting code by flake8
- name: Install dependencies
run: |
flake8 --show-source --statistics
poetry install

- name: Linting code by ruff
run: |
poetry run ruff check .

- name: Check types by pyright
run: |
pyright
poetry run pyright .

- name: Run unit-tests
run: poetry run python -m unittest
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/SC/

# Configuration files
system/config.json
xcoder/config.json

# Python compiled files
*.pyc
Expand Down
81 changes: 54 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,78 @@
# XCoder - easy to use modding tool

Multiplatform modding tool for ANY Supercell\`s game.

## About
Work with Supercell\`s files on **any** os! SC and CSV are supported for all Supercell\`s games.

Work with Supercell\`s files on **any** os! SC and CSV are supported for all
Supercell\`s games.

### Features:
- SC compile / decompile;
- Compression and decompression.

- SC compile / decompile
- Compression and decompression

### How to install and use

- On Windows:
- Download Python 3.7 or newer version from [official page](https://www.python.org/downloads/);
- Install Python. While Installing, enable such parameters as "Add Python to PATH", "Install pip", "Install py launcher", "Associate files with Python" and "Add Python to environment variables";
- Download XCoder from the [releases page](https://github.com/Vorono4ka/XCoder/releases) and extract it;
- Locate the extracted directory and install required modules:
```pip install -r requirements.txt```;
- Execute "main.py" file.
- Download Python 3.10 or newer version
from [official page](https://www.python.org/downloads/)
- Install Python. While Installing, enable such parameters as "Add Python to
PATH", "Install pip", "Install py launcher", "Associate files with Python" and "Add Python to environment variables"
- Download XCoder from the [releases page](https://github.com/xcoder-tool/XCoder/releases) and extract it
- Locate the extracted directory and install required modules:
```cmd
poetry install
```
- Run program with
```cmd
poetry run python -m xcoder
```

- On Linux:
- Open Terminal and install Python by executing following command:
```sudo apt-get update && sudo apt-get install python3 python3-pip```;
- Download XCoder from the [releases page](https://github.com/Vorono4ka/XCoder/releases) and extract it;
- Locate the extracted directory and install required modules by executing following command:
```sudo pip3 install -r requirements.txt```;
- Execute "main.py" file.

- On Android:
- Download and install PyDroid app from [Google Play](https://play.google.com/store/apps/details?id=ru.iiec.pydroid3);
- Open PyDroid and wait until Python installs;
- Download XCoder from the [releases page](https://github.com/Vorono4ka/XCoder/releases) and extract it;
- Install loguru using pip;
- In PyDroid open and execute "main.py" file.
- Open Terminal and install Python by executing following command:
```sh
sudo apt-get update && sudo apt-get install python3 python3-poetry
```
- Download XCoder from the [releases page](https://github.com/xcoder-tool/XCoder/releases) and extract it
- Locate the extracted directory and install required modules by executing following
command:
```sh
poetry install
```
- Run program with
```cmd
poetry run python -m xcoder
```

### Testing

The project supports unit-testing using the unittest module. To run tests by yourself,
use the command:

```sh
poetry run python -m unittest
```

### How to enable KTX section

![KTX section demo](docs/KTX section.png)
![KTX section demo](docs/KTX%20section.png)

**Supercell also uses KTX textures in new versions of the games, so it is advisable to perform this step.**
**Supercell also uses KTX textures in new versions of the games, so it is advisable to
perform this step.**

To enable the KTX module, you need to get the "PVRTexToolCLI" binary from the official site: https://developer.imaginationtech.com/pvrtextool/.
To enable the KTX module, you need to get the "PVRTexToolCLI" binary from the official
site: https://developer.imaginationtech.com/pvrtextool/.

Then it is necessary to put CLI in "system/bin/" folder in the main script folder.
Then it is necessary to put CLI in "bin/" folder in the main script folder.

### In the plans:

- CSV updating.

## Credits
This tool is based on Original [XCoder](https://github.com/MasterDevX/xcoder), Developer: [MasterDevX](https://github.com/MasterDevX)</br>

This tool is based on Original [XCoder](https://github.com/MasterDevX/xcoder),
Developer: [MasterDevX](https://github.com/MasterDevX)</br>

Many thanks to [spiky_Spike](https://github.com/spiky-s) for the provided developments
Loading