April 21, 20242 yr Supporter Solution Well this should do... from inc_noesis import * import noesis import rapi import os def registerNoesisTypes(): handle = noesis.register("Crimson Skies: High Road to Revenge Env tex(*.dds)", "dds") noesis.setHandlerTypeCheck(handle, noepyCheckType) noesis.setHandlerLoadRGBA(handle, noepyLoadRGBA) noesis.logPopup() return 1 def noepyCheckType(data): bs = NoeBitStream(data) if len(data) < 20: return 0 return 1 def noepyLoadRGBA(data, texList): bs = NoeBitStream(data) baseName = rapi.getExtensionlessName(rapi.getLocalFileName(rapi.getInputName())) print(baseName) ImgWidth = bs.readUInt() ImgHeight = bs.readUInt() PixelFormat = bs.readUInt() MipMap = bs.readUInt() for i in range(6): ImgSize = bs.readUInt() data = bs.readBytes(ImgSize) MipCount = MipMap - 1 for j in range(MipCount): DataSize = bs.readUInt() MipData = bs.readBytes(DataSize) if PixelFormat == 1: texFmt = noesis.NOESISTEX_DXT1 elif PixelFormat == 3: texFmt = noesis.NOESISTEX_DXT3 elif PixelFormat == 5: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "r8 g8 b8 a8", noesis.NTEXFLAG_CUBEMAP) texFmt = noesis.NOESISTEX_DXT5 elif PixelFormat == 6: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "b0 g0 r0 a16") #data = rapi.imageFromMortonOrder(data, ImgWidth, ImgHeight, 4) texFmt = noesis.NOESISTEX_RGBA32 elif PixelFormat == 14: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "b5 g6 r5 a0") data = rapi.imageFromMortonOrder(data, ImgWidth, ImgHeight, 4) texFmt = noesis.NOESISTEX_RGBA32 elif PixelFormat == 15: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "r8 g8 b8 a8") data = rapi.imageFromMortonOrder(data, ImgWidth, ImgHeight, 4) texFmt = noesis.NOESISTEX_RGBA32 elif PixelFormat == 16: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "b8 g8 r8 a8") data = rapi.imageFromMortonOrder(data, ImgWidth, ImgHeight, 4) texFmt = noesis.NOESISTEX_RGBA32 elif PixelFormat == 19: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "r0 g0 b0 a8") data = rapi.imageFromMortonOrder(data, ImgWidth, ImgHeight, 4) texFmt = noesis.NOESISTEX_RGBA32 elif PixelFormat == 20: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "r8 g8 b8 a8") data = rapi.imageFromMortonOrder(data, ImgWidth, ImgHeight, 4) texFmt = noesis.NOESISTEX_RGBA32 texList.append(NoeTexture(rapi.getInputName(), ImgWidth, ImgHeight, data, texFmt)) return 1
April 22, 20242 yr Author Localization 19 hours ago, h3x3r said: Well this should do... from inc_noesis import * import noesis import rapi import os def registerNoesisTypes(): handle = noesis.register("Crimson Skies: High Road to Revenge Env tex(*.dds)", "dds") noesis.setHandlerTypeCheck(handle, noepyCheckType) noesis.setHandlerLoadRGBA(handle, noepyLoadRGBA) noesis.logPopup() return 1 def noepyCheckType(data): bs = NoeBitStream(data) if len(data) < 20: return 0 return 1 def noepyLoadRGBA(data, texList): bs = NoeBitStream(data) baseName = rapi.getExtensionlessName(rapi.getLocalFileName(rapi.getInputName())) print(baseName) ImgWidth = bs.readUInt() ImgHeight = bs.readUInt() PixelFormat = bs.readUInt() MipMap = bs.readUInt() for i in range(6): ImgSize = bs.readUInt() data = bs.readBytes(ImgSize) MipCount = MipMap - 1 for j in range(MipCount): DataSize = bs.readUInt() MipData = bs.readBytes(DataSize) if PixelFormat == 1: texFmt = noesis.NOESISTEX_DXT1 elif PixelFormat == 3: texFmt = noesis.NOESISTEX_DXT3 elif PixelFormat == 5: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "r8 g8 b8 a8", noesis.NTEXFLAG_CUBEMAP) texFmt = noesis.NOESISTEX_DXT5 elif PixelFormat == 6: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "b0 g0 r0 a16") #data = rapi.imageFromMortonOrder(data, ImgWidth, ImgHeight, 4) texFmt = noesis.NOESISTEX_RGBA32 elif PixelFormat == 14: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "b5 g6 r5 a0") data = rapi.imageFromMortonOrder(data, ImgWidth, ImgHeight, 4) texFmt = noesis.NOESISTEX_RGBA32 elif PixelFormat == 15: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "r8 g8 b8 a8") data = rapi.imageFromMortonOrder(data, ImgWidth, ImgHeight, 4) texFmt = noesis.NOESISTEX_RGBA32 elif PixelFormat == 16: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "b8 g8 r8 a8") data = rapi.imageFromMortonOrder(data, ImgWidth, ImgHeight, 4) texFmt = noesis.NOESISTEX_RGBA32 elif PixelFormat == 19: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "r0 g0 b0 a8") data = rapi.imageFromMortonOrder(data, ImgWidth, ImgHeight, 4) texFmt = noesis.NOESISTEX_RGBA32 elif PixelFormat == 20: data = rapi.imageDecodeRaw(data, ImgWidth, ImgHeight, "r8 g8 b8 a8") data = rapi.imageFromMortonOrder(data, ImgWidth, ImgHeight, 4) texFmt = noesis.NOESISTEX_RGBA32 texList.append(NoeTexture(rapi.getInputName(), ImgWidth, ImgHeight, data, texFmt)) return 1 did some testing, looks like this works fine! with the exception of the random ~a in some textures, looks like all of the CS:HRTR textures can now be extracted! cheers and thanks a ton, really appreciate the help you guys ❤️ Edited April 22, 20242 yr by notameowcelot
April 24, 20242 yr Author Localization ...found an odd .tga that just won't extract, actually! Can't zip it due to my max total size being at 80kb for some reason, but let me know if there's a way to send it through mega perhaps On 4/22/2024 at 6:10 PM, notameowcelot said: did some testing, looks like this works fine! with the exception of the random ~a in some textures, looks like all of the CS:HRTR textures can now be extracted! cheers and thanks a ton, really appreciate the help you guys ❤️
April 25, 20242 yr Author Localization 16 hours ago, h3x3r said: Tell me a path and name of a file. I have game files. Should be PF_Gangster.bin (found in airplanes.zip if you're using retail or August 2003 prototype builds), GangsterPF.tga. Edited April 26, 20242 yr by notameowcelot
May 2, 20242 yr Supporter Well i checked it but don't know what's goin on. Texture format is DXT1 but noesis strugle to open it. Not sure why. There's no error at all. When i tried it in Raw Texture Cooker it show it properly.
May 3, 20242 yr On 4/24/2024 at 4:11 AM, notameowcelot said: cheers and thanks a ton, really appreciate the help you guys @notameowcelot Barring some smaller loose ends, would you consider this topic solved via h3x3r's original post (or the April 21st one)? "..." / "Mark as solution" Cheers. Edited May 3, 20242 yr by piken
May 3, 20242 yr Author Localization 13 hours ago, piken said: @notameowcelot Barring some smaller loose ends, would you consider this topic solved via h3x3r's original post (or the April 21st one)? "..." / "Mark as solution" Cheers. Aye, will consider it solved! Just gotta figure out the ~a and this weird issue with PF_Gangster but that should be it.
Create an account or sign in to comment