Author Topic: Champions of Krynn - Exploit for 7 characters  (Read 208 times)

Offline redeye

  • Newbie
  • *
  • Posts: 5
Champions of Krynn - Exploit for 7 characters
« on: December 27, 2017, 08:21:08 PM »
I haven’t seen this mentioned elsewhere, and maybe this was fixed in later versions, but in CoK v1.00 for DOS, I was able to keep the NPC female thief Mysellia with my party for the remainder of the game after leaving Jelek.

1) Let Mysellia join the party in Jelek, and save the game after the final encounter there, but just before leaving.
2) When leaving, Mysellia will say she’s going to stay. Before pressing <enter> to continue, use the arrow keys to highlight a different character, then press enter. The highlighted character will disappear instead and Mysellia will stay with the party.
3) Outside the city, encamp and save the game using a different letter than before.
4) Reload the first save, and remove (not drop) the character who disappeared in step 2. Exit without saving.
5) Reload the second save, and add the missing character back to the party.

Since she’s an NPC, she cannot be controlled in combat, but if she’s in the back line and has readied bow and arrows, she’ll stick to using ranged attacks instead of charging into melee. Also remember that any money and items traded to her cannot be traded back.

I bumped up her HP and stats a bit with a hex editor, and because there seems to be very little loot in the game for a single-class thief, I also created her some special weapons and an amulet to improve AC since she can’t use a shield. For those who may not want to modify her, make sure to at least buy her oodles of arrows at the magic shop before leaving Jelek, and check the random magic items found in Neraka Prison, Sanction, Huerzyd and the Second Citadel. I’ve seen a Composite Short Bow +2 pop up in the random treasure sometimes.

Note that it is not necessary to wait until directed to go to Jelek. As soon as the Throtl Catacombs are completed, the encounters in Jelek will become active.

The only issue I’ve encountered is that after leaving Jelek, Mysellia’s combat icon sometimes becomes invisible when entering a new city or loading a saved game. The Alter Icon option in the Encamp menu can then be used to create a custom icon, but sometimes it still reverts back to invisible or back to her default icon later in the game. I’m not sure exactly what triggers the change. While it can be amusing to see arrows being fired from a blank square in combat, I’m hoping someone may have some insight how to “lock in” either the default or customized icon.

Offline Donnie Ewald

  • Administrator
  • Sr. Member
  • *****
  • Posts: 274
    • Ego's Abode
Re: Champions of Krynn - Exploit for 7 characters
« Reply #1 on: December 28, 2017, 03:27:23 AM »
This is great and something I hadn't tried...well done! I'll file this away for my eventual play through of CoK again. :D

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2213
    • Nol Drek's Web Site
Re: Champions of Krynn - Exploit for 7 characters
« Reply #2 on: December 28, 2017, 12:59:02 PM »
The only issue I’ve encountered is that after leaving Jelek, Mysellia’s combat icon sometimes becomes invisible when entering a new city or loading a saved game. The Alter Icon option in the Encamp menu can then be used to create a custom icon, but sometimes it still reverts back to invisible or back to her default icon later in the game. I’m not sure exactly what triggers the change. While it can be amusing to see arrows being fired from a blank square in combat, I’m hoping someone may have some insight how to “lock in” either the default or customized icon.

Mysellia's combat icon is the 30th combat icon located in the file CPIC2.DAX. Her icon appears twice. I believe that the 26th icon is actually Skyla, who looks the same, and that the 30th icon in the file is Mysellia.

My theory is that if you are in one of the dungeons that was on disk 2, located in the file GEO2.DAX and with events detailed in ECL2.DAX, then Mysellia's combat icon will show up normally. However, if the dungeon is on disk 1 or disk 3, then Mysellia will not show up.

This theory continues as follows:
If someone hacks the CPIC1.DAX file and the CPIC3.DAX file to increase the number of combat icons to 30 in each file, and they add Mysellia as the 30th combat icon in those files, then she will show up in all combats regardless of which dungeon you are in.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 947
Re: Champions of Krynn - Exploit for 7 characters
« Reply #3 on: December 28, 2017, 11:25:11 PM »
Another approach may be to rewrite the relevant Ecl record. Running EclDump in the Champions of Krynn folder is easy enough.
Something interesting was found in ECL2_050.txt:
0x861E 0x12 PRINTCLEAR 'MYSELLIA SAYS, 'I MUST STAY HERE. GOOD LUCK.''
0x8643 0x02 GOSUB 0x9CEB
0x8647 0x3E DUMP <drop current selected player>
0x8648 0x09 SAVE <area2.game_area> = 1, <game area> = 1
0x864E 0x20 NEWECL <load ECL 16 (exit ecl)>

