PopCap Games' "PAK" Files :)

Announcements, advice, random banter, unrelated discussion, et cetera.

PopCap Games' "PAK" Files :)

Postby rfnagel » 2010-12-26 @ 21:02

Always loved all of the pretty bacground images for PopCap Games' Bejeweled Deluxe, and luckily all of the images are stored locally in the installed directory of the game ("Bejeweled 2 Deluxe\Images\Backdrops"; filenames "Backdrop00.jpg" through "Backdrop16.jpg")... makes for some nice WinDoZe wallpaper :)

Bejeweled Twist and Peggle Deluxe (as well as *all* newer "post" BJ2 PopCap games) are a whole different animal altogether though. Unfortunately the resources are stored in the encrypted file "Main.pak" (located in the games' installed directory on your hard drive). BJT has some especially *NICE* pics... perfect for more WinDoZe wallpaper.

Extraction was impossible... until now... just stumbled on this one:

"QuickBMS Generic Files Extractor v0.4.7"
http://aluigi.org/papers.htm#quickbms
http://aluigi.org/papers/quickbms.zip

"7½7M Archives Script"
http://aluigi.org/papers/bms/7x7m.bms

Run "QuickBMS.exe", choose the "7x7m.bms" file, and then select the "Main.pak" file from the PopCap game of your choice... WHAMMO! Pretty pics in JP2 (JPEG 2000) format! :)


P.S. A ton more scripts over at that http://aluigi.org/papers.htm#quickbms page for support of extrating other games' resources :)
Rich ¥Weeds¥ Nagel
http://www.richnagel.net
User avatar
rfnagel
Oldbie
 
Posts: 1137
Joined: 2009-4-03 @ 22:24
Location: Out in the woods of Crystal River, Florida USA

Re: PopCap Games' "PAK" Files :)

Postby Jorpho » 2010-12-26 @ 22:04

Apparently until recently, it was fairly trivial to hack the PAK files for Plants vs Zombies and restore the original "Thriller Zombie" that was removed when the Michael Jackson estate got uppity.

I don't think that hack works anymore, though.
User avatar
Jorpho
l33t
 
Posts: 4244
Joined: 2003-2-14 @ 19:50
Location: Canada

Re: PopCap Games' "PAK" Files :)

Postby rfnagel » 2010-12-26 @ 22:31

Jorpho wrote:Apparently until recently, it was fairly trivial to hack the PAK files for Plants vs Zombies and restore the original "Thriller Zombie" that was removed when the Michael Jackson estate got uppity.


I'm not sure about PVZ (although I've read about using the extractor with that game elsewhere on the Internet), but the PAKs from BJT and PD are XOR encrypted from what I've read.

I had previously tried various other XOR ecryption/deecryption utilities (supossedly using hex "F7"), but never had any luck... the resulting file was just as jumbled up as the original encrypted file <grin>.

Nevertheless, the QuickBMS utility (with the script file) does the job nicely... even recreating all of the directories and subdirectories with all of the resources extracted into them. Does such a good job, that you can even re-"PopPack.exe" the files back into a usable "Main.pak" :)
Rich ¥Weeds¥ Nagel
http://www.richnagel.net
User avatar
rfnagel
Oldbie
 
Posts: 1137
Joined: 2009-4-03 @ 22:24
Location: Out in the woods of Crystal River, Florida USA

Re: PopCap Games' "PAK" Files :)

Postby rfnagel » 2011-1-14 @ 16:41

BTW, has anyone played the new Bejeweled 3? Just bought that one the other day... the music is AWESOME!

QuickBMS can also extract all of the resources from BJ3's "Main.pak" game resources file, the music as well (in ".MO3"... can be played/wave-converted using XMPlay). Skaven has really outdone himself with the contributions to the soundtrack... being his usual style of orchestral (rather obscure for Tracker format), it's rather easy to pick out which tunes he contributed to the project :)

I like all of the music, but ESPECIALLY pretty is the music for the "Butterfly" game mode of BJ3 :)
Rich ¥Weeds¥ Nagel
http://www.richnagel.net
User avatar
rfnagel
Oldbie
 
Posts: 1137
Joined: 2009-4-03 @ 22:24
Location: Out in the woods of Crystal River, Florida USA

Re: PopCap Games' "PAK" Files :)

Postby Jorpho » 2011-1-14 @ 17:05

