Galaxy1036 / Dumpsc

A little tool used to extract supercell games textures
18 stars 11 forks source link

ClashOfClans: Does not work on background_*.sc files #5

Closed jadeops closed 11 months ago

jadeops commented 2 years ago

The script works for everything else but background_* files it crashes. Any idea what's the fix?

APK link: https://www.apkmirror.com/apk/supercell/clash-of-clans/clash-of-clans-14-635-9-release/clash-of-clans-14-635-9-2-android-apk-download/

 INFO  Processing background_clan_capital_02_tex.sc
 INFO   ├── Detected LZHAM compression
 INFO   └── Cannot decompress background_clan_capital_02_tex !
Traceback (most recent call last):
  File "/tmp/Dumpsc/Main.py", line 67, in <module>
    extract_images()
  File "/tmp/Dumpsc/Main.py", line 46, in extract_images
    images = process_sc(f"{sc_file_name}_tex", f.read(), f"{sc_output_dir}/texture/", True)
  File "/tmp/Dumpsc/System/Dumpsc.py", line 110, in process_sc
    while len(decompressed[i:]) > 5:
TypeError: 'NoneType' object is not subscriptable

The files

$ ls | grep background_
background_cc_gamearea.sc
background_cc_gamearea_tex.sc
background_clan_capital_02.sc
background_clan_capital_02_tex.sc
background_clan_capital.sc
background_clan_capital_tex.sc
background_gamearea.sc
background_gamearea_tex.sc
background_npc.sc
background_npc_tex.sc
background_player_2.sc
background_player_2_tex.sc
background_player.sc
background_player_tex.sc
background_war.sc
background_war_tex.sc

PS: I am using this repo https://github.com/Statscell/Dumpsc that uses https://github.com/Galaxy1036/Dumpsc