It is easiest to replace the existing text with something of the same length, that way you don't need to fiddle with the table of contents. Alter the relevant If clause from if in party (Mysellia) to if in party (say someone from the demo).
EclDump.exe is found at:
http://ua.reonis.com/index.php?action=dlattach;topic=1873.0;attach=10797
DaxDump is found at:
http://ua.reonis.com/index.php?action=dlattach;topic=1105.0;attach=3918

Mon2Cha_054 is the relevant record for Mysellia, while Mon2Cha_044 is the record for Skyla.
« Last Edit: December 29, 2017, 06:37:35 AM by Ishad Nha »

Offline redeye

  • Newbie
  • *
  • Posts: 5
Re: Champions of Krynn - Exploit for 7 characters
« Reply #4 on: December 29, 2017, 01:59:17 PM »
Donnie Ewald – Thanks! Hopefully the icon wrinkle will be ironed out before you replay.

Nol Drek – Nice idea! Your theory sounds very plausible. IIRC, the dungeons where Mysellia’s default icon showed correctly were, in fact, in the mid-game. I haven’t hacked the dax files before, but I may try if nobody beats me to it!

Ishad Nha – I found a way to skip that whole sequence and just have Mysellia leave Jelek with the entire party intact. I really like your idea though, and once I’m finished testing the current icon fix, I’ll circle back and try the changes you suggest.

The text to replace is 28 chars, and so far all I have is “TAKE ME WITH YOU, BIG BOY!!!”
So I’m open to suggestions…

Anyway, what I’m currently testing is a making a change made to one of the save game files instead of the original procedure:
1) Encamp just before leaving Jelek and alter Mysellia’s icon as desired. Save the game.
2) Edit Mysellia’s chrdatXX.sav file and change the byte at offset :E7 from B2 to 00.
3) Reload the save and exit Jelek. No characters will be removed and Mysellia won’t make a peep.

So far the icon I created for Mysellia (which I like better than the default icon) is showing up fine in places which were a problem before, but I haven’t gone through the whole game yet.

The byte at offset :E7 seems to be some sort of NPC character identifier. Changing it to 00 makes her a PC in some respects, though she still can’t trade anything to other characters. She can now be removed from the party and saved, but since she now counts as a PC, none of the seven characters can be removed and re-added because the game still sees 6 PCs already in the party. Also, if the identifier in the save file is changed before completing Jelek, the man in the safe house will no longer recognize Mysellia.

Thanks all, I’ll report back on my test results. Any further ideas/info would be much appreciated.

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 151
Re: Champions of Krynn - Exploit for 7 characters
« Reply #5 on: December 29, 2017, 02:50:37 PM »
The text to replace is 28 chars, and so far all I have is “TAKE ME WITH YOU, BIG BOY!!!”
So I’m open to suggestions…
"I SHALL ACCOMPANY YOUR GROUP"; "... YOUR PARTY"
« Last Edit: December 29, 2017, 02:52:27 PM by Mechanaut »

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 947
Re: Champions of Krynn - Exploit for 7 characters
« Reply #6 on: December 29, 2017, 07:25:20 PM »
This approach should work for any Gold Box game...

RLE, Run-length encoding, may complicate things here, it all depends on exactly how it works. If the distance to the next repetition is specified, this must be preserved or there will be a crash...
Dax notes are not clear on this point, certainly not the ones that I have read.

Offline redeye

  • Newbie
  • *
  • Posts: 5
Re: Champions of Krynn - Exploit for 7 characters
« Reply #7 on: January 01, 2018, 06:58:50 PM »
This approach should work for any Gold Box game...
Yes, good point, these methods would presumably work with other characters in other games. Though in some games there are situations where 2 NPCs can join the party, and having a hacked NPC already in the party might interfere.

Anyway, after clearing the NPC byte for Mysellia and customizing her icon in the encamp menu, I was able to complete the game with her custom icon showing up properly in all locations. She was also able to trade items, and the spacebar took her out of quick combat mode so I could control her in all subsequent combats.

That was awesome, and I don’t mind making the manual changes, but I wanted to see if I could make the whole process occur seamlessly, so I don’t have to stop and edit any save game files:

I modified Mysellia’s starting stats and equipment to my preference in the MON2CHA.DAX and MON2ITM.DAX files. INT and WIS were both 10, really?? She doesn’t LOOK like a Hill Giant….