Gee, I completely lost track of what he was up to.
http://en.wikipedia.org/wiki/Peter_Hajba

I probably won't buy Bejeweled 3 unless I can get it for five bucks or less (which will happen someday), but now I have another reason to finally install Uplink.
User avatar
Jorpho
l33t
 
Posts: 4244
Joined: 2003-2-14 @ 19:50
Location: Canada

Re: PopCap Games' "PAK" Files :)

Postby rfnagel » 2011-1-15 @ 00:07

Jorpho wrote:I probably won't buy Bejeweled 3 unless I can get it for five bucks or less (which will happen someday)


If you're a Bejeweled fan, 'tis definately worth the $20 bucks :) Now, the original price of $20 was WAY too steep for the PC version of Bejeweled Blitz IMHO, but the same for BJ3 is worth it :)


Jorpho wrote:but now I have another reason to finally install Uplink.


Sorry, prolly a dumb question, but what is "Uplink"?


Jorpho wrote:Gee, I completely lost track of what he was up to. http://en.wikipedia.org/wiki/Peter_Hajba


I haven't perused the Wiki article, but I'm sure they have a link to this... his web page -> http://www.futurecrew.com/skaven :)

P.S. Fired off an email to him about the music telling him how much I enhoyed it. I also asked specifically which of the songs he contributed (the others are by Alexander Brandon), and here was his reply:


Peter Hajba wrote:Heya Richard,

Thanks for writing, and nice to hear you've enjoyed the music in
Bejeweled 3! ^_^

To be exact on who's made what, Alexander Brandon made:
- Poker Mode music and win/lose fanfares
- Buried Treasure / Diamond Mine Mode music and win/lose fanfares
- Classic Mode music track part 3
- Zen Mode music track parts 3 and 4

The rest were made by me. Including the Butterflies song. Glad ya like
it. :)

The soundtrack is going to be released for sale on BandCamp in the near
future, I hope, just like the Plants Versus Zombies soundtrack. PopCap
still needs to sort out some legal matters before it can happen.


Cheers,

/Peter
Rich ¥Weeds¥ Nagel
http://www.richnagel.net
User avatar
rfnagel
Oldbie
 
Posts: 1137
Joined: 2009-4-03 @ 22:24
Location: Out in the woods of Crystal River, Florida USA

"Music.xml" offsets and XMPlay sub-songs correlation?

Postby rfnagel » 2011-1-15 @ 04:52

BTW, I posted this over in the XMPlay forums as well, figured someone here might be able to shed some light on it as well :)

I was wondering if anyone knew the correlation of PopCap Games' "Music.xml" "Offset" entries for their various games' music, and the sub-songs info that is displayed within XMPlay's "General" info window?

An example, the files "Bejeweled3_suite.mo3" and "music.xml", extracted from Bejeweled 3's "Main.pak" game resource file:

XMPlay displays this info in the "General" info window for the "Bejeweled3_suite.mo3" music file:

-=-=-=-=-=-=-=-=-=-
Code: Select all
Sub songs:
1. 0:26 - 1 orders
2. 0:24 - 1 orders - looped
3. 1:36 - 7 orders
4. 2:18 - 9 orders - looped
5. 1:54 (1:53 trimmed) - 4 orders
6. 1:42 - 6 orders - looped
7. 1:42 - 6 orders - looped
8. 0:40 (0:08 trimmed) - 1 orders
9. 1:13 (0:07 trimmed) - 1 orders
10. 9:36 - 38 orders - looped
11. 11:05 - 29 orders - looped
12. 1:43 - 5 orders
13. 0:24 (0:24 trimmed) - 1 orders
14. 2:20 - 10 orders - looped
15. 3:00 - 9 orders - looped
16. 0:53 (0:06 trimmed) - 1 orders
17. 0:49 - 1 orders - looped
18. 0:15 - 1 orders - looped
19. 2:55 - 11 orders - looped
20. 0:48 (0:11 trimmed) - 1 orders
21. 2:51 - 10 orders - looped
22. 1:19 (0:10 trimmed) - 1 orders
23. 2:50 - 7 orders - looped
24. 0:51 (0:06 trimmed) - 1 orders
25. 0:43 (0:03 trimmed) - 1 orders
26. 2:17 - 8 orders - looped
27. 0:42 (0:05 trimmed) - 1 orders
28. 0:40 (0:05 trimmed) - 1 orders
29. 2:42 - 9 orders - looped
30. 0:31 (0:07 trimmed) - 1 orders
31. 1:00 (0:10 trimmed) - 1 orders

