Author Topic: Hacking original Gold Box games  (Read 2684 times)

Offline Kirben

  • Newbie
  • *
  • Posts: 15
Hacking original Gold Box games
« on: August 24, 2015, 08:18:28 PM »
I was wondering if anyone else has tried altering/hacking the original games, for any advantages?

I was recently experimenting with enabling Paladins and Rangers in the original Pool of Radiance, but was too limited by original code. I enabled the selection of extra classes during character creation, and added the experience tables for training, but other code segments (modify character, amount of attacks per round) check the fighter level only. Since I can't add new code, it isn't so easy to work around those particular checks.

It is strange that Druid and Monk classes seem to exist in complete Pool of Radiance series, but they were never actually enabled to be used.

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: Hacking original Gold Box games
« Reply #1 on: August 25, 2015, 03:39:59 AM »
I was wondering if anyone else has tried altering/hacking the original games, for any advantages?

I was recently experimenting with enabling Paladins and Rangers in the original Pool of Radiance, but was too limited by original code. I enabled the selection of extra classes during character creation, and added the experience tables for training,
Nice. How'd you do that?

It is strange that Druid and Monk classes seem to exist in complete Pool of Radiance series, but they were never actually enabled to be used.
Possibly they planned to include them, but ran out of time before completing them?

Anyway, if you want to go down the path of hacking the gold box engine, Simeon Pilgrim has done a remake of of Curse of the Azure Bonds, based on a decompile of the original: https://github.com/simeonpilgrim/coab. You could tweak it so it would load Pool of Radiance data files, then add the features you want.

Offline Kirben

  • Newbie
  • *
  • Posts: 15
Re: Hacking original Gold Box games
« Reply #2 on: August 25, 2015, 04:15:04 AM »
I was wondering if anyone else has tried altering/hacking the original games, for any advantages?

I was recently experimenting with enabling Paladins and Rangers in the original Pool of Radiance, but was too limited by original code. I enabled the selection of extra classes during character creation, and added the experience tables for training,
Nice. How'd you do that?
I used IDA Pro to disassemble the code, and just updated several of the data tables:
-The classes shown during character creation are controlled via table, so it was easy to enable the hidden classes.
-The experience tables for Paladin and Ranger classes were just copied over from Curse of the Azure Bonds, they can only go as far as level 9 though.
-I increased the level limits for all classes to level 9, but maximum hit points aren't been calculated correctly for additional levels right now.

I attached updated file, in case anyone wants to try.

It is strange that Druid and Monk classes seem to exist in complete Pool of Radiance series, but they were never actually enabled to be used.
Possibly they planned to include them, but ran out of time before completing them?
That would make sense if it was only one game, but Druid and Monk classes exist in all four games though.

Anyway, if you want to go down the path of hacking the gold box engine, Simeon Pilgrim has done a remake of of Curse of the Azure Bonds, based on a decompile of the original: https://github.com/simeonpilgrim/coab. You could tweak it so it would load Pool of Radiance data files, then add the features you want.
Yes, I have been using the Curse of the Azure Bonds remake sources for reference, when looking at dissembled code of Pool of Radiance.

Much of the code in Pool of Radiance is similar, but not sure about remaking the complete game.

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: Hacking original Gold Box games
« Reply #3 on: August 31, 2015, 02:32:34 AM »
That's actually quite impressive - I had no idea it was practical to insert large chunks of new data into games without having the source code - I've never used IDA. How much work is it to do stuff like this, assuming I already know how to code and have a basic grasp of assembly language? There are a few games I've long wanted to modify (and in one case, completely reverse)

Offline Kirben

  • Newbie
  • *
  • Posts: 15
Re: Hacking original Gold Box games
« Reply #4 on: August 31, 2015, 03:40:54 AM »
A freeware version of IDA Pro is available to use.

It isn't too difficult to hack original programs, when you are familiar with assembly. Especially if the executable file still contains debug information, or if you have other code references.

Adding extra data depends on the size of the tables used by the original code, it would be much more difficult to add large chunks of extra data. I usually just locate the data offsets for tables with the help of IDA Pro, and use hex editor to change values in the original executable file.

Most of the executable files in GoldBox series are packed with EXEPACK, so make sure you use UNP or similar utility to unpack the file first.
« Last Edit: August 31, 2015, 03:43:21 AM by Kirben »

Offline Sailent

  • Newbie
  • *
  • Posts: 29
Re: Hacking original Gold Box games
« Reply #5 on: September 10, 2015, 09:08:00 AM »
Did SSI include these hidden character classes and then decided to turn them off?
What about the Druid's shapechange ability or spells? Were these included to?


Offline Null Null

  • Maker of excessively difficult vanilla mods
  • Hero Member
  • *****
  • Posts: 551