"I SHALL ACCOMPANY YOUR GROUP"; "... YOUR PARTY"
Perfect, Thanks!

Another approach may be to rewrite the relevant Ecl record. Running EclDump in the Champions of Krynn folder is easy enough.
Something interesting was found in ECL2_050.txt:
0x861E 0x12 PRINTCLEAR 'MYSELLIA SAYS, 'I MUST STAY HERE. GOOD LUCK.''
0x8643 0x02 GOSUB 0x9CEB
0x8647 0x3E DUMP <drop current selected player>
0x8648 0x09 SAVE <area2.game_area> = 1, <game area> = 1
0x864E 0x20 NEWECL <load ECL 16 (exit ecl)>

0x861E 0x12 PRINTCLEAR 'MYSELLIA SAYS, 'I SHALL ACCOMPANY YOUR GROUP''
0x8643 0x02 GOSUB 0x9CEB
0x8647 0x3A DELAY
0x8648 0x09 SAVE <area2.game_area> = 1, <game area> = 1
0x864E 0x20 NEWECL <load ECL 16 (exit ecl)>

This worked great! In ECL2.DAX, I changed the relevant text and then replaced the DUMP instruction with a DELAY instruction. Now Mysellia leaves Jelek with the party and nobody gets dropped!

If someone hacks the CPIC1.DAX file and the CPIC3.DAX file to increase the number of combat icons to 30 in each file, and they add Mysellia as the 30th combat icon in those files, then she will show up in all combats regardless of which dungeon you are in.

Nice call! I extracted Mysellia’s default icon data from CPIC2.DAX and saved it as a separate file. Then I tacked that data on to the end of the CPIC1.DAX and CPIC3.DAX files and added the new index records in the table of contents of both those files . I installed both icon pairs,  just in case (index 54, index 182) and (index 62, index 190), but I’m pretty sure the second set is not referenced. Now her default icon works fine everywhere in the game.

So Thank You to all for the great info and suggestions. I can now just drop the 5 modded files into the game directory before starting a new game, and Mysellia joins the party and the gameplay is seamless. Doing it this way, she remains an NPC with no ability to control her in combat, but I'm fine with that. CoK was the first Gold Box Game I ever played, and it just got much better!

Now if only I could find a better default combat icon for her; something that looks more like her picture and less like a crazed dagger-wielding Dutch schoolgirl…oh well, perhaps another day.

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2213
    • Nol Drek's Web Site
Re: Champions of Krynn - Exploit for 7 characters
« Reply #8 on: January 02, 2018, 11:50:34 AM »
So Thank You to all for the great info and suggestions. I can now just drop the 5 modded files into the game directory before starting a new game, and Mysellia joins the party and the gameplay is seamless. Doing it this way, she remains an NPC with no ability to control her in combat, but I'm fine with that. CoK was the first Gold Box Game I ever played, and it just got much better!

This thread makes me want to replay Curse of the Azure Bonds and do the same thing with Alias and Dragonbait -  I was always disappointed that they would not accompany me out of the Pit of Moander in Yulash.
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2213
    • Nol Drek's Web Site
Re: Champions of Krynn - Exploit for 7 characters
« Reply #9 on: January 02, 2018, 01:17:07 PM »
Now if only I could find a better default combat icon for her; something that looks more like her picture and less like a crazed dagger-wielding Dutch schoolgirl…oh well, perhaps another day.

I don't know if either of these will help you out. I used only the 16 EGA colors but I don't know how those games handle transparency.

((Edited to add PNG versions of the combat icons.))
« Last Edit: January 04, 2018, 01:06:09 AM by Nol Drek »
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

Offline redeye

  • Newbie
  • *
  • Posts: 5
Re: Champions of Krynn - Exploit for 7 characters
« Reply #10 on: January 03, 2018, 10:27:11 PM »
I don't know if either of these will help you out. I used only the 16 EGA colors but I don't know how those games handle transparency.

Wow, these icons are awesome!! 

I chose the C-MYSE16 set, converted them to RGBA Bitmaps, and installed them in all the CPIC files. Looks fantastic! Now all the other characters are jealous...

Thank you so much!!

Offline Nol Drek

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2213
    • Nol Drek's Web Site
Re: Champions of Krynn - Exploit for 7 characters
« Reply #11 on: January 04, 2018, 01:10:44 AM »
You are welcome. And welcome to the forums as well.  :occasion14:
"Into the Drachensgrab Mountains!"

http://www.noldrek.com

 

anything