Git Product home page Git Product logo

xcoder's Introduction

XCoder

Compress / Decompress Brawl Stars SC files on Windows / Linux / Android!

Credits

This tool is based on:

I wanna say "Thank You!" to these developers, because without their work XCoder wouldn't have been released!
Special thanks to spiky_Spike for help with XCoder updates :)

Features:

  • Easy to use.
  • Brawl Stars, Clash of Clans & Clash Royale support.
  • Multiplatform support (working on Windows, Linux and Android).
  • SC compilation / decompilation.

How to install and use

On Windows:

  • Download Python 3.7 or newer version from official page.
  • 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 releases page and extract it.
  • Execute "Main.py" file

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 releases page and extract it.
  • Execute "Main.py" file

On Android:

  • Download and install PyDroid app from Google Play.
  • Open PyDroid and wait until Python installs.
  • Download XCoder from releases page and extract it.
  • In PyDroid open and execute "Main.py" file

TODO:

  • CSV compilation / decompilation.

xcoder's People

Contributors

athemm avatar masterdevx avatar spiky-s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xcoder's Issues

Decoding .scw files?

Hi, first things first thank you for this repo, it helped me a lot.

I wonder how can I see how the characters' look like. Is there any way to do that?

I think these are the files of the characters' look.

can't decompile files again

I could only run it once, and when I tried converting another file it just said Done and there were no files in the directories.

"Dragon Rider" Update- Most .sc files won't convert

I've been using the script for a while now- it's fantastic. However, after the most recent update (v14.93.2, aka "The Dragon Rider Update") it seems to not be able to decrypt many of the .sc/_tex.sc files. All ".sc" and "tex.sc" files seem to be unable to convert except those beginning in "info". I attempted to decrypt the same files that were not working in another script, called "cr-sc-dump" but that would not work either.

Config.json

Where's config.json file? It doesn't work without it

ошибка

ошибка
изображение
[04.05.2024 19:30:20] Получена ошибка:
Traceback (most recent call last):
File "C:\Users\PikniK\AppData\Local\Programs\Python\Python312\Lib\site-packages\PIL\ImageFile.py", line 536, in _save
fh = fp.fileno()
^^^^^^^^^
AttributeError: '_idat' object has no attribute 'fileno'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\PikniK\Desktop\XCoder-master\Main.py", line 73, in sc_decode
decompileSC(f"{folder}{file}", CurrentSubPath, folder = folder, folder_export = folder_export)
File "C:\Users\PikniK\Desktop\XCoder-master\system\Lib.py", line 363, in decompileSC
img.save(f"{folder_export}{CurrentSubPath}{baseName}.png")
File "C:\Users\PikniK\AppData\Local\Programs\Python\Python312\Lib\site-packages\PIL\Image.py", line 2459, in save
save_handler(self, fp, filename)
File "C:\Users\PikniK\AppData\Local\Programs\Python\Python312\Lib\site-packages\PIL\PngImagePlugin.py", line 1412, in _save
ImageFile._save(im, _idat(fp, chunk), [("zip", (0, 0) + im.size, 0, rawmode)])
File "C:\Users\PikniK\AppData\Local\Programs\Python\Python312\Lib\site-packages\PIL\ImageFile.py", line 540, in _save
_encode_tile(im, fp, tile, bufsize, None, exc)
File "C:\Users\PikniK\AppData\Local\Programs\Python\Python312\Lib\site-packages\PIL\ImageFile.py", line 551, in _encode_tile
encoder.setimage(im.im, extents)
SystemError: tile cannot extend outside image

LIB BUG

"[INFO] lzham library not installed"

Codage

Label_asef= "hiver"
Print(Label asef)

What should I do?

