July 13Jul 13 Hi everyone,I'm trying to make a texture mod Batman Blackgate, but I'm stuck on the game's TXTR texture format.I'm not a programmer, so I've mostly been learning as I go with some help from AI. I managed to extract the .ara archives using QuickBMS, but I can't figure out how to decode the TXTR files or get them to open in Noesis.I know this is a pretty niche game, but I don't want to give up on the project. If anyone has experience with reverse engineering game texture formats or writing Noesis plugins, I'd really appreciate any advice. batmanstxtr.zip dec.py archives 1- 17kb.zip game files and bms.zip
July 22Jul 22 Supporter from inc_noesis import * import noesis import rapi import os def registerNoesisTypes(): handle = noesis.register("Batman: Arkham Origins Blackgate - Texture", ".txt") 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, NOE_BIGENDIAN) BaseName = rapi.getExtensionlessName(rapi.getLocalFileName(rapi.getInputName())) cPos = bs.tell() bs.read(8) TextureSizeOffset = bs.readUInt() TextureWidth = bs.readUShort() TextureHeight = bs.readUShort() bs.read(4) PixelFormat = bs.readUShort() bs.seek(TextureSizeOffset, NOESEEK_ABS) TextureSize = bs.readUInt() data = bs.read(TextureSize) if PixelFormat == 6: texFmt = noesis.NOESISTEX_DXT1 print("Pixel Format > DXT1 >", PixelFormat) elif PixelFormat == 8: texFmt = noesis.NOESISTEX_DXT5 print("Pixel Format > DXT5 >", PixelFormat) else: print("Unknown Pixel Format > ", PixelFormat) texList.append(NoeTexture(rapi.getInputName(), TextureWidth, TextureHeight, data, texFmt)) return 1But need more samples to confirm PixelFormat. Edited July 22Jul 22 by h3x3r
Create an account or sign in to comment