Re: Hacking original Gold Box games
« Reply #6 on: September 10, 2015, 10:38:36 AM »
Most likely they're just in there as names--POR was supposed to be 'real D&D on your computer', but they obviously ran into hardware limitations (it was 1988, remember) and had to decide not to include stuff after all.

Offline Kirben

  • Newbie
  • *
  • Posts: 15
Re: Hacking original Gold Box games
« Reply #7 on: October 07, 2015, 04:40:42 AM »
The gold box engine added more and more new features over time, with only the last few games offering decent music and sound support. Would it be possible to convert or update the data files from earlier games, so they could be used with game engine from a later game?

Gateway to the Savage Frontier in particular was based off the Curse of the Azure bonds engine, and would be interesting to experiment with. I managed to get Curse of the Azure Bonds to start with the Gateway to the Savage Frontier engine, by mixing data files, but it doesn't get very far.


Offline Null Null

  • Maker of excessively difficult vanilla mods
  • Hero Member
  • *****
  • Posts: 551
Re: Hacking original Gold Box games
« Reply #8 on: October 07, 2015, 01:06:27 PM »
Have you tried the opposite direction? Gateway is newer and might have added features.

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 938
Re: Hacking original Gold Box games
« Reply #9 on: October 07, 2015, 11:00:47 PM »
"Would it be possible to convert or update the data files from earlier games, so they could be used with game engine from a later game?"
That approach was used with Icewind Gate II, the more or less successful attempt to play Baldurs Gate 2 on the (Third Edition) Icewind Gate 2 engine. I found that IWD2 lacked many of the Actions (events) of BG2, hence a full translation was not possible.
It is known that most Ecls have the same structure, that has been known for years. Simeon Pilgrim decoded Curse of the Azure Bonds. Some work was done on decrypting Pool of Radiance.
I simply don't know if the Gold Box games all use the same list of events.

Offline Kirben

  • Newbie
  • *
  • Posts: 15
Re: Hacking original Gold Box games
« Reply #10 on: October 07, 2015, 11:33:00 PM »
The differences in ECL format are the main problem, when attempting to mix data files between the various games in the Gold Box series. Curse of the Azure Bonds and Gateway to the Savage Frontier are the only match I have located so far.

Which other games are known to share a common ECL format?

Offline marainein

  • Sr. Member
  • ****
  • Posts: 372
Re: Hacking original Gold Box games
« Reply #11 on: October 08, 2015, 02:09:30 AM »
The differences in ECL format are the main problem, when attempting to mix data files between the various games in the Gold Box series. Curse of the Azure Bonds and Gateway to the Savage Frontier are the only match I have located so far.

Which other games are known to share a common ECL format?
So far as I can tell, they're mostly similar, it's just the address space used is different in some of the games.

Edit, to be precise, as Thomson would say, the following games all have ECL that appears sensible to my limited cognisance:

Buck Rogers: Countdown to Doomsday
Buck Rogers: Matrix Cubed

Champions of Krynn
Death Knights of Krynn

Pool of Radiance
Curse of the Azure Bonds
Secret of the Silver Blades

Gateway to the Savage Frontier
Treasures of the Savage Frontier - but there are some weird parts.

Whether this means that they are 100% compatible is another question - I suspect not, as the ECL seems to interface with the game engine by reading and writing from specific addresses.

« Last Edit: October 08, 2015, 03:34:56 AM by marainein »

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 938
Re: Hacking original Gold Box games
« Reply #12 on: October 08, 2015, 05:49:40 AM »
Dark Queen of Krynn uses a Glb format, like FRUA. You could translate the Dax format to Glb easily enough,
(1) DaxDump the Dax files
(2) Combine them to form one file
(3) Create your own table of contents

For an understanding of the Glb format, see the topic Glb Files - Table of Contents:
http://ua.reonis.com/index.php?topic=1053.0

The problem is whether the actual events for DQK follow the same format as the earlier two Krynn games.

Try switching dax files between games and see what happens. Hacking UA sub-forum has a topic on each game that lists its Ecls.
« Last Edit: October 08, 2015, 06:02:31 AM by Ishad Nha »

Offline jhirvonen

  • Jr. Member
  • **
  • Posts: 83
Re: Hacking original Gold Box games
« Reply #13 on: October 08, 2015, 08:16:39 AM »
Maybe open a new thread in Hacking UA about what we know of ECLs?

I know of the two threads by marainein and Ishad Nha but still.

Offline Dedup

  • Newbie
  • *
  • Posts: 10
Re: Hacking original Gold Box games
« Reply #14 on: November 28, 2015, 07:55:10 AM »
I tried using Kirben's hacked Pool of Radiance file but got an overlay error.  Any one else get this to work?  And has anyone tried transferring the hacked in Paladin and Ranger classes to Curse to see if they work correctly?

 

anything