Madagascar Render-ware Game , need to extract textures , !!HELP!!

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
HARVLAW_ORENGI
Posts: 6
Joined: Sun Apr 02, 2017 8:06 am

Madagascar Render-ware Game , need to extract textures , !!HELP!!

Post by HARVLAW_ORENGI »

So , i have extracted the character models using this Quick BMS script :

Code: Select all

log MEMORY_FILE1 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 ;
Get Q ASIZE 0 ;
Math number = 0 ;
For T = 0 < Q ;
Math number += 1 ;
findloc OFFSET string "\x16\x00\x02\x1C\x37\x00\x01\x00" 0 0 ;
If OFFSET = 0 ;
Math T = Q ;
Math T += 1 ;
ELSE ;
GoTo OFFSET 0 ;
SavePos start 0 ;
Math start -= 4 ;
GoTo start 0 ;
Get size Long 0 ;
Get d Long 0 ;
Put start Long MEMORY_FILE4 ;
EndIF ;
Next T ;
Get ssk ASIZE MEMORY_FILE4 ;
Math ssk /= 4 ;
Math deersun = 0 ;
For qmk = 1 To ssk ;
GoTo deersun MEMORY_FILE4 ;
Get deerstart Long MEMORY_FILE4 ;
SavePos deersun MEMORY_FILE4 ;
log MEMORY_FILE1 0 0 ;
log MEMORY_FILE2 0 0 ;
log MEMORY_FILE3 0 0 ;
log MEMORY_FILE5 0 0 ;
log MEMORY_FILE6 0 0 ;
Math Qprime = 0 ;
Math Qprimeprime = 0 ;
Math Qer = 0 ;
Math GG = 0 ;
Math YFYF = 0 ;
GoTo deerstart 0 ;
GoTo 0xC 0 SEEK_CUR ;
Get FaceNumber Long 0 ;
Get VertexNumber Long 0 ;
Get D Long 0 ;
SavePos qdeer 0 ;



For vcx = 1 To VertexNumber ;
GoTo qdeer 0 ;
Get Type1 Long 0 ;
Get Type2 Long 0 ;
SavePos qdeer 0 ;
GoTo Qer MEMORY_FILE6 ;
Put Type1 Long MEMORY_FILE6 ;
Put Type2 Long MEMORY_FILE6 ;
SavePos Qer MEMORY_FILE6 ;
Next vcx ;



For FFF = 1 To FaceNumber ;
GoTo qdeer 0 ;
Get Type1 Short 0 ;
Get Type2 Short 0 ;
Get Type3 Short 0 ;
Get Type4 Short 0 ;
SavePos qdeer 0 ;
GoTo YFYF MEMORY_FILE3 ;
Put Type1 Short MEMORY_FILE3 ;
Put Type4 Short MEMORY_FILE3 ;
Put Type2 Short MEMORY_FILE3 ;
Put 0 Short MEMORY_FILE3 ;
SavePos YFYF MEMORY_FILE3 ;
Next FFF ;






GoTo qdeer 0 ;
GoTo 0x18 0 SEEK_CUR ;
SavePos qdeer 0 ;



For V = 1 To VertexNumber ;
GoTo qdeer 0 ;
Get Type1 Long 0 ;
Get Type2 Long 0 ;
Get Type3 Long 0 ;
SavePos qdeer 0 ;
GoTo Qprime MEMORY_FILE2 ;
Put Type1 Long MEMORY_FILE2 ;
Put Type2 Long MEMORY_FILE2 ;
Put Type3 Long MEMORY_FILE2 ;
SavePos Qprime MEMORY_FILE2 ;
Next V ;






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 lion = vertexnumber ;
Math lion *= 0x14 ;
Math liger = facenumber ;
Math liger *= 0xa ;
Math total3ds = lion ;
Math total3ds += liger ;
Math total3ds += 0x89 ;
Math total1 = total3ds ;
Math total1 -= 0x10 ;
Math total2 = total3ds ;
Math total2 -= 0x54 ;
Math total3 = total3ds ;
Math total3 -= 0x5E ;
Math vertexbase = 0x6c ;
Math WHEREvertex = vertexbase ;
Math tigervertex = vertexnumber ;
Math tigervertex *= 0xc ;
Math facebase1 = vertexbase ;
Math facebase1 += tigervertex ;
Math tigerface = facenumber ;
Math tigerface *= 0x8 ;
Math tigertigerface = facenumber ;
Math tigertigerface *= 0xa ;
Math facebase2 = facebase1 ;
Math facebase2 += 0x8 ;
Math WHEREface = facebase2 ;
Math facebase3 = facebase2 ;
Math facebase3 += tigerface ;
Math tigertigertigerface = facenumber ;
Math tigertigertigerface *= 0x2 ;
Math weretiger = tigertigerface ;
Math weretiger += 0x15 ;
Math tiger1 = tigervertex ;
Math tiger1 += 0x8 ;
Math tiger4 = tigertigertigerface ;
Math tiger4 += 0xd ;
Math WHEREfacecount = facebase3 ;
Math WHEREfacecount += 0xd ;
Math uvbase = WHEREfacecount ;
Math uvbase += tigertigertigerface ;
Math tigon = tigerface ;
Math tigon += 0x8 ;
Math WHEREuv = uvbase ;
Math WHEREuv += 0x8 ;
Math WHEREvertexq = WHEREvertex ;
Math WHEREuvq = WHEREuv ;
Math WHEREfaceq = WHEREface ;
Math WHEREfacecountq = WHEREfacecount ;
log MEMORY_FILE1 0 total3ds ;
Math vertexstart = 0 ;
Math facestart = 0 ;
Math uvstart = 0 ;


