Page 1 of 1

Captian Morgane and the golden turtle ".wr"

Posted: Mon Feb 06, 2017 6:06 pm
by Darkman234
The models use a .wr extension and would very much appreciate it if can anyone can lend a hand.

Re: Captian Morgane and the golden turtle ".wr"

Posted: Mon Feb 06, 2017 7:18 pm
by Acewell
your wr sample contains 1 dds texture and a binary compressed .x model file

this bms script will auto-split the files and auto-decompress the x file on the fly. :D

Code: Select all

goto 0xc
get TABLELEN long
goto 0x800
savepos BASEOFF
get NUMFILES long
for i = 0 < NUMFILES
	getdstring ID 4
	get OFFSET long
	math OFFSET + BASEOFF
	get SIZE long
	getdstring SKIP 0xc
	get NAMEOFF long
	savepos TMP
	math NAMEOFF + BASEOFF
	goto NAMEOFF
	get NAME string
	if ID == "D2XT"
		string NAME + ".dds"
		log NAME OFFSET SIZE
	elif ID == "SEMX"
		string NAME + ".x"
		set MEMORY_FILE binary "\x78\x6f\x66\x20\xAA\xAA\xBB\xBB\xCC\xCC\xCC\xCC\xDD\xDD\xDD\xDD"
		comtype mszip
		goto OFFSET
		get SKIP long
		get MAJORVERSION short
		get MINORVERSION short
		getdstring FORMATTYPE 0x4
		get FLOATSIZE long
		get DECOMPSIZE long
		math OFFSET + 0x18
		if FORMATTYPE == "tzip"
			math FORMATTYPE = 0x20747874 //"txt " 
		elif FORMATTYPE == "bzip"
			math FORMATTYPE = 0x206e6962 //"bin " 
		endif
		putVarChr MEMORY_FILE 0x4 MAJORVERSION short //AAAA
		putVarChr MEMORY_FILE 0x6 MINORVERSION short //BBBB
		putVarChr MEMORY_FILE 0x8 FORMATTYPE long //CCCCCCCC
		putVarChr MEMORY_FILE 0xc FLOATSIZE long //DDDDDDDD
		log NAME 0 0x10 MEMORY_FILE
		append
		clog NAME OFFSET SIZE DECOMPSIZE
	endif
	goto TMP
next i
Mabel.png

Re: Captian Morgane and the golden turtle ".wr"

Posted: Tue Feb 07, 2017 5:57 am
by Darkman234
Hmm..it seems everytime I run the script I get a "invalid command "formattype" or arguments at line 18. But I successfully extracted textures

Re: Captian Morgane and the golden turtle ".wr"

Posted: Sun Feb 12, 2017 3:08 am
by Acewell
no idea why you get that message, it works fine as you can see from the image.... :?

i updated my previous post with a better script to auto-split the files and auto-decompress the .x file :D
viewtopic.php?p=127327#p127327

Re: Captian Morgane and the golden turtle ".wr"

Posted: Tue Jan 02, 2018 9:49 am
by tone
how did you open the ,x files?
noesis gave runtime error: failed to construct model from rpgeo context
when i imported the .xfiles into blender, nothing showed up

Re: Captian Morgane and the golden turtle ".wr"

Posted: Tue Jan 02, 2018 8:34 pm
by Acewell
i used unwrap3d to open the extracted mabel.x file.
it is a paid program but has some high quality import/export plugins. :)