The Forum is up for sale: XeNTaX Forum looking for new owner

TurnTool (web format)

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
User avatar
Chipicao
ultra-veteran
ultra-veteran
Posts: 476
Joined: Thu Feb 03, 2011 11:18 am
Has thanked: 42 times
Been thanked: 305 times
Contact:

TurnTool (web format)

Post by Chipicao »

About TurnTool: http://turntool.com/
Example: http://configurator.atlant-m.kiev.ua/
Sample: http://configurator.atlant-m.kiev.ua/fi ... rtline.tnt
Script:

Code: Select all

idstring "TNT\x01\x01\x00\x00"	#could be flags or counters
idstring "TRAW\x00"
get headSize long		#or maybe data offset in case of multiple TRAW sections?

get numFiles long
for i = 0 < numFiles
	get strLen short	#strings are null delimited anyway
	get fileName STRING
	get fileOffset long
	get fileSize long
	savepos nextFile

	goto fileOffset
	idstring "PAC\x00"
	get SIZE long
	savepos OFFSET
	math fileSize -= 0x08
	clog fileName OFFSET fileSize SIZE
	goto nextFile
next i
This is my first and only quickbms script, so if anyone has any suggestions I'm all ears.

After extraction, 2 types of files stand out:
- T3D: mesh data with vertices and face indices "in plain view"
- T2D: one or more JPEG textures
Last edited by Chipicao on Wed Feb 26, 2014 11:40 am, edited 1 time in total.
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
User avatar
aluigi
VVIP member
VVIP member
Posts: 1916
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 661 times
Contact:

Re: TurnTool (web format)

Post by aluigi »

Regarding the script syntax it's ok, the only suggestion I can give is to use DUMMY variables for unknown fields instead of goto.
For example "goto 0x1 0 SEEK_CUR" -> "get DUMMY byte"
And if there are more bytes but they can't be idenfied as a field, for example a sequence of 5 bytes, you can use "getdstring DUMMY 5".
In idstring you can use also C strings so if the signature is "PAC" followed by a 0x00 byte, you can use idstring "PAC\0" or "PAC\x00"
User avatar
Chipicao
ultra-veteran
ultra-veteran
Posts: 476
Joined: Thu Feb 03, 2011 11:18 am
Has thanked: 42 times
Been thanked: 305 times
Contact:

Re: TurnTool (web format)

Post by Chipicao »

Thanks, that helped a lot.
I edited the script with your suggestions.
Please post any requests or issues with my tools in the appropriate topics.
I'm sorry if I don't reply or if I ignore PMs. My time is very limited.
Post Reply