set M Byte 0x4d ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x4d ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xed ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x22 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x01 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x02 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x0a ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x03 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x3d ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x3d ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xdd ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x22 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x01 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xff ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xaf ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x3e ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xa0 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x0b ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x4e ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x6f ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x6e ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x65 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x10 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xa0 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x0f ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x11 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x09 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x20 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xa0 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x0f ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x11 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x09 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xcc ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xcc ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xcc ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x30 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xa0 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x0f ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x11 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x09 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xff ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xff ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0xff ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x40 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x99 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x22 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x01 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x64 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x69 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x6x ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x41 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x8f ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x22 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x01 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x10 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x41 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x64 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x67 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x00 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x9d ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x08 ;
Put M Byte MEMORY_FILE1 ;
GoTo 0x2 MEMORY_FILE1 ;
Put total3ds Long MEMORY_FILE1 ;
GoTo 0x12 MEMORY_FILE1 ;
Put total1 Long MEMORY_FILE1 ;
GoTo 0x56 MEMORY_FILE1 ;
Put total2 Long MEMORY_FILE1 ;
GoTo 0x60 MEMORY_FILE1 ;
Put total3 Long MEMORY_FILE1 ;
GoTo 0x66 MEMORY_FILE1 ;
Put tiger1 Long MEMORY_FILE1 ;
GoTo 0x6A MEMORY_FILE1 ;
Put vertexnumber Short MEMORY_FILE1 ;
GoTo facebase1 MEMORY_FILE1 ;
set M Byte 0x20 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x41 ;
Put M Byte MEMORY_FILE1 ;
Put weretiger Long MEMORY_FILE1 ;
Put facenumber Short MEMORY_FILE1 ;
GoTo facebase3 MEMORY_FILE1 ;
set M Byte 0x30 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x41 ;
Put M Byte MEMORY_FILE1 ;
Put tiger4 Long MEMORY_FILE1 ;
set M Byte 0x4e ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x6f ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x6e ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x65 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x0 ;
Put M Byte MEMORY_FILE1 ;
Put facenumber Short MEMORY_FILE1 ;
GoTo uvbase MEMORY_FILE1 ;
set M Byte 0x40 ;
Put M Byte MEMORY_FILE1 ;
set M Byte 0x41 ;
Put M Byte MEMORY_FILE1 ;
Put tigon Long MEMORY_FILE1 ;
Put vertexnumber Short MEMORY_FILE1 ;
For vwolf = 1 To vertexnumber ;
GoTo vertexstart MEMORY_FILE2 ;
Get Type1 Long MEMORY_FILE2 ;
Get Type2 Long MEMORY_FILE2 ;
Get Type3 Long MEMORY_FILE2 ;
SavePos vertexstart MEMORY_FILE2 ;
GoTo WHEREvertexq MEMORY_FILE1 ;
Put Type1 Long MEMORY_FILE1 ;
Put Type2 Long MEMORY_FILE1 ;
Put Type3 Long MEMORY_FILE1 ;
SavePos WHEREvertexq MEMORY_FILE1 ;
Next vwolf ;
For fwolf = 1 To facenumber ;
GoTo facestart MEMORY_FILE3 ;
Get Type1 short MEMORY_FILE3 ;
Get Type2 short MEMORY_FILE3 ;
Get Type3 short MEMORY_FILE3 ;
Get Type4 short MEMORY_FILE3 ;
SavePos facestart MEMORY_FILE3 ;
GoTo WHEREfaceq MEMORY_FILE1 ;
Put Type1 short MEMORY_FILE1 ;
Put Type2 short MEMORY_FILE1 ;
Put Type3 short MEMORY_FILE1 ;
Put Type4 short MEMORY_FILE1 ;
SavePos WHEREfaceq MEMORY_FILE1 ;
Next fwolf ;
For uvwolf = 1 To vertexnumber ;
GoTo uvstart MEMORY_FILE6 ;
Get Type1 Long MEMORY_FILE6 ;
Get Type2 Long MEMORY_FILE6 ;
SavePos uvstart MEMORY_FILE6 ;
GoTo WHEREuvq MEMORY_FILE1 ;
Put Type1 Long MEMORY_FILE1 ;
Put Type2 Long MEMORY_FILE1 ;
SavePos WHEREuvq MEMORY_FILE1 ;
Next uvwolf ;
For fcwolf = 0 < facenumber ;
GoTo WHEREfacecountq MEMORY_FILE1 ;
Put fcwolf short MEMORY_FILE1 ;
SavePos WHEREfacecountq MEMORY_FILE1 ;
Next fcwolf ;
Get purpledragon ASIZE MEMORY_FILE1 ;
Math name = qmk ;
string name += .3ds ;
Log name 0 purpledragon MEMORY_FILE1 ;
Next qmk ;


and now i need a script for extracting the textures from ether the .DFF or .STREAM files (in BMP or PNG FORMAT)
please can someone write me a script for this and i will give them credit if i use these textures in any of my mods

the game engine is Render-Ware

and here is a Madagascar DFF and STREAM so you know what your doing : http://www.mediafire.com/file/3nw191c9dd0cdwh/dff_and_stream.rar/file

thanks :D
Liddius
Posts: 10
Joined: Tue Aug 14, 2018 10:36 pm

Re: Madagascar Render-ware Game , need to extract textures , !!HELP!!

Post by Liddius »

Hi,

You can use the QuickBms script I attached to open the .STREAM file. (the script comes from this post by the way remember ? lol => viewtopic.php?t=4126 )

So, I think, the .dff is a 3d model that you can open with a script for 3ds max :

https://gtaforums.com/topic/838479-dff- ... r-3ds-max/

The .stream containts many files, animations, skyboxes, models and some .txd files that surely textures, I tried some tools like MagicTxd, Txd san andreas and some others but can't seem to open it, however, you should be able to find the texutres with "TextureFinder".