danila-schelkov / sc-compression

A module for compression like in Supercell games.
GNU General Public License v3.0
14 stars 1 forks source link

Clash of Clans v15.83.x "chr_" files cannot be decompressed #1

Closed E12Dragon closed 1 year ago

E12Dragon commented 1 year ago

Hello,

With Clash of Clans v15.83.x characters.sc and characterstex.sc has basically been made redundant as each character's sprites now have their own .sc file beginning with "chr_". These files do not have "_tex" pairs, which may be why the decompressor doesn't work with these. Oddly, the Valkyrie does have a "_tex" pair despite starting in "chr\", and both the .sc and _tex.sc files for the valkyrie do work the decompressor. A fix for this would be greatly appreciated for the rest!

I've added some samples here: https://drive.google.com/drive/folders/1DoI658qO1XSmaPj_sTaVdAR-uULeSdoq

danila-schelkov commented 1 year ago

Mine module uses the pylzham module. It's doesn't work with Python >=3.10. Watch out for the issue. You may downgrade your python version. Or if you're using Windows, you may uninstall pylzham module to use the module built-in LZHAM codec. Thank you for the issue.

E12Dragon commented 1 year ago

Thanks for the response. I've downgraded to python 3.9.1, but it still cannot decompress the chr_ files. I tested with "chr_ram_rider.sc". I also re-downloaded and used sc-compression-0.6.1. Result: File: ".../examples/decompressor/main.py", line 17, in <module> f.write(decompress(file_data)[0]) TypeError: a bytes-like object is required, not 'NoneType'

danila-schelkov commented 1 year ago

This works for me after the update.

Python 3.10. Earlier I uninstalled the pylzham module. image