-=-=-=-=-=-=-=-=-=-


The "Music.xml" file contains the following entries:

-=-=-=-=-=-=-=-=-=-
Code: Select all
<Music>

<!-- These events are always processed first -->

  <DefaultEvents>
    <Event Name="FadeOut" Volume="b+0,1,0.01,1,~###         ~#########" />
    <Event Name="FadeIn" Volume="b+0,1,0.015,1,####         ~~###" />
    <Event Name="Wait" Volume="b+0,1,0.001667,1,~###        y~### (####" />
  </DefaultEvents>

<!-- NOTE: Offset 00 = silent / mute loop. All fanfares jump to it after end.  -->

<!-- Menu musics -->

  <Song Name="LoadingScreen" File="music\Bejeweled3_suite.mo3" Offset="02" >
    <Event Name="Switch" RowSync="0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124" Offset="04" />
  </Song>
 
  <Song Name="MainMenu" File="music\Bejeweled3_suite.mo3" Offset="04" >
  </Song>

  <Song Name="SecretMenu" File="music\Bejeweled3_suite.mo3" Offset="147" >
  </Song>

  <Song Name="QuestMenu" File="music\Bejeweled3_suite.mo3" Offset="147" >     
  </Song>

  <Song Name="QuestMenu_unlock" File="music\Bejeweled3_suite.mo3" Offset="00" >
  </Song>

  <Song Name="QuestMenu_fanfare" File="music\Bejeweled3_suite.mo3" Offset="120" Sfx >
    <Event Name="FadeOut" Volume="b+0,1,0.002857,1,~###         ~#########" />
  </Song>

<!-- Turn Based Quest songs -->


  <Song Name="QuestTurnBased" File="music\Bejeweled3_suite.mo3" Offset="188" >
      <Event Name="Break" RowSync="0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124" />
  </Song>

  <Song Name="QuestTurnBased_lose" File="music\Bejeweled3_suite.mo3" Offset="199" >
  </Song>

  <Song Name="QuestTurnBased_win" File="music\Bejeweled3_suite.mo3" Offset="197" >
  </Song>

<!-- Time Based Quest songs -->

  <Song Name="QuestTimeBased" File="music\Bejeweled3_suite.mo3" Offset="133" >
    <Event Name="Break" RowSync="0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124" />
  </Song>

  <Song Name="QuestTimeBased_lose" File="music\Bejeweled3_suite.mo3" Offset="145" >
  </Song>

  <Song Name="QuestTimeBased_win" File="music\Bejeweled3_suite.mo3" Offset="143" >
  </Song>

<!-- Bomb puzzle -->

  <Song Name="QuestBomb" File="music\Bejeweled3_suite.mo3" Offset="34" >
  </Song>

  <Song Name="QuestBomb_win" File="music\Bejeweled3_suite.mo3" Offset="43" >
  </Song>

  <Song Name="QuestBomb_lose" File="music\Bejeweled3_suite.mo3" Offset="41" >
  </Song>

<!-- Classic Mode -->

  <Song Name="Classic" File="music\Bejeweled3_suite.mo3" Offset="45" >
    <Event Name="Break" RowSync="0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124" />
  </Song>

  <Song Name="Classic_lose" File="music\Bejeweled3_suite.mo3" Offset="22" >
  </Song>

<!-- Zen Mode -->

  <Song Name="Zen" File="music\Bejeweled3_suite.mo3" Offset="84" >
  </Song>

<!-- Icestorm Mode -->
<!-- Panic Layer in channels 17, 18, 19, 20 -->

  <Song Name="Icestorm" File="music\Bejeweled3_suite.mo3" Offset="149" >
    <Event Name="Play" Volume="b+0,1,0,1,#### 9####     g~###   $~###" Tracks="17,18,19,20" />
  </Song>

  <Song Name="Icestorm_win" File="music\Bejeweled3_suite.mo3" Offset="43" >
  </Song>
 
  <Song Name="Icestorm_lose" File="music\Bejeweled3_suite.mo3" Offset="161" >
  </Song>

