Extracting from Realms of Chaos

Discuss game modding
spikey
4-bit nibble
Posts: 18
Joined: January 20th, 2013, 4:39 pm

Extracting from Realms of Chaos

Post by spikey »

Hey folks,

Pretty simple question, yet hard to find an answer- is there anything out there yet which can read and output data from Apogee's game Realms of Chaos? Haven't found anything that will work with it yet. The beta I also want to extract files from, incidentally.. :)

Thanks in advance for any info you may have.
Litude
File Contributor
Posts: 155
Joined: September 26th, 2010, 6:25 am
Location: Finland

Re: Extracting from Realms of Chaos

Post by Litude »

IIRC Realms of Chaos uses a pretty much standard LHA archive to store its files. You should be able to extract them using e.g. WinRAR. For recompression you'll probably need to find some old LHA creation utility.
spikey
4-bit nibble
Posts: 18
Joined: January 20th, 2013, 4:39 pm

Re: Extracting from Realms of Chaos

Post by spikey »

Just try and open the DAT file with WinRAR, right?
User avatar
MrFlibble
Forum Administrator
Posts: 1808
Joined: December 9th, 2010, 7:19 am

Re: Extracting from Realms of Chaos

Post by MrFlibble »

Litude wrote:IIRC Realms of Chaos uses a pretty much standard LHA archive to store its files.
Wow, I totally didn't know that! Are there other games from the time that use a similar technique of data storage?
spikey
4-bit nibble
Posts: 18
Joined: January 20th, 2013, 4:39 pm

Re: Extracting from Realms of Chaos

Post by spikey »

Wow, it works.. Awesome, thanks Litdude!

I notice some files called roc1warp in there.. Also references to a level called "The Rec Room" in some files. Interesting..

Question- what about the beta ROC? It doesn't appear to be in a LHA format..
Litude
File Contributor
Posts: 155
Joined: September 26th, 2010, 6:25 am
Location: Finland

Re: Extracting from Realms of Chaos

Post by Litude »

Sorry, I had a quick look at the beta and I think it uses some custom compression routine.
User avatar
MrFlibble
Forum Administrator
Posts: 1808
Joined: December 9th, 2010, 7:19 am

Re: Extracting from Realms of Chaos

Post by MrFlibble »

Now it gets even more interesting, I wonder why the developers would abandon their own data compression algorithm in favour of an open source, publicly available one?
Malvineous
8-bit mega nerd
Posts: 293
Joined: March 17th, 2007, 6:40 pm
Location: Brisbane, Australia
Contact:

Re: Extracting from Realms of Chaos

Post by Malvineous »

spikey sent me a PM asking me to take a look at this so I did. The .dat file from the beta looked a bit familiar so I fed it into the Camoto "gamearch" utility which identified it as a Monster Bash .dat file, and it was able to extract all the files. There were some issues with decompressing a few of the files, but I think this is just the way the last byte in each file is handled.

The music from the beta is in IMF format which plays fine with AdPlug. I guess any program which can extract files from Monster Bash should work with the Realms of Chaos beta.

This is really interesting because when I first looked at the contents of the LHA archive in the shareware version of the game, the game levels were split out into separate files for each map layer, just the way Monster Bash does. They even used the same filename extensions I made up for Camoto to handle the Monster Bash files. So finding out that the beta version actually used the same archive file format as Monster Bash was really interesting - I had no idea the games used the same engine! ...or at least the same engine with VGA support added.

I guess the developers started out with Monster Bash (which included this archive file format) and added VGA support, and when they got to the end they decided LHA was easier to use and had better compression than the LZW compression used by Monster Bash. I don't blame them, because it's quite difficult to work with Monster Bash .dat files anyway. Instead of using filename extensions to identify files, they have special ID numbers for each filetype, so there are multiple files in the archive with exactly the same filename, differing only by filetype number. This makes it really hard to reference a particular file when there are four or five files with exactly the same filename!
spikey
4-bit nibble
Posts: 18
Joined: January 20th, 2013, 4:39 pm

