Closed ToxifireX closed 1 year ago
Try using ui_spells_tex.sc
if available. If I remember correctly Most of CR's *.sc
don't contain PNGs.
Alright. Thank you.
Did it work with using *_tex.sc
files?
Yea, it did. I decompressed all of them, but didn't find the card icons for a lot of cards.
I noticed that some of the newer cards are in their own ui_spell_[card].sc
file, and not ui_spells_tex.sc
. For example, ui_spell_zappies.sc
& evolution_mortar.sc
. I noticed there are no tex.sc to match these.
I am trying to get the evolution mortar.png.
Thanks
Most of the *.sc
are not part of the APK itself but get downloaded when you start the app on your device. This way SC can easier update most of their assets.
There are two ways to get the additional files, pull them directly from your device or use sc-assets-download. For the latter you might need to update some hashes/version numbers in the code itself to pull the newest files.
Ok, I didn't know that and thanks I will try it.
Hi, do you know where I can find the evolution card icon images? Like this one:
Ok, I found it in spells_evolved.csv, but I run into the same issue that I opened this issue for. The file is ui_spells_mortar_evolution.sc, but it runs into the LZMA issue. Do you know any way that I can decode it? Thanks.
python dumpsc.py --old ui_spell_mortar_evolution.sc
Exactly how it is explained in the README.md
.
Ok figured it out for some reason zstandard.MAGIC_NUMBER
returns a different value on Windows than on Linux.
Could you please change line 55 from
elif int.from_bytes(data[0:4], byteorder="little") == zstandard.MAGIC_NUMBER:
to
elif int.from_bytes(data[0:4], byteorder="little") == 0xfd2fb528:
In the meantime I try to figure out why there is a OS specific difference.
Alright, thanks for looking into it, and I will try it and let you know the result when I get the chance.
Thanks you so much for helping me, and it has worked. One last question: are *.sc
files and *_tex.sc
files coded in the same way? Thanks again.
Thank you for hanging on and testing in your environment.
There are *.sc
, *_dl.sc
, and *_tex.sc
depending on the game they are compressed with different algorithms.
*_dl.sc
and *_tex.sc
only contain assets. *.sc
sometime contain assets.
Never really investigated the *.sc
further.
Do you know what type of compression each file uses in Clash Royale? I tried to figure it out using --verbose
in your code, but it always says Decompressing using ZSTD
. However, when I use Galaxy1036's code, it says LZMA Compression Detected
every time. I am interested because I would like to recompress the files in their original compression.
If the script prints Decompressing using ZSTD ...
it should be correct otherwise it is LZMA
or LZHAM
. What compression is used is not depending on the game but on the file header itself. I'm not to sure about the logic when what compression is used.
Alright, thank you for helping me along the way. I'll close this issue now.
\path\to\assets\sc\ui_spells.sc --old ui_spells.sc LZMAError Input format not supported by decoder
\path\to\assets\sc\ui_spells.sc ui_spells.sc LZMAError Input format not supported by decoder
I am using python 3.11.5 (latest 09/02/23) I have retrieved the Clash Royale files by installing them from apkpure.com Clash Royale version 3.33145, then renaming the file to end in .zip, and extracting. I am using Windows 10 Pro OS Build 19045.3324 on Command Prompt (cmd).