Important information: this site is currently scheduled to go offline indefinitely by end of the year.

The Surge .toc/.dat

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
spider91
advanced
Posts: 78
Joined: Mon Feb 14, 2011 8:09 am
Has thanked: 18 times
Been thanked: 45 times

The Surge .toc/.dat

Post by spider91 »

Code: Select all

comtype lz4f
endian big
goto 0x5A
get DAT_NAME_SIZE short
getdstring DAT_NAME DAT_NAME_SIZE
string DAT_NAME += "_"
xmath ZERO_SIZE "4 - (DAT_NAME_SIZE % 4)"
if ZERO_SIZE < 4
	getdstring DUMMY ZERO_SIZE
endif
get DATS byte
get FILES long
math DAT_INDEX = -1
for i = 0 < FILES
	getdstring DUMMY 0x0E
	get NAME_SIZE short
	getdstring NAME NAME_SIZE
	xmath ZERO_SIZE "4 - (NAME_SIZE % 4)"
	if ZERO_SIZE < 4
		getdstring DUMMY ZERO_SIZE
	endif
	get OFFSET long
	if OFFSET == 0
		math DAT_INDEX += 1
		string NAME_INDEX p= "%01d" DAT_INDEX
		set NEW_DAT_NAME string DAT_NAME
		string NEW_DAT_NAME += NAME_INDEX
		string NEW_DAT_NAME += ".dat"
		open FDSE NEW_DAT_NAME 1
	endif
	get ZSIZE long
	get SIZE long
	getdstring DUMMY 0x0A
	clog NAME OFFSET ZSIZE SIZE 1
next i
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4285
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1147 times
Been thanked: 2242 times

Re: The Surge .toc/.dat

Post by shakotay2 »

thx!
char_hero_civil.jpg
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
lapdragon
beginner
Posts: 30
Joined: Mon Dec 27, 2010 9:24 pm
Been thanked: 4 times

Re: The Surge .toc/.dat

Post by lapdragon »

Is there any chance I could get one of you wonderful people to figure out how to decompress/decompile The Surge's .bin files?
Linked is a rar with the lot of them (it's not very big, only like 9mb).

https://www.dropbox.com/s/b3r4k9uxg64ql ... n.rar?dl=0
Post Reply