Re: Extracting from Realms of Chaos

Post by spikey »

spikey sent me a PM asking me to take a look at this so I did. The .dat file from the beta looked a bit familiar so I fed it into the Camoto "gamearch" utility which identified it as a Monster Bash .dat file, and it was able to extract all the files. There were some issues with decompressing a few of the files, but I think this is just the way the last byte in each file is handled.
Sure enough, Wombat was able to read the DAT file as a Monster Bash file. Thanks, Mal!

Also, as he says, some files are unreadable, and Wombat is unable to view levels, which is a biggie if someone can fix or help with that (see below).
The music from the beta is in IMF format which plays fine with AdPlug. I guess any program which can extract files from Monster Bash should work with the Realms of Chaos beta.
Yeah, there wasn't a lot of music, I think 8 tracks. Is that what you got, Mal? More info on IMF's, see below.
I guess the developers started out with Monster Bash (which included this archive file format) and added VGA support, and when they got to the end they decided LHA was easier to use and had better compression than the LZW compression used by Monster Bash. I don't blame them, because it's quite difficult to work with Monster Bash .dat files anyway. Instead of using filename extensions to identify files, they have special ID numbers for each filetype, so there are multiple files in the archive with exactly the same filename, differing only by filetype number. This makes it really hard to reference a particular file when there are four or five files with exactly the same filename!
interesting too, because the beta is in EGA only, right?


So, onto the interesting things about the beta. As most will know, "Realms of Chaos" started out back in 1992 as a Paganitzu sequel, "Paganitzu II", with a more action adventure theme. By 1993/4, it had become "Alabama Smith & The Bloodfire Pendant", which was changed for unknown reasons to "Realms of Chaos" in 1994, especially curious given the final game still features a Paganitzu sequel-style ending.

In the beta resources, there are several interesting Paga and Alabama references. The music for one, has the theme that would become the Realms theme titled "Paga Theme", and some pieces that did not make the final game are called "bfp2 (title)", referring to "Bloodfire Pendant, Paga II".

Additionally, there are images similar to the one that Joe Siegler posted on the 3DR forums of the Alabama Smith title screen, from the prototype he has (wish I could get that!!).
Title screen 1: http://www.sierramusiccentral.com/assorted/alabama1.bmp
Title screen 2: http://www.sierramusiccentral.com/assorted/alabama2.bmp
Title screen 3: http://www.sierramusiccentral.com/assorted/camelot.bmp

You can see that in 1993, Alabama Smith part 1 was called "The Camelot Portal". There are many levels referenced in the resources called Camelot something or other, but I couldn't get any to view. I wonder if someone can mess with the resources and get a working Alabama game out of it..

Finally,
Chimera: http://www.sierramusiccentral.com/assorted/chimera.bmp

I think this is a mini boss in the beta ROC, I forget if it's in the retail game, but I don't think so. I will play the beta sometime soon and post more.

Even in the ROC side of things, there seems to be a couple differences, with the name of the level on screen, the short intro slides, and the 7 DukeII style secret bonuses, and the warping Secret Areas.

Very interesting stuff!
User avatar
MrFlibble
Forum Administrator
Posts: 1808
Joined: December 9th, 2010, 7:19 am

Re: Extracting from Realms of Chaos

Post by MrFlibble »

Very interesting findings indeed! BTW, since I'm not very familiar with the history of RoC development, when and how specifically did the beta get leaked?
spikey
4-bit nibble
Posts: 18
Joined: January 20th, 2013, 4:39 pm

Re: Extracting from Realms of Chaos

Post by spikey »

I believe it was from the Apogee beta testers themselves, since that's what the release is for. The date IIRC is 01-02-1994.