Hello! I wanted to try XCoder but I got an error.
Screenshot_20240813_170328
How can I fix this? I ran Main.py file using Pydroid. (I'm an Android user)

Why did we still don't have any updates ?

In October 2020, I asked if the compression and decompression bugs would be fixed (#22) and was told that it had already been done and that the update would arrive. It is now February 2021 and no updates have been made since last summer. So, is it possible to release the update now

Thanks in advance @MasterDevX, @athemm & @spiky-s

Error when verifying installation

Running init.py throws out this message:

Screenshot_24

And while i know that it's most likely not enough info, i have no idea on how to check it

decrypt .sc files

Hello,
your program to get png from a _tex.sc file is very good and works well. But i would ask if you if its also possible to decrypt only .sc files? Not textures. The normal .sc files. I dont know where i can otherwise contact you, so i made here an issue.

Thanks

Decompiled file doesn't appear.

I execute the Init file, i paste the .sc file in In-Compressed-SC, i execute SC-Decode.py, i find nothing in the Out-Decompressed-SC folder. I have Windows 10 and version 3.7.3 Python. @MasterDevX

ERROR! (builtins.NotADirectoryError: [WinError 267] Неверно задано имя папки: './In-Decompressed-SC/loading_tex.png/')

Traceback (most recent call last):
  File "C:\Users\*****\Desktop\XCoder-master\Main.py", line 88, in sc_encode
    compileSC(f"{folder}{i}/", folder_export=folder_export)
  File "C:\Users\*****\Desktop\XCoder-master\system\Lib.py", line 376, in compileSC
    [files.append(i) if i.endswith(".png") else None for i in os.listdir(_dir)]
NotADirectoryError: [WinError 267] Неверно задано имя папки: './In-Decompressed-SC/loading_tex.png/'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\*****\Desktop\XCoder-master\Main.py", line 200, in <module>
    sc_encode()
  File "C:\Users\*****\Desktop\XCoder-master\Main.py", line 92, in sc_encode
    write_log(traceback.format_exc())
  File "C:\Users\*****\Desktop\XCoder-master\system\Lib.py", line 82, in write_log
    log.write(string.got_error % (time.strftime('%d.%m.%Y %H:%M:%S'), err))
TypeError: not all arguments converted during string formatting

idk how to fix it

Error during DecodingSCFile

Traceback (most recent call last):
File "C:\Users\Administrator\Downloads\XCoder\XCoder-master\SC-Decode.py", line 14, in
from PIL import Image
ImportError: No module named 'PIL'

How can I download PIL modules please?

png.png от Clash of Clans

Подскажите, как можно расшифровать файлы от Clash of Clans, которые в формате png.png

Combine extracted frames

Its really awesome that such easy to tool exists, but it would be great to have the extracted frames combined as well.
Upon knowing sc_decode I got to know that it can combine frames, and this project has attributed that script.

So I was wondering if it is possible to combine the frames extracted or not ??

LZMA Decoder Error

When I decoding ui_tex.sc brawl stars file, it keep showing me LZMA Error "Input format not supported by decoder". What can I do?

ImportError: No module named lzma

ImportError: No module named lzma error pops up when I execute SC-Decode.py. I'm on MacOS 10.14.6 (Mojave), is there any way to solve this problem?

ERROR DECODING

[02.05.2022 18:18:47] Получена ошибка:
Traceback (most recent call last):
File "C:\Users\user\Desktop\XCoder_v2.0.1-prerelease\Main.py", line 73, in sc_decode
decompileSC(f"{folder}{file}", CurrentSubPath, folder = folder, folder_export = folder_export)
File "C:\Users\user\Desktop\XCoder_v2.0.1-prerelease\system\Lib.py", line 363, in decompileSC
img.save(f"{folder_export}{CurrentSubPath}{baseName}.png")
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\PIL\Image.py", line 2300, in save
save_handler(self, fp, filename)
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\PIL\PngImagePlugin.py", line 1374, in _save
ImageFile._save(im, _idat(fp, chunk), [("zip", (0, 0) + im.size, 0, rawmode)])
File "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\PIL\ImageFile.py", line 510, in _save
encoder.setimage(im.im, b)
SystemError: tile cannot extend outside image

How to fix it

We got some problem...

When I try to use it to convert the .sc file,it doesn't work, so can u fix these problems?

It's a great code for modding Brawl Stars.

Please reply me 🙏🏿

ImportError: cannot import name 'colorama' from 'system.Lib'

Скорее всего такая шняга будет и с остальными библиотеками (только izma (или как её там) установилась). Причём я даже прописывал pip install colorama, но это не помогает.

What about Clash royale

I really want to edit clash Royale sc files will you add clash Royale in Xcoder(or CLASH OF CLANS i don't have a problem)
Sorry bad english

loading_tex.xcod?

where am I supposed to get loading_tex.xcod I've already installed all the requirements in the txt file
Screenshot_20240908_205132_Pydroid 3

Can't install modules

The following modules can't be installed (Windows 10, python 3.9)
pillow
colorama
lzma
lzham

Html

<title>Elektro Shop</title>

Elektro Shop

Accueil Nos produits Contacts

Bienvenue sur notre site de vente en ligne

Nos produits

Appareils technologiques
    <produits class="technologie">
        <article class="product1">Produit 1</article>
      <article

class="product2">Produit 2

Produit 3
Produit 4

  <b class="grandecategories">Accessoires</b>
  
    <produits class="accessoire">
      <article class="product1">Produit 1</article>
      <article class="product2">Produit 2</article>
      <article class="product3">Produit 3</article>
      <article class="product4">Produit 4</article>
    </produits>
  
  
  <b class="grandecategories">Carte cadeaux</b>
  
    <article class="product1">Produit 1</article>
    <article class="product2">Produit 2</article>
    <article class="product3">Produit 3</article>
    <article class="product4">Produit 4</article>
</ultra>

©Elektro Shop - Site de vente en ligne • Tous droits réservés.

.SC (De)Compress Function Request --plzzz

Hi MasterDevX,
Recently my friends and I tried to put Brawl Stars's ui.sc into Brawl Stars China, and we found that the layout of buttons changed. Thus, we assumed that .sc files contain far more information than sprite splitting info. I checked issue #11, but well I know nothing about compression methods and the linked project didn't give me any hints.
I believe the .sc files contain things like button size, location, and TID calls. Being a modder, this would be a whole new field of technology for offical server mods. I got exited, but was disappointed as I found nothing that decompresses the .sc configuration files.
I trust in your skills, and... could you please try to add the function to XCoder? That would be a great help.

Encode error

When i encode the folder to sc...it shows an error for a png...whyyy

Support For MacOS

I would really appreciate the support for MacOS, maybe provide some of the brawls stars files for those who use Mac Or Windows so they can share it with a jailbroken/rooted phone so they are able to replace these files? That would be great and I would really appreciate it.

Doesn't work with newest BS update

Trying to decompile loading_tex.sc from latest Brawl Stars update.

Traceback (most recent call last):
File "./SC-Decode.py", line 175, in
decompileSC(folder + file)
File "./SC-Decode.py", line 76, in decompileSC
if data[0] != 93:
IndexError: index out of range

With Python 3.7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.