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.

Need update to *.tor bms script

Featured Replies

  • Author
  • Localization

Acewell, posted Sat Jan 09, 2016 4:13 am (10783)


Chrrox posted this script on Xentax years ago to extract the files from the beta SWTOR tor archives but it errors out on line 16 with current tor files.
http://forum.xentax.com/viewtopic.php?p=57937#p57937

local copy of script
Code:
goto 0xC
get ftable long
goto 0x18
get files long
goto ftable
for i = 0    get unk01 long
   get unk02 long
   get unk03 long
   get offset long
   get null01 long
   get null02 long
   get zsize long
   get size long
   get unk04 short
   clog "" offset zsize size
next i


here is a small tor sample to test the script


EasyMYP is what we normally use to extract the files from tor archives but some people aren't able to extract the gr2 model files with it any more for some reason and this is the only other solution to getting those files extracted.

Any help is appreciated! :D


edit
ok since chrrox says tor files are zlib compressed i figured offzip will work and i was able to extract 229 files from the sample like this
offzip.exe -a swtor_main_zed_1.tor C:\offzip\extracted_files 0

i'd still like to see that script work though :(
  • Author
  • Localization

Acewell, posted Wed Sep 20, 2017 4:01 am (26631)


updated script based on a newer sample i have :)
Code:
# Star Wars - The Old Republic MYP
# script for QuickBMS http://quickbms.aluigi.org

idstring "MYP\0"
get VERSION long
get UNK long
get TABLE_OFFSET longlong
get MAX_FILES_PER_TABLE long
get TOTAL_FILES long
goto TABLE_OFFSET
do
   get FILES long
   if FILES == 0
      break
   endif
   get NEXT_TABLE_OFF longlong
   for i = 0       get OFFSET longlong
      if OFFSET == 0
         break
      endif
      get HEADER_SZ long
      get ZSIZE long
      get SIZE long
      get NAME_HASH long
      get NAME_HASH2 long
      get DATA_HASH long
      get COMP_TYPE short
      savepos TMP
      goto OFFSET
      get DATA_TYPE short
      get DATA_OFF short
      goto DATA_OFF 0 SEEK_CUR
      savepos OFFSET
      string NAME p "x_xx.dat" DATA_HASH NAME_HASH2 NAME_HASH
      if COMP_TYPE == 0
         log NAME OFFSET SIZE
      else
         clog NAME OFFSET ZSIZE SIZE
      endif
      goto TMP
   next i
   goto NEXT_TABLE_OFF
while NEXT_TABLE_OFF != 0
  • Author
  • Localization

aluigi, posted Wed Sep 20, 2017 11:01 am (26641)


Cool
  • Author
  • Localization

AlphaTwentyThree, posted Mon Jan 10, 2022 6:01 am (68954)


And here it is with a type identifier and subfolder integrated (needed script attached):
Code:
include "func_getTYPE.bms"
get BNAME basename
idstring "MYP\0"
get VERSION long
get UNK long
get TABLE_OFFSET longlong
get MAX_FILES_PER_TABLE long
get TOTAL_FILES long
goto TABLE_OFFSET
do
   get FILES long
   if FILES == 0
      break
   endif
   get NEXT_TABLE_OFF longlong
   for i = 0 < FILES
      get OFFSET longlong
      if OFFSET == 0
         break
      endif
      get HEADER_SZ long
      get ZSIZE long
      get SIZE long
      get NAME_HASH long
      get NAME_HASH2 long
      get DATA_HASH long
      get COMP_TYPE short
      savepos TMP
      goto OFFSET
      get DATA_TYPE short
      get DATA_OFF short
      goto DATA_OFF 0 SEEK_CUR
      savepos OFFSET
      string NAME p "%s\x_xx" BNAME DATA_HASH NAME_HASH2 NAME_HASH
     putVarChr MEMORY_FILE SIZE 0
     log MEMORY_FILE 0 0
      if COMP_TYPE == 0
         log MEMORY_FILE OFFSET SIZE
      else
         clog MEMORY_FILE OFFSET ZSIZE SIZE
      endif
     callfunction getTYPE 1
     get SIZE asize MEMORY_FILE
     log NAME 0 SIZE MEMORY_FILE
      goto TMP
   next i
   goto NEXT_TABLE_OFF
while NEXT_TABLE_OFF != 0


Edit 10:17: more formats added to func_getTYPE.bms

func_getTYPE.bms

  • Author
  • Localization

AlphaTwentyThree, posted Mon Jan 10, 2022 6:19 am (68955)


I actually might be able to write a script for retrieving the original file names: inside the swtor_main_gamedata_1.tor there are tons of plain text files with the GUID and corresponding file name.
For example:
Code:

So I just need to extract
Code:
3298414624243712
epp.daily_area.oricon.shared.the_towers_core.boss.strike_2.tick_3

No idea when I'll get to it but it seems possible.
  • Author
  • Localization

AlphaTwentyThree, posted Mon Jan 10, 2022 8:36 am (68960)


Found another kind of archive inside the level TOR files:
Code:
get FILES long
get ZERO long
for i = 0 < FILES
   get NAME string
   get SIZE longlong
   get OFFSET longlong
   log NAME OFFSET SIZE
next i
  • Author
  • Localization

AlphaTwentyThree, posted Mon Jan 10, 2022 10:03 am (68967)


Added latest func_getTYPE.bms with more specific format, e.g. nodes and particles.
Searched for names high and low - looks like the is a lack of file names in those text files, so scrap that for now.
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.