Trying to modify knowledge_adventure.bms to work with subdirectories

Doubts, help and support about QuickBMS and other game research tools
HeadsetGuy
Posts: 2
Joined: Mon Jan 07, 2019 5:10 am

Trying to modify knowledge_adventure.bms to work with subdirectories

Post by HeadsetGuy »

Hello,

I have two Knowledge Adventure archives (JSKR from JumpStart Kindergarten Reading, and TREE from My First Encyclopedia). When trying to run knowledge_adventure.bms on them, it extracts the files that should be in the root directory, but instead it extracts them to whatever the last subdirectory was that it found. It also does not extract any files from other subdirectories at all, or even name them.

Example: In JSKR, It extracts ARROW.CMP, CLUEFLOW.TXT, DEFAULT.FNT, JSKR.CMP, MAKEFILE, START.DNA, START.INF, START.PAC, and TITLE.TXT. These should be extracted directly to the directory I'm trying to extract them to; instead, it extracts them into "SI". It does nothing with the other directories (AA, AC, BA, BC, CA, CC, etc.).

I know where the problem is, but I don't know how to (completely) fix it. I moved this line to an "else" following the directory flags:

Code: Select all

set PATH string ""


and that was able to extract the files at the root to the root, and create the subdirectories (with files containing the data also having the same name), but it couldn't do anything else. Incidentally, in the original version, that line was put before the "for" loop, but a different line was put within it:

Code: Select all

set PATH string NAME


so that's why it puts the files in the last directory it found.

As for extracting all the files to their proper directories, I'm stumped at this point. I've attached my modified script here.

Here is a link to a 7Z file containing both archives: https://www.dropbox.com/s/i7yj0oqgnaqcf ... kr.7z?dl=0

Thanks in advance for any help.

-Johnny
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Trying to modify knowledge_adventure.bms to work with subdirectories

Post by aluigi »

Script 0.3 with full directory parsing:
http://aluigi.org/bms/knowledge_adventure.bms

In my opinion there are probably 2 types of formats because this one didn't use . and .. like the one I checked before.
HeadsetGuy
Posts: 2
Joined: Mon Jan 07, 2019 5:10 am

Re: Trying to modify knowledge_adventure.bms to work with subdirectories

Post by HeadsetGuy »

Thank you so much! Yes, I think there are 2 types.