Join also our Discord channel! Click here.

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: 44 times

The Surge .toc/.dat

Post by spider91 » Tue May 16, 2017 11:50 am

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: 2916
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 744 times
Been thanked: 1500 times

Re: The Surge .toc/.dat

Post by shakotay2 » Sat Jul 22, 2017 11:05 pm

thx!
char_hero_civil.jpg
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

lapdragon
beginner
Posts: 30
Joined: Mon Dec 27, 2010 9:24 pm
Been thanked: 4 times

Re: The Surge .toc/.dat

Post by lapdragon » Thu Aug 10, 2017 10:38 am

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