Page 1 of 1

Quick BMS Parser difficulties (text string to text string)

Posted: Mon Sep 30, 2013 10:38 am
by ReeceMix
Looking at the 'quick bms guide' post viewtopic.php?f=29&t=3525
I am a beginner and im getting the hang of my HEX model exploration but this tutorial doesnt make logical sence and it seems like the conclusions reached are without proper explanation. This tutorial doesnt work for my model file, possibibly due to its multiple headers. My model file has a PAKS header then an IPAC header then a HRCM header and then repeated HRCM (hrcm being the start of the model file)

I just need a way to parse the files from one HRCM text string to the next, using quick BMS

I can manually select bookmark and extract data manually with Hexworkshop, but Its time consuming , I spent about 5 hours ripping 131 files yesterday that quickbms could have done in seconds.

Re: Quick BMS Parser difficulties (text string to text strin

Posted: Mon Sep 30, 2013 2:57 pm
by aluigi
I guess you mean something like the following, remember to replace the 2 occurrencies of "NGCA" with "HRCM":
http://aluigi.org/papers/bms/_findloc.bms

Re: Quick BMS Parser difficulties (text string to text strin

Posted: Mon Oct 07, 2013 1:10 pm
by ReeceMix
aluigi wrote:I guess you mean something like the following, remember to replace the 2 occurrencies of "NGCA" with "HRCM":
http://aluigi.org/papers/bms/_findloc.bms
Worked great Thank you, I can rename the .Dat files that are output ,but what would I add to get it to output a defined extension (.abc)?

Re: Quick BMS Parser difficulties (text string to text strin

Posted: Mon Oct 07, 2013 2:53 pm
by aluigi
the only way is building the name by hand:

Code: Select all

findloc OFFSET string "HRCM"
math i = 0
do
    goto OFFSET
    get DUMMY long
    findloc NEXT_OFFSET string "HRCM" 0 ""
    if NEXT_OFFSET == ""
        get SIZE asize
    else
        math SIZE = NEXT_OFFSET
    endif
    math SIZE -= OFFSET
    string NAME p= "%08x.abc" i
    log NAME OFFSET SIZE
    math i += 1
    math OFFSET = NEXT_OFFSET
while NEXT_OFFSET != ""

Re: Quick BMS Parser difficulties (text string to text strin

Posted: Mon Oct 14, 2013 10:18 am
by ReeceMix
Not sure what you mean by 'rebuilding by hand', this code outputs files as 00000000.dat, 0000000a.dat etc. It would be useful if i could define a prefix and the extension output. I used to have a mass renamer program that could change the extension, supid windows wont do it and I cant believe that BMS doesnt have a line of text to do it.

Re: Quick BMS Parser difficulties (text string to text strin

Posted: Mon Oct 14, 2013 11:05 am
by aluigi
the script I pasted in my previous post dumps sequential files with abc extension, not dat.

Re: Quick BMS Parser difficulties (text string to text strin

Posted: Tue Oct 22, 2013 2:22 pm
by ReeceMix
Ah thankyou again , It didnt work the first time because i was using an ancient version of QuickBms