Star Wars: Galactic Battlegrounds (*.DRS)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Acewell
Posts: 706
Joined: Fri Aug 08, 2014 1:06 am

Star Wars: Galactic Battlegrounds (*.DRS)

Post by Acewell »

i saw there was a MultiEx bms script for these archives here
http://wiki.xentax.com/index.php/Star_W ... tlegrounds

and i finally got my hands on this games drs archives and made an improved bms script for kicks :D

Code: Select all

#Star Wars Galactic BattleGrounds (DRS archives)

idstring "Copyright"
goto 0x4c
get numTypes long
get baseOffset long
for i = 0 < numTypes
   get skip byte
   getdstring ext 3
   string ext r ext
   get typeOffset long
   get FILES long
   savepos TMP
   goto typeOffset
   for j = 0 < FILES
      get NAME long
      get OFFSET long
      get SIZE long
      string NAME + "."
      string NAME + ext
      log NAME OFFSET SIZE
   next j
   goto TMP
next i


there is also "DRS viewer" that is probably the better choice to use anyway here that can open the drs archives and view/extract the contents
http://www.moddb.com/games/star-wars-ga ... ding-tools
http://swgb.heavengames.com/downloads/s ... V3ZXIiO319

the "DRS viewer" tool from heavengames comes with a "Descriptions.dsc" file that can give some
files a proper name, i just need to find a way to link that file to the bms script and it will be complete :D
Last edited by Acewell on Thu Mar 16, 2017 1:18 pm, edited 3 times in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Star Wars: Galactic Battlegrounds (*.DRS)

Post by aluigi »

Can you provide a drs archive?
That extension field must be probably handled in this way (just guessing from the weird way in which it's built):
get EXT long
reverselong EXT
string EXT = EXT

That description.dsc is just a sequence of names and there are no CRC/DUMMY fields in the format you wrote there so I suspect that the name must be simply read sequentially from that file, don't know how many archives exist.
Acewell
Posts: 706
Joined: Fri Aug 08, 2014 1:06 am

Re: Star Wars: Galactic Battlegrounds (*.DRS)

Post by Acewell »

aluigi wrote:just guessing from the weird way in which it's built

weird but works :P
i saw that reverselong thing in quickbms.txt and tried it but kept getting an integer instead of string, i guess this is what fixes that ?

Code: Select all

string EXT = EXT

the way it is now though makes the "bin" extension consistent with what i see in the DRS viewer, "bin" instead of "bina"

The Descriptions.dsc file has a number at the beginning of each line before the first "@" symbol, that number
corresponds with the numbered name given to the file stored in the DRS from the bms script so,
6.slp from GRAPHICS.DRS corresponds with the first line in Descriptions.dsc
6@0@0@0@GE | RGL | AIRBASE

i'm thinking the name could be formatted like GE_RGL_AIRBASE.slp and that should alleviate any naming conflict with other files
so 6.slp = GE_RGL_AIRBASE.slp

none of this is a big deal though, was just something fun to do :D
here is the 2 smallest DRS archives
https://mega.nz/#!n1ETCSoK!M7E9dwQkAMjF ... 3jj_pcOIvM

a couple of format description links for drs/slp
http://artho.com/age/drs.html
http://web.archive.org/web/201306190630 ... ce/re.html
http://web.archive.org/web/201204021841 ... Tools.html
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Star Wars: Galactic Battlegrounds (*.DRS)

Post by aluigi »