XCoder icon indicating copy to clipboard operation
XCoder copied to clipboard

Can't decompress sc file

Open E12Dragon opened this issue 2 years ago • 1 comments

Hi,

Trying to decode some new sc files from Clash of Clans using latest version of x-coder on python 3.11.1

I have uploaded the files I am unable to decompress to google drive.

[INFO] File: scenery_ghost2023_dl_opt__1_.sc. Collecting information...
[INFO] ZSTD compression detected
[ERROR] ERROR! (builtins.AttributeError: 'SWFTexture' object has no attribute 'image')
Traceback (most recent call last):

  File "C:\...\XCoder-2.6.7\main.py", line 50, in <module>
    main()
    └ <function main at 0x0000013C0DDC04A0>

  File "C:\...\XCoder-2.6.7\main.py", line 40, in main
    handler()
    └ <function decode_and_render_objects at 0x0000013C109B79C0>

> File "C:\...\XCoder-2.6.7\system\lib\features\sc\decode.py", line 80, in decode_and_render_objects
    _save_textures(swf, objects_output_folder / "textures", base_name)
    │              │    │                                   └ 'scenery_ghost2023_dl_opt__1_'
    │              │    └ WindowsPath('SC/Out-Sprites/scenery_ghost2023_dl_opt__1_')
    │              └ <system.lib.swf.SupercellSWF object at 0x0000013C10A42050>
    └ <function _save_textures at 0x0000013C10A0C2C0>

  File "C:\...\XCoder-2.6.7\system\lib\features\sc\decode.py", line 112, in _save_textures
    swf.textures[img_index].image.save(textures_output / f"{filename}.png")
    │   │        │                     └ WindowsPath('SC/Out-Sprites/scenery_ghost2023_dl_opt__1_/textures')
    │   │        └ 0
    │   └ [<system.lib.objects.texture.SWFTexture object at 0x0000013C10B43550>, <system.lib.objects.texture.SWFTexture object at 0x000...
    └ <system.lib.swf.SupercellSWF object at 0x0000013C10A42050>

AttributeError: 'SWFTexture' object has no attribute 'image'

E12Dragon avatar Sep 29 '23 22:09 E12Dragon

The same issue occurs with all sc files in the latest version (v15.547.x)

E12Dragon avatar Oct 15 '23 08:10 E12Dragon