Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Rebel Raiders: Operation Nighthawk (PS2)

Featured Replies

  • Author
  • Localization

AlphaTwentyThree, posted Mon Jul 27, 2015 3:44 pm (6654)


Hi there!

Here's a really easy task for you: Extract the DATA.BAG from the above game - http://*USE_ANOTHER_FILEHOSTING*/452a45a ... d4/DATA.7z. I thought I understood the folder structure but I cancelled after the 20th try to get it right. So... could somebody quickly write a correct script for the file? That'd be great! :)
Thanks in advance.
  • Author
  • Localization

aluigi, posted Mon Jul 27, 2015 8:07 pm (6658)


Oh no thanks, that directory tree is senseless.
  • Author
  • Localization

AlphaTwentyThree, posted Tue Jul 28, 2015 8:35 am (6662)


It isn't as complicated as it may look. Starting at 0x13a0304c:
Leave out the first 0x30 bytes, that's the root folder with no name
The structure is as follows:
0x20 bytes - file name or folder name
4 bytes - identifier: 0xffffffff = last file in folder = next name is a folder name = reset FOLDER to "" (automatically set the next name as new folder in the next step); anything else = file id, not needed
4 bytes - zero
4 bytes - offset OR 0xffffffff
4 bytes - size OR 0xffffffff
both offset and size 0xffffffff means that there's a subfolder in the current folder
only size 0xffffffff means that the current folder is the last subfolder and the next name is a file

Somehow I'm too dumb to write this into a script. :\
  • Author
  • Localization

AlphaTwentyThree, posted Wed Jul 29, 2015 10:43 am (6675)


Well, it's more complicated than I thought... I couldn't figure out when a folder is contained inside an upper branch folder but the files are in their according folder. So, some of the folders that are extracted belong inside another folder, like "english", "french" and so on belong into "text/" but hey, it's an effort.
Code:
get UNK long
get ENTRIES long # including folders
get TOC_OFF long

math ENTRIES -= 1 # skip the root folder
math TOC_OFF = 0x30 # first "file" is the root directory -> skip that
goto TOC_OFF
set FOLDER ""
set NXTFOLDER 0
for i = 1 <= ENTRIES
   getDstring NAME 0x20
   get LAST long
   get ZERO long
   get OFFSET long
   get SIZE long
   if FOLDER == "/" # next folder in root dir, NEVER file
      string FOLDER p= "%s" NAME      
   else
      if OFFSET != 0xffffffff
         if NXTFOLDER == 1
            string FOLDER p= "%s/%s" FOLDER NAME
            set NXTFOLDER 0
         else
            string NAME p= "%s/%s" FOLDER NAME
            log NAME OFFSET SIZE
            #print "%i% - %NAME%"
         endif
      else
         if NXTFOLDER == 1
            string FOLDER p= "%s/%s" FOLDER NAME
            set NXTFOLDER 0
         endif
      endif
   endif
   if SIZE == 0xffffffff
      set NXTFOLDER 1
   endif
   if LAST == 0xffffffff
      if OFFSET != 0xffffffff # only if current is file, no folder
         set FOLDER "/"
      endif
   endif
next i
  • Author
  • Localization

aluigi, posted Thu Jul 30, 2015 9:11 am (6692)


I hate you.
I just found that already existed a script for this game but I don't understand why both you and I didn't check it on my website...
http://aluigi.org/papers/bms/others/rebel_raiders.bms

Anyway I wrote also a new script from scratch with a different method but I don't know what of them is the best:
http://aluigi.org/papers/bms/others/reb ... rs_alt.bms
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.