Playing the beta today, lots are the same, the levels are near identical. But there are some other differences, including the Chimera.
The game is much more logical (IMHO)- each level is grouped in a 'zone', so, levels 1 and 3 from the retail make up zone 1, with level 2 a bonus level or 'secret area' which gives you the bonus that a crest of power does in the final game. This makes sense as level 2 in the retail, being the scrolling level which is near impossible to do without saving, is now a bonus level in the beta which rewards you for completing it as opposed to a crazy hard level at the start of the game for no reason.
After the two/three levels you face a boss in each area, in this case the Chimera, similar to boss fights in the retail ROC.
In addition, after the boss fight you get text and more plot (I think not present in the final game, IIRC). Then you get ranked, instead on a level basis, which is a lot more fun, as you get Duke-style bonuses depending on how you perform. It doesn't have the 'kill all monsters' style bonuses in the final game, that IMO are just ludicrous.

More to come as I play it.
User avatar
MrFlibble
Forum Administrator
Posts: 1808
Joined: December 9th, 2010, 7:19 am

Re: Extracting from Realms of Chaos

Post by MrFlibble »

Interesting! Any chance you post screenshots from the beta?

I have played the shareware version of RoC some time ago, and found it frustratingly hard at times. I think I got to some sort of fortress level where it started to crank up difficulty even more than before, so I didn't have enough patience and curiosity to get further into the game. So I think I quit before any boss battle.
User avatar
K1n9_Duk3
4-bit nibble
Posts: 31
Joined: March 26th, 2013, 8:12 am
Contact:

Re: Extracting from Realms of Chaos

Post by K1n9_Duk3 »

Litude wrote:For recompression you'll probably need to find some old LHA creation utility.
I tried creating a new ROC.DAT with an old version of LHA (can't remember which version, but it was beyond 2.0). As it turns out, Realms of Chaos is case sensitive when it comes to checking the filenames in the LHA archive. The LHA version I used wrote all filenames in upper case, while the game requires them to be in lower case.

You could hack the LHA archive with a hex editor to change the names to lower case and the game should work just fine. However, you might not be able to extract the contents of the hacked LHA file due to checksum errors. I wrote a tool that converts all filenames to lower case and updates the checksum, but I don't have it with me right now.

I also wrote a level viewer, which is able to display the levels and the sprites placed in the levels, just like my version of a Monster Bash/ScubaVenture level viewer. Just like my ROC.DAT patcher, the ROC level viewer has not been released. From what I know, the level file format of the full game is pretty similar to the level format used by the FAST Engine, but not identical. IIRC each level file stores both the tile data for masked and unmasked tiles, as well as the VGA palette. In the FAST Engine, most of these things were stored in separate files.

Could someone please tell me if the leaked beta uses the same level format as Monster Bash? This image says the game uses the Monster Bash engine (FAST Engine), that's why I'd like to know.

Edit: Link updated.
Last edited by K1n9_Duk3 on November 5th, 2016, 6:32 pm, edited 1 time in total.
User avatar
K1n9_Duk3
4-bit nibble
Posts: 31
Joined: March 26th, 2013, 8:12 am
Contact:

Re: Extracting from Realms of Chaos

Post by K1n9_Duk3 »

Okay, if anyone is interested, here are my tools:

LZH to ROC.DAT converter (includes LHA.EXE, so you can create your own DAT file)

RoC minimod (dead link)
Just new screens and music for the Apogee logo to prove that my converter works. The game will crash when it tries to enter the title screen, because there are neither levels nor sprites in the DAT file.

Realms of Chaos Level Viewer
This will also convert the current tileset files and all sprites to PNG images when you press F3.

Edit: Links updated.
Last edited by K1n9_Duk3 on November 5th, 2016, 6:28 pm, edited 1 time in total.
User avatar
MrFlibble
Forum Administrator
Posts: 1808
Joined: December 9th, 2010, 7:19 am

Re: Extracting from Realms of Chaos

Post by MrFlibble »

Oh hi there K1n9_Duk3, and thanks for sharing your tools! ^_^
Post Reply