Comments (17)
Decompressing works the same, but fileType 28 is new. I compaired an old tex.sc wih a new one. It seems, like you said already, that the pixels itself are stored the same way (colors are still correct), but they are ordered different.
Not sure when and if I will fix this script for the new version :P.
from cr-sc-dump.
what about clash of clans tex file? Is that can decompressing?
from cr-sc-dump.
CoC uses LZHAM, I think, and I don't know how to adjust the header to be able to decompress the files. Last time I check (a few month ago) you could get the decompressed files from the cache folder inside your CoC installation path and could extract the images using this script. But I guess Supercell did the same changes to CoC's tex files like they did in CR.
from cr-sc-dump.
Hi!
This is the garbled image structure (tested with an image with width of 186 (chr_balloon_tex)):
pixels 0 to 31 (32 pixels) = pixels 0 to 31 of line 0 of final image
pixels 32 to 63 = pixels 0 to 31 of line 1 of final image
...
pixels 992 to 1023 = pixels 0 to 31 of line 31 of final image
pixels 1024 to 1055 = pixels 32 to 63 of line 0 of final image
...
pixels 2048 to 2079 = pixels 64 to 95 of line 0 of final image
...
...
pixels 5088 to 5119 = pixels 128 to 159 of line 31 of final image
pixels 5120 to 5145 (26 pixels = (width - (floor(width/32) * 32))) = pixels 160 to 185 of line 0 of final image
pixels 5146 to 5171 (26 pixels) = pixels 160 to 185 of line 1 of final image
...
pixels 5926 to 5951 = pixels 160 to 185 of line 31 of final image
pixels 5952 to 5983 (32 pixels) = pixels 0 to 31 of line 32 of final image
...
etc.
I'm currently testing with other images to check how it behaves at the end (chr_balloon_tex is all transparent pixels at the end).
from cr-sc-dump.
Tested with level_goblin_arena_tex.
If there are less than 32 lines remaining, use this number instead of 32 to iterate through the remaining 32-pixels blocks and rebuild the final lines.
from cr-sc-dump.
@fpvolquind did you end up writing the code for this? you should submit a pull request :)
from cr-sc-dump.
Well, I wrote the code, but in another language. I'm not so great with python, but I'll give a shot.
from cr-sc-dump.
Can you paste the logic from whatever other language, I can also give it a shot
from cr-sc-dump.
Ugly as hell, but works. Just ran through all _tex.sc files, no garbled images.
from cr-sc-dump.
Tested in a few files and worked great, thank you @fpvolquind great work!
from cr-sc-dump.
You're welcome. Glad to help the community =)
from cr-sc-dump.
Hate to put that here, but any advice on getting the contents of the .sc file? like ui.sc contains all the clan badges -- it would be interesting to decode it?
from cr-sc-dump.
Yes, decoding the .sc files would be great, I'd love to have the animated sprites. The files are LZMA-compressed, similar to the _tex.sc files. There is a script around for QuickBMS that can decompress most of them. I couldn't get much sense out of the decompressed files yet, but they are some sort of texture atlas. I'll try looking at ui_spells to try and get some sense of the data.
from cr-sc-dump.
Looking at the clan badges csv, it looks like all the badges are in the ui.sc file -- using the bms script i can see all the file names in there too now, so at least getting somewhere... thanks for that!
http://aluigi.altervista.org/bms/clash_royale.bms
from cr-sc-dump.
Posted what I found here: http://zenhax.com/viewtopic.php?f=9&t=2369&p=18181
from cr-sc-dump.
@umop-aplsdn did you have any progress? I just thought of something, maybe they're using the unity3d sprite packer since it's the engine used for the game. Something else to play with maybe :)
https://docs.unity3d.com/Manual/SpritePacker.html
from cr-sc-dump.
Check out my repository, just updated my script.
AFAIK, Supercell uses it's own game engine. I couldn't find any sample Unity texture atlas to compare with the sc files.
from cr-sc-dump.
Related Issues (20)
- PNG to SC HOT 1
- Encoding CSV support? HOT 1
- how to use cr-sc-dump HOT 4
- Unknown header (dl.sc) HOT 6
- lzma HOT 8
- Can't decryption sc file (no module named 'PIL') HOT 6
- clash of quest cant dump HOT 4
- HAY DAY SOME TEX / SC cannot get image HOT 5
- Decoder Error LZMA HOT 4
- Decoding does not work for CoC v15.0.3 apk HOT 1
- I try to cut sprites from galaxy1036 repo HOT 2
- LZMAError HOT 3
- .csv Unknown header HOT 3
- LZMAError Input format not supported by decoder HOT 16
- Can't download pylzham "Could not build wheels for pylzham" HOT 1
- Decoding does not work for CoC v16.0.4 apk HOT 5
- Help needed with pyliblzma HOT 4
- Sample files for all older formats? HOT 7
- Issue with new cards HOT 2
- Decoding new _dl.sc files HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cr-sc-dump.