enderdrag64 Posted December 9, 2024 Share Posted December 9, 2024 Hi, I created this extraction script for the archives of the Aspyr PC port of Star Wars Bounty Hunter earlier today, hopefully it's useful to somebody. endian little idstring "BunyArchTheForge" get UNKNOWN longlong get UNKNOWNTWO longlong get UNKNOWNTHREE longlong get HEADERSIZE longlong get FILENAMETABLEADDR longlong get FILENAMETABLESIZE longlong get UNKNOWNADDR longlong get UNKNOWNSIZE longlong for i = 0 < HEADERSIZE / 40 get UNKNOWNFOUR longlong get UNKNOWNFIVE longlong get FILENAMEADDR long get FILENAMESIZE long get ADDRESS longlong get SIZE longlong savepos HEADERLOC xmath JUMPPTR "FILENAMETABLEADDR + FILENAMEADDR" goto JUMPPTR get FILENAME string goto HEADERLOC log FILENAME ADDRESS SIZE next i I would've attached it as a file but it seems .bms isn't an approved attachment format. This is my first post on this forum, please let me know if there's a better way to submit these, thanks! Link to comment Share on other sites More sharing options...
michalss Posted December 9, 2024 Share Posted December 9, 2024 Welcome. There is a download section specifically for BMS scripts and other applications. In here you should only put link to it.. https://reshax.com/forum/28-scripts-or-other-utilities/ 1 Link to comment Share on other sites More sharing options...
spider91spider91 Posted January 13 Share Posted January 13 comtype "ZSTD" idstring "BunyArchTheForge" goto 0x20 get TOC_OFF longlong get TOC_SIZE longlong get NAMES_OFF longlong get NAMES_SIZE longlong get TOC2_OFF longlong get TOC2_SIZE longlong xmath FILES "TOC_SIZE / 0x28" putVarChr MEMORY_FILE NAMES_SIZE 0 log MEMORY_FILE 0 0 log MEMORY_FILE NAMES_OFF NAMES_SIZE for i = 0 < FILES get TYPE longlong get SIZE longlong get NAME_OFF long get NAME_SIZE long get OFFSET longlong get ZSIZE longlong savepos POS goto NAME_OFF MEMORY_FILE getdstring NAME NAME_SIZE MEMORY_FILE if ZSIZE == SIZE log NAME OFFSET SIZE else goto OFFSET getdstring DUMMY 0x10 get NUM long math NUM *= 0x08 math OFFSET += 0x18 math ZSIZE -= 0x18 math OFFSET += NUM math ZSIZE -= NUM if ZSIZE == SIZE log NAME OFFSET SIZE else clog NAME OFFSET ZSIZE SIZE endif endif goto POS next i Here is a full script to extract buny files. Link to comment Share on other sites More sharing options...
spider91spider91 Posted January 13 Share Posted January 13 open FDDE "buny" 0 comtype "ZSTD" idstring "BunyArchTheForge" goto 0x20 get TOC_OFF longlong get TOC_SIZE longlong get NAMES_OFF longlong get NAMES_SIZE longlong get TOC2_OFF longlong get TOC2_SIZE longlong xmath FILES "TOC_SIZE / 0x28" putVarChr MEMORY_FILE NAMES_SIZE 0 log MEMORY_FILE 0 0 log MEMORY_FILE NAMES_OFF NAMES_SIZE get FNAME filename for i = 0 < FILES savepos TOC_OFF get TYPE longlong get SIZE longlong get NAME_OFF long get NAME_SIZE long get OFFSET longlong get ZSIZE longlong savepos POS goto NAME_OFF MEMORY_FILE getdstring NAME NAME_SIZE MEMORY_FILE open FDSE NAME 1 CHECK if CHECK == 1 get NEW_SIZE asize 1 get NEW_OFFSET asize 0 append log FNAME 0 NEW_SIZE 1 append goto TOC_OFF put 0x00 longlong put NEW_SIZE longlong get DUMMY longlong put NEW_OFFSET longlong put NEW_SIZE longlong endif goto POS next i Script for packing new/modified files to .buny archives (not reimport!). Requires -w option for quickbms. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now