<!-- Butterflies Mode -->

  <Song Name="Butterflies" File="music\Bejeweled3_suite.mo3" Offset="163" >
  </Song>

  <Song Name="Butterflies_win" File="music\Bejeweled3_suite.mo3" Offset="43" >
  </Song>

  <Song Name="Butterflies_lose" File="music\Bejeweled3_suite.mo3" Offset="174" >
  </Song>

<!-- Poker Mode -->

  <Song Name="Poker" File="music\Bejeweled3_suite.mo3" Offset="176" >
  </Song>

  <Song Name="Poker_win" File="music\Bejeweled3_suite.mo3" Offset="186" >
  </Song>

  <Song Name="Poker_lose" File="music\Bejeweled3_suite.mo3" Offset="184" >
  </Song>

<!-- Buried Treasure mode -->

  <Song Name="BuriedTreasure" File="music\Bejeweled3_suite.mo3" Offset="201" >
  </Song>

  <Song Name="BuriedTreasure_win" File="music\Bejeweled3_suite.mo3" Offset="213" >
  </Song>

  <Song Name="BuriedTreasure_lose" File="music\Bejeweled3_suite.mo3" Offset="211" >
  </Song>

<!-- Speed / Lightning Mode --> 
<!-- Panic Layer: scale the volume up for tracks 17 to 20 -->


  <Song Name="Speed" File="music\Bejeweled3_suite.mo3" Offset="12" >   
    <Event Name="Play" Volume="b+0,1,0,1,####       4####  &~###j~###" Tracks="17,18,19,20" />
    <Event Name="Break" RowSync="1,5,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124" />
  </Song>

  <Song Name="Speed_lose" File="music\Bejeweled3_suite.mo3" Offset="22" > 
  </Song>

</Music>

-=-=-=-=-=-=-=-=-=-


Anyone have any idea how to correlate the "Offset" entries in the above file with the number of the sub-song as displayed within XMPlay?


P.S. Most all newer PopCap games (based on their PopCap Framework engine) utilitze this same thing... various sub-songs contained in their main Tracker format music file (either MO3 or IT format), using a "Music.xml" file to tell the game what music to play and when (as well as volumes, tempo, and such).
Rich ¥Weeds¥ Nagel
http://www.richnagel.net
User avatar
rfnagel
Oldbie
 
Posts: 1137
Joined: 2009-4-03 @ 22:24
Location: Out in the woods of Crystal River, Florida USA

Re: PopCap Games' "PAK" Files :)

Postby Jorpho » 2011-1-16 @ 01:48

I would have never guessed that PopCap's games used tracker music; I imagined they just used some streaming music format. Are trackers frequently used in other recent, non-PopCap games as well?

rfnagel wrote:Sorry, prolly a dumb question, but what is "Uplink"?
Another game that lists Mr. Hajba in its credits, according to the Wikipedia article. It came out quite a few years ago and is available on Steam.

Jorpho wrote:I haven't perused the Wiki article, but I'm sure they have a link to this... his web page -> http://www.futurecrew.com/skaven :)
Too bad his web page seems to be three years out of date.
User avatar
Jorpho
l33t
 
Posts: 4244
Joined: 2003-2-14 @ 19:50
Location: Canada

Re: PopCap Games' "PAK" Files :)

Postby rfnagel » 2011-1-16 @ 05:20

Jorpho wrote:I would have never guessed that PopCap's games used tracker music; I imagined they just used some streaming music format. Are trackers frequently used in other recent, non-PopCap games as well?


Although PopCap Games are still using Tracker format for the music in their new(er) games, other games generally do not. The last non-PopCap game that I could think of would be Epic's Unreal series.


Jorpho wrote:Another game that lists Mr. Hajba in its credits, according to the Wikipedia article. It came out quite a few years ago and is available on Steam.


Thanks for the info... I'll have to look into that one :) Heh, when you first said "Uplink", I was thinking of some sort of communications utility program LOL.


Jorpho wrote:Too bad his web page seems to be three years out of date.


Yeah, he hasn't updated it in quite sometime. But, that's were I got his email address from... glad he's still checking his email :)
Rich ¥Weeds¥ Nagel
http://www.richnagel.net
User avatar
rfnagel
Oldbie
 
Posts: 1137
Joined: 2009-4-03 @ 22:24
Location: Out in the woods of Crystal River, Florida USA


Return to Milliways

Who is online

Users browsing this forum: No registered users and 0 guests