Jump to content

Death end re:Quest 2 .XET files


Go to solution Solved by h3x3r,

Recommended Posts

  • Engineer
  • Solution

Tell me if you encounter any other Pixel Format. If so send me the file.

from inc_noesis import *
import noesis
import rapi
import os

def registerNoesisTypes():
   handle = noesis.register("Death end re:Quest 2", ".xet")
   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()))
    TexWidth = bs.readUShort()
    TexHeight = bs.readUShort()
    bs.read(2)
    TexPixelFormat = bs.readUByte()
    bs.read(5)

    if TexPixelFormat == 0:
        bs.TexSize = TexWidth * TexHeight //2 # DXT1
        print("Pixel Format > DXT1")    
    elif TexPixelFormat == 32:
        bs.TexSize = TexWidth * TexHeight # DXT5
        print("Pixel Format > DXT5")
    else:
        print("Unknown Pixel Format >",TexPixelFormat)

    data = bs.readBytes(bs.TexSize)
    if TexPixelFormat == 0:
        texFmt = noesis.NOESISTEX_DXT1
    elif TexPixelFormat == 32:
        texFmt = noesis.NOESISTEX_DXT5
    texList.append(NoeTexture(rapi.getInputName(), TexWidth, TexHeight, data, texFmt))
    return 1

 

  • Like 2
Link to comment
Share on other sites

16 hours ago, h3x3r said:

Tell me if you encounter any other Pixel Format. If so send me the file.

from inc_noesis import *
import noesis
import rapi
import os

def registerNoesisTypes():
   handle = noesis.register("Death end re:Quest 2", ".xet")
   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()))
    TexWidth = bs.readUShort()
    TexHeight = bs.readUShort()
    bs.read(2)
    TexPixelFormat = bs.readUByte()
    bs.read(5)

    if TexPixelFormat == 0:
        bs.TexSize = TexWidth * TexHeight //2 # DXT1
        print("Pixel Format > DXT1")    
    elif TexPixelFormat == 32:
        bs.TexSize = TexWidth * TexHeight # DXT5
        print("Pixel Format > DXT5")
    else:
        print("Unknown Pixel Format >",TexPixelFormat)

    data = bs.readBytes(bs.TexSize)
    if TexPixelFormat == 0:
        texFmt = noesis.NOESISTEX_DXT1
    elif TexPixelFormat == 32:
        texFmt = noesis.NOESISTEX_DXT5
    texList.append(NoeTexture(rapi.getInputName(), TexWidth, TexHeight, data, texFmt))
    return 1

 

It doesn't work, it gives me these traceback errors:

Screenshot 2024-11-10 005436.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...