matyalatte / UE4-DDS-Tools

Texture modding tools for UE games
MIT License
72 stars 12 forks source link

Getting a error while injecting a texture into uasset #22

Closed Real-N34r closed 1 year ago

Real-N34r commented 1 year ago

dds.png

matyalatte commented 1 year ago

I added support for some ASTC formats at c429f2404827a28a37229ce91d9a035fb12dc9bb.

Can you test if the latest build will work with your assets? UE4-DDS-Tools-v0.5.4-preview-GUI.zip

I can't test it cause I don't have the assets that use ASTC_6x6. So, please share your assets if the v0.5.4 won't work.

Real-N34r commented 1 year ago

Thanks it works

matyalatte commented 1 year ago

Thanks for the testing. I'll close this issue after releasing v0.5.4.

Real-N34r commented 1 year ago

this error occurs when i tries to inject a png file to another game's uasset file . Note: file is encrypted

`Simple Command Runner v0.5.1 by matyalatte [LoadDefinition] Embedded JSON not found. [LoadDefinition] Loaded gui_definition.json [UpdatePanel] Lable: Inject [UpdatePanel] Command: python\python.exe -E src\main.py comp0 comp1 --save_folder=comp2 --version=comp3__comp4__ [SaveConfig] Saved gui_config.json [RunCommand] Command: python\python.exe -E src\main.py "D:\n3tron\efootball_assets\messi.uasset" "D:\n3tron\edited\messi_face_final.png" --save_folder="D:\n3tron\uassets" --version=4.26 --skip_non_texture --image_filter=cubic UE4 DDS Tools ver0.5.4 by Matyalatte

Mode: inject UE version: 4.26 File: D:\n3tron\efootball_assets\messi.uasset Texture: D:\n3tron\edited\messi_face_final.png Save folder: D:\n3tron\uassets No mipmaps: False Skip non textures: True Force uncompressed: False Image filter: cubic Max workers: 4

load: D:\n3tron\efootball_assets\messi.uasset [RunCommand] Error: Traceback (most recent call last): File "D:\n3tron\UE4-DDS-Tools-v0.5.4-preview-GUI\src\main.py", line 575, in main(args, config=config) File "D:\n3tron\UE4-DDS-Tools-v0.5.4-preview-GUI\src\main.py", line 523, in main results = [func(folder, file, args)] File "D:\n3tron\UE4-DDS-Tools-v0.5.4-preview-GUI\src\main.py", line 99, in caller raise e File "D:\n3tron\UE4-DDS-Tools-v0.5.4-preview-GUI\src\main.py", line 96, in caller response = func(*args, **kwargs) File "D:\n3tron\UE4-DDS-Tools-v0.5.4-preview-GUI\src\main.py", line 165, in inject asset = Uasset(uasset_file, version=args.version) File "D:\n3tron\UE4-DDS-Tools-v0.5.4-preview-GUI\src\unreal\uasset.py", line 407, in init self.serialize(ar) File "D:\n3tron\UE4-DDS-Tools-v0.5.4-preview-GUI\src\unreal\uasset.py", line 414, in serialize ar << (UassetFileSummary, self, "header") File "D:\n3tron\UE4-DDS-Tools-v0.5.4-preview-GUI\src\unreal\archive.py", line 82, in lshift setattr(val[1], val[2], val[0].read(self)) File "D:\n3tron\UE4-DDS-Tools-v0.5.4-preview-GUI\src\unreal\archive.py", line 244, in read obj.serialize(ar) File "D:\n3tron\UE4-DDS-Tools-v0.5.4-preview-GUI\src\unreal\uasset.py", line 47, in serialize ar.endian = self.get_endian() File "D:\n3tron\UE4-DDS-Tools-v0.5.4-preview-GUI\src\unreal\uasset.py", line 223, in get_endian raise RuntimeError(f"Invalid tag detected. ({self.tag})") RuntimeError: Invalid tag detected. (b'\x00\x00\x00\x00')`

matyalatte commented 1 year ago

I think it's the same issue as https://github.com/matyalatte/UE4-DDS-Tools/issues/19. I mean, ucas is not supported yet.

matyalatte commented 1 year ago

Released v0.5.4. And opened a new issue for the ucas support. So, I'll close this issue.