Re: [REQUEST] Transformers 2004 .VBIN and . ITF (PS2)
Posted: Sun Jun 16, 2013 9:40 pm
Hmm, each file seems to have slightly different offsets, i wonder if finding a common offset for each part might be worth a try?
Game Research Forum
https://forum.xentax.com/
Code: Select all
log MEMORY_FILE 0 0 ;
log MEMORY_FILE2 0 0 ;
log MEMORY_FILE3 0 0 ;
log MEMORY_FILE4 0 0 ;
log MEMORY_FILE5 0 0 ;
log MEMORY_FILE6 0 0 ;
log MEMORY_FILE7 0 0 ;
log MEMORY_FILE8 0 0 ;
log MEMORY_FILE9 0 0 ;
log MEMORY_FILE10 0 0 ;
Get Q ASIZE 0 ;
Math number = 0 ;
For T = 0 < Q ;
Math number += 1 ;
findloc OFFSET string "\x7E\x50\x6F\x73\x69\x74\x69\x6F\x6E\x41\x72\x72\x61\x79\x00\x00" 0 0 ;
If OFFSET = 0 ;
Math T = Q ;
Math T += 1 ;
Math ttest = 0 ;
ELSE ;
GoTo OFFSET 0 ;
SavePos Start 0 ;
Put Start Long MEMORY_FILE4 ;
GoTo OFFSET 0 ;
GoTo 0x08 0 SEEK_CUR ;
Get size Long 0 ;
SavePos null 0 ;
EndIF ;
Next T ;
Put Q Long MEMORY_FILE4 ;
Get listf ASIZE MEMORY_FILE4 ;
If listf = 0 ;
CleanExit ;
EndIF ;
Math spyrodragon = listf ;
Math spyrodragon /= 4 ;
Math spyrodragon -= 1 ;
Math rubyfox = 0 ;
Math diafox = 0 ;
Math rfv = 0 ;
For Y = 1 To spyrodragon ;
log MEMORY_FILE7 0 0 ;
log MEMORY_FILE8 0 0 ;
log MEMORY_FILE1 0 0 ;
log MEMORY_FILE2 0 0 ;
log MEMORY_FILE3 0 0 ;
GoTo rubyfox MEMORY_FILE4 ;
Get start Long MEMORY_FILE4 ;
SavePos rubyfox MEMORY_FILE4 ;
Get size Long MEMORY_FILE4 ;
Math size -= start ;
Log MEMORY_FILE7 start size 0 ;
GoTo 0 MEMORY_FILE7 ;
Math count = 0 ;
Math gt = 0 ;
Math Qprime = 0 ;
Math red = 0 ;
SavePos found MEMORY_FILE7 ;
GoTo 0 MEMORY_FILE7 ;
GoTo 0x10 MEMORY_FILE7 SEEK_CUR ;
Get gee Long MEMORY_FILE7 ;
SavePos gvertex MEMORY_FILE7 ;
Math gee -= 4 ;
Math gee /= 12 ;
Math deedee = 0 ;
For dv = 1 To gee ;
GoTo gvertex MEMORY_FILE7 ;
Get Type1 Long MEMORY_FILE7 ;
Get Type2 Long MEMORY_FILE7 ;
Get Type3 Long MEMORY_FILE7 ;
SavePos gvertex MEMORY_FILE7 ;
GoTo deedee MEMORY_FILE2 ;
Put Type1 Long MEMORY_FILE2 ;
Put Type2 Long MEMORY_FILE2 ;
Put Type3 Long MEMORY_FILE2 ;
SavePos deedee MEMORY_FILE2 ;
Next dv ;
For T = 0 < size ;
GoTo found MEMORY_FILE7 ;
findloc OFFSETT string "\x7E\x49\x6E\x64\x65\x78\x41\x72\x72\x61\x79\x00\x00" MEMORY_FILE7 0 ;
If OFFSETT = 0 ;
Math T = size ;
Math twotest = 1 ;
EndIF ;
If OFFSETT != 0 ;
GoTo OFFSETT MEMORY_FILE7 ;
GoTo 13 MEMORY_FILE7 SEEK_CUR ;
SavePos found MEMORY_FILE7 ;
Put found Long MEMORY_FILE1 ;
EndIF ;
Next T ;
Get mqa ASIZE MEMORY_FILE1 ;
Math mqa /= 4 ;
Math greenfox = 0 ;
For jjj = 1 To mqa ;
GoTo gt MEMORY_FILE1 ;
Get found long MEMORY_FILE1 ;
SavePos gt MEMORY_FILE1 ;
GoTo found MEMORY_FILE7 ;
Get scope Long MEMORY_FILE7 ;
SavePos baseface MEMORY_FILE7 ;
Math foxskin = found ;
Math foxskin += scope ;
Math dragonfox = scope ;
Math dragonfox -= 4 ;
Math dragonfox /= 2 ;
Math dragonfox -= 2 ;
Do ;
GoTo baseface MEMORY_FILE7 ;
Get facecount Short MEMORY_FILE7 ;
SavePos basedeer MEMORY_FILE7 ;
Math redfox = facecount ;
Math redfox *= 2 ;
Math redfox += basedeer ;
Math baseface = redfox ;
Math rfc = facecount ;
Math rfc -= 2 ;
Math kin = rfc ;
Math gng = facecount ;
Math gng *= 2 ;
Math gng += basedeer ;
Math traptiger = 0 ;
Math nogo = 1 ;
If gng > foxskin ;
Math greenfox = 0 ;
log MEMORY_FILE3 0 0 ;
Math traptiger = 1 ;
Math rfc = 0 ;
Math baseface = foxskin ;
GoTo found MEMORY_FILE7 ;
Get null Long MEMORY_FILE7 ;
SavePos basedeer MEMORY_FILE7 ;
EndIF ;
For grayfox = 1 To traptiger ;
For extra = 1 To dragonfox ;
GoTo basedeer MEMORY_FILE7 ;
Get Type1 Short MEMORY_FILE7 ;
SavePos basedeer MEMORY_FILE7 ;
Get Type3 Short MEMORY_FILE7 ;
Get Type5 Short MEMORY_FILE7 ;
Math dragontest = 0 ;
If Type1 = Type3 ;
Math dragontest += 1 ;
EndIF ;
If Type1 = Type5 ;
Math dragontest += 1 ;
EndIF ;
If Type3 = Type5 ;
Math dragontest += 1 ;
EndIF ;
If dragontest = 0 ;
GoTo greenfox MEMORY_FILE3 ;
Put Type1 Short MEMORY_FILE3 ;
Put Type3 Short MEMORY_FILE3 ;
Put Type5 Short MEMORY_FILE3 ;
Put 0 Short MEMORY_FILE3 ;
SavePos greenfox MEMORY_FILE3 ;
GoTo greenfox MEMORY_FILE3 ;
Put Type1 Short MEMORY_FILE3 ;
Put Type5 Short MEMORY_FILE3 ;
Put Type3 Short MEMORY_FILE3 ;
Put 0 Short MEMORY_FILE3 ;
SavePos greenfox MEMORY_FILE3 ;
EndIF ;
Next extra ;
Next grayfox ;
For foxes = 1 To rfc ;
GoTo basedeer MEMORY_FILE7 ;
Get Type1 Short MEMORY_FILE7 ;
SavePos basedeer MEMORY_FILE7 ;
Get Type3 Short MEMORY_FILE7 ;
Get Type5 Short MEMORY_FILE7 ;
Math dragontest = 0 ;
If Type1 = Type3 ;
Math dragontest += 1 ;
EndIF ;
If Type1 = Type5 ;
Math dragontest += 1 ;
EndIF ;
If Type3 = Type5 ;
Math dragontest += 1 ;
EndIF ;
If dragontest = 0 ;
GoTo greenfox MEMORY_FILE3 ;
Put Type1 Short MEMORY_FILE3 ;
Put Type3 Short MEMORY_FILE3 ;
Put Type5 Short MEMORY_FILE3 ;
Put 0 Short MEMORY_FILE3 ;
SavePos greenfox MEMORY_FILE3 ;
GoTo greenfox MEMORY_FILE3 ;
Put Type1 Short MEMORY_FILE3 ;
Put Type5 Short MEMORY_FILE3 ;
Put Type3 Short MEMORY_FILE3 ;
Put 0 Short MEMORY_FILE3 ;
SavePos greenfox MEMORY_FILE3 ;
EndIF ;
Next foxes ;
While baseface < foxskin ;
Next jjj ;
Get Zw3 ASIZE MEMORY_FILE3 ;
Math Zf3 = Zw3 ;
Math Zf3 /= 8 ;
Get Zw2 ASIZE MEMORY_FILE2 ;
Math Zf2 = Zw2 ;
Math Zf2 /= 12 ;
Math FaceNumber = Zf3 ;
Math VertexNumber = Zf2 ;
Math Snake = VertexNumber ;
Math Snake *= 12 ;
Math Dragon = FaceNumber ;
Math Dragon *= 8 ;
Math Sum = Dragon ;
Math Sum += Snake ;
Math QQQ = 60 ;
Math QQQ += Snake ;
Math QQ = 52 ;
Math qaz = 0 ;
Math wsx = 0 ;
Math hqw = Sum ;
Math hqw += 60 ;
Math bearit = 0 ;
Log MEMORY_FILE8 0 0 ;
For bear = 1 To hqw ;
GoTo bearit MEMORY_FILE8 ;
Put 0 Byte MEMORY_FILE8 ;
SavePos bearit MEMORY_FILE8 ;
Next bear ;
For Vertex = 0 < Zw2 ;
GoTo qaz MEMORY_FILE2 ;
Get D byte MEMORY_FILE2 ;
SavePos qaz MEMORY_FILE2 ;
GoTo QQ MEMORY_FILE8 ;
Put D Byte MEMORY_FILE8 ;
SavePos QQ MEMORY_FILE8 ;
Next Vertex ;
For Face = 0 < Zw3 ;
GoTo wsx MEMORY_FILE3 ;
Get D byte MEMORY_FILE3 ;
SavePos wsx MEMORY_FILE3 ;
GoTo QQQ MEMORY_FILE8 ;
Put D Byte MEMORY_FILE8 ;
SavePos QQQ MEMORY_FILE8 ;
Next Face ;
GoTo 0 MEMORY_FILE8 ;
set M Byte 0x4D ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x4D ;
Put M Byte MEMORY_FILE8 ;
Math M = Sum ;
Math M += 60 ;
Put M Long MEMORY_FILE8 ;
set M Byte 0x02 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x0A ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x03 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x3D ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x3D ;
Put M Byte MEMORY_FILE8 ;
Math M = Sum
Math M += 44 ;
Put M Long MEMORY_FILE8 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x40 ;
Put M Byte MEMORY_FILE8 ;
Math M = Sum
Math M += 38 ;
Put M Long MEMORY_FILE8 ;
set M Byte 0x64 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x72 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x61 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x67 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x6F ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x6E ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x6A ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x61 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x6E ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x41 ;
Put M Byte MEMORY_FILE8 ;
Math M = Sum
Math M += 22 ;
Put M Long MEMORY_FILE8 ;
Set M Byte 0x10 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x41 ;
Put M Byte MEMORY_FILE8 ;
Math M = Snake ;
Math M += 8 ;
Put M Long MEMORY_FILE8 ;
Math M = VertexNumber ;
Put M Short MEMORY_FILE8 ;
Math JumpJump = Snake ;
Math JumpJump += 52 ;
GoTo JumpJump MEMORY_FILE8 ;
set M Byte 0x20 ;
Put M Byte MEMORY_FILE8 ;
set M Byte 0x41 ;
Put M Byte MEMORY_FILE8 ;
Math M = FaceNumber ;
Math M *= 8 ;
Math M += 8 ;
Put M Long MEMORY_FILE8 ;
Math M = FaceNumber ;
Put M Short MEMORY_FILE8 ;
Get purpledragon ASIZE MEMORY_FILE8 ;
Get name FILENAME 0 ;
string name += . ;
string name += Y ;
string name += .3ds ;
Log name 0 purpledragon MEMORY_FILE8 ;
Next Y ;
flarespire wrote:.ITF: http://www.mediafire.com/download/f0jb7 ... S_WING.ITF
chrrox wrote: ↑Sun Jun 09, 2013 7:52 pm try thisCode: Select all
from inc_noesis import * import noesis import rapi def registerNoesisTypes(): handle = noesis.register("Transformers 2004 PS2", ".VBIN") noesis.setHandlerTypeCheck(handle, t2004CheckType) noesis.setHandlerLoadModel(handle, t2004LoadModel) #see also noepyLoadModelRPG noesis.logPopup() return 1 NOEPY_HEADER = "FISH" #check if it's this type based on the data def t2004CheckType(data): bs = NoeBitStream(data) if len(data) < 16: return 0 if bs.readBytes(4).decode("ASCII").rstrip("\0") != NOEPY_HEADER: return 0 return 1 #load the model def t2004LoadModel(data, mdlList): ctx = rapi.rpgCreateContext() bs = NoeBitStream(data) rapi.rpgClearBufferBinds() return 1