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.

Quake 2 Demo .PACK file help (new to QuickBMS)

Featured Replies

  • Author
  • Localization

beastedot9, posted Mon Mar 07, 2016 5:01 pm (11837)


Hello everyone, I am currently trying to learn quickbms and following the tutorial here: http://wiki.xentax.com/index.php?title=DGTEFF

At the end it requires you to analyse the pak0 file from Q2 demo and this is my script for it so far:

Code:
idstring "PACK"
get BASE_OFF long
get ArchiveSize long
goto BASE_OFF
set NUM_OF_FILES 1106

for i = 1    getdstring NAME 0x10
   get OFFSET long
   get SIZE long
   goto OFFSET
log NAME OFFSET SIZE
next i


It just stays at offset 0 and extracts a bunch of files so I'm really not sure where I'm going wrong with this. If anyone could take the time to help, I'd really appreciate it.

The file in question: https://mega.nz/#!MhhTiBrS!Ng_xeSoYMKLd ... 6uunA559H8

Thank you for reading :)
  • Author
  • Localization

aluigi, posted Mon Mar 07, 2016 5:13 pm (11839)


1) The length of the names is 0x38 bytes.
2) Remove "goto OFFSET"

To retrieve the number of files there are some solutions (ASIZE is meant to be get ASIZE asize):
1) FILES = (ASIZE - BASE_OFF) / (0x38 4 4)
2) for BASE_OFF = BASE_OFF != ASIZE
3)
for
savepos TMP
if TMP == ASIZE
break
endif
...
3) endless loop till you get the read error that you can ignore
  • Author
  • Localization

beastedot9, posted Mon Mar 07, 2016 5:38 pm (11840)


Thank you, I managed to get my first script done thanks to your help :)

Seems I overlooked a few things. If you don't mind me asking, did you document the commands that can be done with quickbms as I'd like to keep them handy for reference purposes during writing scripts. Thank you again for your help and quickbms itself :)

Edit: Nevermind found it in the txt file.
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.