Header Renamer? (quickbms)
Posted: Sun Oct 02, 2016 1:42 am
.
i'm working on a simple bms script but i need to see a sample to know exactly what the header is in binarystipo360 wrote:So i'm trying to cook up a quickbms / or (some other type of script) that could take my textures header ".XETU" and spit out the file 100% unmodified except i need the header replaced with ".XETV"
Code: Select all
idstring "\x00XETU" #".XETU"
get NAME filename
set MEMORY_FILE binary "\x00\x58\x45\x54\x56" #".XETV"
log NAME 0 0x5 MEMORY_FILE
append
get SIZE asize
math OFFSET = 0x5
math SIZE - OFFSET
log NAME OFFSET SIZEif you have a Noesis script to open these textures i could just modify the type checking in it to accept them, so no need for bms script herestipo360 wrote:...the reason it needs to be set to "V" is because noesis and other texture viewers are only setup to read ".XETV"
i don't understand, idstring is just a type check so you don't mistakenly modify the wrong files and basename doesn't grab the extensionI replaced idstring "\x00XETU" with get NAME basename because i have multiple texture headers i need spat out in .XETV,
Code: Select all
get MAGIC long
get VERSION byte
if VERSION == 0x55 #".XETU"
get NAME filename
set MEMORY_FILE binary "\x00\x58\x45\x54\x56" #".XETV"
log NAME 0 0x5 MEMORY_FILE
append
get SIZE asize
math OFFSET = 0x5
math SIZE - OFFSET
log NAME OFFSET SIZE
elif VERSION == 0x48 #".XETH"
get NAME filename
set MEMORY_FILE binary "\x00\x58\x45\x54\x56" #".XETV"
log NAME 0 0x5 MEMORY_FILE
append
get SIZE asize
math OFFSET = 0x5
math SIZE - OFFSET
log NAME OFFSET SIZE
elif VERSION == 0x40 #".XET@"
get NAME filename
set MEMORY_FILE binary "\x00\x58\x45\x54\x56" #".XETV"
log NAME 0 0x5 MEMORY_FILE
append
get SIZE asize
math OFFSET = 0x5
math SIZE - OFFSET
log NAME OFFSET SIZE
else
get NAME filename
print "%NAME% is version:%VERSION% which is not supported yet!"
endif