fsbext - Take filenames from TOC
-
- Posts: 654
- Joined: Mon Oct 27, 2014 1:49 pm
fsbext - Take filenames from TOC
Hello. I have the game Avatar: The Last Airbender: The Burning Earth (PS2) which has FSB archives for audio but also TOC files which contain the FSB musc filenames. Unfortunately, FSBExt extracts the files without the filenames. Is there any way to take the TOC to apply filenames? Thanks in advance.
Last edited by Mygoshi on Wed Feb 17, 2021 5:56 pm, edited 1 time in total.
-
- Posts: 561
- Joined: Tue Oct 13, 2015 1:26 pm
Re: FSBExt - Take filenames from TOC
Upload some file sample.
-
- Posts: 654
- Joined: Mon Oct 27, 2014 1:49 pm
Re: FSBExt - Take filenames from TOC
Sorry?
Last edited by Mygoshi on Wed Feb 17, 2021 5:56 pm, edited 2 times in total.
-
- Posts: 561
- Joined: Tue Oct 13, 2015 1:26 pm
Re: FSBExt - Take filenames from TOC
You need be specific with what you want to do and how or everyone will just ignore this thread.
You want get FileName from TOC... OK
Are looking for a BMS statement which do that... ?!?
You want get FileName from TOC... OK
Are looking for a BMS statement which do that... ?!?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: FSBExt - Take filenames from TOC
@Mygoshi
eh??? An option for a tool based on a specific format (fsb) for taking filenames from a custom "toc" format used by a specific game?
And without samples too, oh sure
eh??? An option for a tool based on a specific format (fsb) for taking filenames from a custom "toc" format used by a specific game?
And without samples too, oh sure
-
- Posts: 654
- Joined: Mon Oct 27, 2014 1:49 pm
Re: FSBExt - Take filenames from TOC
I always provide samples.
Here is FSB https://mega.nz/#!GsFUgIxA!4RWDbZ2qt5Hv ... dqZd2j9_AY
Here is TOC https://mega.nz/#!z8tRGRyQ!-4_W7SEktn-y ... f26zOdO5iA
Here is FSB https://mega.nz/#!GsFUgIxA!4RWDbZ2qt5Hv ... dqZd2j9_AY
Here is TOC https://mega.nz/#!z8tRGRyQ!-4_W7SEktn-y ... f26zOdO5iA
Last edited by Mygoshi on Sat Mar 24, 2018 7:49 pm, edited 1 time in total.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: FSBExt - Take filenames from TOC
This script parses the toc file and you can redirect the output to a bat file:
quickbms script.bms c7_level_static_wbsdvd.toc > run.bat
Code: Select all
idstring "ctbw"
get NUM long
get NAMESZ byte
getdstring NAME NAMESZ
get FILES long
for i = 0 < FILES
get NAMESZ byte
getdstring NAME NAMESZ
get DUMMY long # 0 or 1
get TSTAMP long
get FREQ long
string TMP p "move %08x.dat.ss2 %s.ss2" i NAME
print "%TMP%"
next i
-
- Posts: 654
- Joined: Mon Oct 27, 2014 1:49 pm
Re: FSBExt - Take filenames from TOC
Thank you very much!
Last edited by Mygoshi on Wed Feb 17, 2021 5:58 pm, edited 2 times in total.
-
- Posts: 654
- Joined: Mon Oct 27, 2014 1:49 pm
Re: FSBExt - Take filenames from TOC
How to adapt it for multiple files please?
Last edited by Mygoshi on Wed Feb 17, 2021 6:02 pm, edited 2 times in total.
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: FSBExt - Take filenames from TOC
I give you an example that you can personalize as you wish.
Original string:
New string:
It's just text so it's easy to adapt it to your needs.
Original string:
Code: Select all
string TMP p "move %08x.dat.ss2 %s.ss2" i NAME
New string:
Code: Select all
get TOC_NAME basename
string TMP p "move %s%08x.dat.ss2 %s%s.ss2" TOC_NAME i TOC_NAME NAME