Author Topic: Dual-classing in the Krynn series.  (Read 810 times)

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Dual-classing in the Krynn series.
« on: May 23, 2017, 03:17:01 AM »
Krynn series lacks any capacity for dual-classing Humans, by the start of DQK this is a hassle. Ranger to Mage is a particularly useful dual class combination.

One basic approach is to create the PC as a member of the second class, features of the "first class" are then hopefully hacked into the PC.
Another approach is to create PC as member of the first class, then "dual-classing" is effected by hacking. Then the 'end of dual-classing' is effected the same way.
Remove Character from Party at a Training Hall, edit the resulting qch file to simulate dual-classing, then Add Character to Party.

Dark Queen of Krynn and FRUA have similar formats in character records, similar but not identical. I will see if the DQK program still has legacy code for Humans who are dual-classed.

I have dual-classed a Paladin to a White Robe Mage, so far everything is working okay.
Need to come up with a batch file to effect the changes automatically...

Offline PetrusOctavianus

  • Sr. Member
  • ****
  • Posts: 394
Re: Dual-classing in the Krynn series.
« Reply #1 on: May 23, 2017, 04:14:15 AM »
Or you can just play an Elf multi-class.

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: Dual-classing in the Krynn series.
« Reply #2 on: May 23, 2017, 05:23:03 AM »
Yes, the Elves have decent level limits for many of their classes, unlike Forgotten Realms.
But if they are killed they are Gone.
Also, this is a high level game, hence they only get half the XP of a dual-classed Human.
As this is 1E rules, the higher the PC level the more they can override monsters' Magic Resistance.

Offline hans

  • Hero Member
  • *****
  • Posts: 2721
Re: Dual-classing in the Krynn series.
« Reply #3 on: May 23, 2017, 10:15:34 AM »
I have dual-classed a Paladin to a White Robe Mage, so far everything is working okay.
Need to come up with a batch file to effect the changes automatically...
 

So has your PC progressed far enough as a Mage to start using Paladin stuff?

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: Dual-classing in the Krynn series.
« Reply #4 on: May 23, 2017, 08:44:27 PM »
No, I am too busy with the research into various things. He is currently at level 2.

If all else fails, the 'end of dual classing' can be handled by hacking. Offset 191 handles the items that each class can use, Gold Box Companion can reset this.

From Dqk.exe:

XP tables for all classes, tables assume that all classes start level 1 at 0 XP, which is never true for uniquely Krynn classes.
836 = 11*4*19
410,226 + 836 = 411,062

Spells per day arrays start at offset 411,062:
2,088 = 9*29*8
411,062 + 2,088 = 413,150
Good Cleric               0
Neutral Cleric            1
Knight of Sword           2
Knight of Rose            3
Ranger                    4
White Mage                5
Red Mage                  6
Paladin                   7

Arrays 2 and 3 are identical.   
Offset 413,054 is where problems start with level 4 spells for Paladins.

Fourteen unclear numbers:
413,150 + 14 = 413,164
Now, 14 = 7*2, these numbers seem connected to the saving throw tables:
3       6
5       4
5       4
5       4
5       4
2       4
2       6

7*22*5 = 770
413,164 + 770 = 413,934
Strange thing is that the final entries in each array are three lines of five zeroes.
Saving throws are needed for level 1 PCs:
0   413,169  10  13  14  16  15  Cleric
1   413,279  14  15  16  17  17  Knight
2   413,389  14  15  16  17  17  Fighter
3   413,499  14  15  16  17  17  Paladin
4   413,609  14  15  16  17  17  Ranger
5   413,719  14  13  11  15  12  Mage
6   413,829  13  12  14  16  15  Thief

Knight, Fighter, Paladin and Ranger all use the same table for saving throws. Paladin saving throw bonus is apparently applied after the saving throw table is read.
DQK has a slightly different order for saving throws compared to the Players Handbook:
Save vs. Paralysis/Poison/Death Magic
Save vs. Petrification/Polymorph
Save vs. Rod/Staff/Wand
Save vs. Breath Weapon
Save vs. Spell

FRUA file Ckitform.txt enables me to spot tables in Dqk.exe by seeing what a table looks like in Ckit.exe, this simplifies looking for it in Dqk.exe.

Thieving skills
433,733         18*8 = 144      Levels 1 to 18
433,877          7*8 =  56      Racial modifiers
433,933         11*5 =  55      Dex modifiers, 9 to 19
433,988         ????
« Last Edit: May 27, 2017, 06:56:21 AM by Ishad Nha »

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: Dual-classing in the Krynn series.
« Reply #5 on: May 26, 2017, 08:42:44 AM »
Draft list of what needs to be altered:
68:71  XP Total
90     Class
135    60 - Base THAC0
136    Cure Disease Flag:
139    Save v. Death
140    Save v. Petrify
141    Save v. Wand
142    Save v. Breath
143    Save v. Spell
145    Current Level (in highest active class)
146    Level in Former Class
147    Pick Pocket
148    Open Lock
149    Find / Remove Traps
150    Move Silently
151    Hide in Shadows
152    Hear Noise
153    Climb Walls
154    Read Languages
165    Cleric Level
166    Knight level
167    Fighter Level
168    Paladin
169    Ranger
170    Magic-User
171    Thief Level
172    Original Cleric Level
173    Original Knight Level
174    Original Fighter Level
175    Original Paladin Level
176    Original Ranger Level
177    Original Magic-User Level
178    Original Thief Level
179    Attacks pr. 2 Rounds
191    Item Limits
359    Cleric Spells 1
377    Mage Spells 1
410    Knight
411    God
413    Robe

Thief skills are only relevant if you are going to become a Thief.

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: Dual-classing in the Krynn series.
« Reply #6 on: May 29, 2017, 12:56:05 AM »
Paladin to Mage, when the dual classing ended, item use was corrected, but that seems to be all that happened. (This happened when levelling up in the game, it did not happen when levelling up in GBC.) Thac0 and saving throws were those of the second class, and only of the second class. PC regained the Lay ability but it seems to be purely verbal, it does not actually do anything. Did not have Cleric spells, that can be added in though.

Gold Box Companion can easily detect dual-classing:
offset 146, Level in Former Class, will be greater than 0
one of offsets 172:178 will be greater than 0.
Both numbers will be greater than 0 and less than 40, second number will be more like 10 than 40.
Once dual classing ends, GBC can check that the PC is getting the best of both classes in the areas of saving throws and Thac0. Tables for these are known from DQK.exe.
Ditto, GBC can restore any functions of the first class that were lost in dual-classing. This will require alteration of the existing GBC program.

The fact that DQK altered the class item usage shows that it accepts at least one of these two offsets:
146   Level in Former Class
177   Original Magic-User Level

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: Dual-classing in the Krynn series.
« Reply #7 on: May 30, 2017, 09:04:14 PM »
Champions of Krynn: maximum level is ~8 for single class characters, no real point to dual-classing. If dual classing is still desired, the approach for DKK should also work for CK.

Death Knights of Krynn: a code number could be placed in an unused offset, say Name Letter 15 (this assumes Name Length < 15). I assume that when Name Length < 15 means that DKK won't read the 15th letter whereas GBC will. This enables GBC to detect a dual-classed Human.
For a code number < 100, first digit is the former class level, last digit is the former class number.
For a code number >= 100, first two digits are the former class level, last digit is the former class number.
Pressing Level in the HUD of GBC will level up the relevant PC if that is possible. If not, and if PC has regained his previous class abilities, pressing Level will verify that PC is getting the best of both classes. PC can level up in-game, then pressing the Level button ensures that he did not get short-changed.

Dark Queen of Krynn, see the posts above this one.

Going from DKK to DQK, GBC can always alter the save file to reflect the different DQK approach.

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: Dual-classing in the Krynn series.
« Reply #8 on: June 03, 2017, 04:46:43 AM »
Add/Remove Character approach avoids the need to restart the game, unlike DQK you can't reload at will.
I am working on the DQK equivalent now.
« Last Edit: June 07, 2017, 03:37:27 AM by Ishad Nha »

Offline jhirvonen

  • Jr. Member
  • **
  • Posts: 92
Re: Dual-classing in the Krynn series.
« Reply #9 on: June 03, 2017, 09:41:59 PM »
Added the offsets for former levels and highest former level for Dark Queen to GBC.

I dualed a mage to a thief, then leveled him up with GBC. Once his thief level surpassed the former mage level, he got his spell memorization values back and the mage item limit value were added to those of the thief.

But in the game, the character sheet only shows the thief levels. He can not memorize spells. The memorization table (5 4 3 2 1 etc.) flashes and then the memorization screen closes immediately.

The game seems to check if the character has active mage levels and does not seem to handle the former class level at all. If I change the class value to a mage, memorization still fails. But if I add active mage levels, memorization works.

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: Dual-classing in the Krynn series.
« Reply #10 on: June 04, 2017, 09:46:56 PM »
This is probably a generic problem with dual classing in DQK. I will have to see if I can work any solutions here...
DQK has not been studied the way that FRUA has been, I may find something or I may not.
Warrior=>Mage combinations are probably the most useful anyway, Warrior=>Cleric would be good too.

I can see no solutions. If this was FRUA you might be able to hack something into the program...
« Last Edit: June 05, 2017, 09:20:03 AM by Ishad Nha »

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: Dual-classing in the Krynn series.
« Reply #11 on: June 07, 2017, 03:45:11 AM »
A lot of class abilities are implicit functions of the relevant class, not explicit Effects...
Without FRUA-style hacking many abilities of the original class will be lost upon the start of dual-classing.
« Last Edit: June 17, 2017, 04:20:36 AM by Ishad Nha »

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: Dual-classing in the Krynn series.
« Reply #12 on: June 09, 2017, 11:15:27 AM »
Idea is to make a double-class arrangement function like dual-class. It might only work for valid multiclass combinations. Alter the level advancement tables so original class won't gain another level until it reaches a zillion xp. While new class gets new levels at half the usual double-class xp, this is the same rate as a dual-classed character.
This will affect all holding the kit concerned, which may not be so great.
This involves UAShell-style manipulation of Dqk.exe...

(1) At the first tier we have 7 classes:
Cleric, Knight, Fighter, Paladin, Ranger, Mage, Thief
(2) and at the second tier, we have 11 kits, four of which are True class:
Good Cleric, Neutral Cleric, Fighter, Knight of Crown, Knight of Sword, Knight of Rose, Ranger, White Mage, Red Mage, Thief, Paladin
(3) at the third tier, call the various choices of god "sub-kits":
Paladine, Majere, Kiri-Jolith, Mishakal
Sirrion, Reorx, Shinare

Fortunately, XP is a function of kit not class.
There is only one xp figure for all one, two or three classes. So that rules out re-setting the original class's xp.

This can be brought in once the dual-classing period is over??
I suspect that Humans can be multi-classed in practice, Ougo the Strange in Farr Windward in TSF.

11 * 4 = 44,  408,748 + 44 = 408,792
408,748 to 408,791: for each kit, the constant amount of xp needed to gain a new level at high levels.

Offline Ishad Nha

  • Hero Member
  • *****
  • Posts: 945
Re: Dual-classing in the Krynn series.
« Reply #13 on: June 12, 2017, 04:08:56 AM »
Jhirvonen's problem was solvable:
165   Cleric Level       0
166   Knight level       0
167   Fighter Level      0
168   Paladin Level      0
169   Ranger Level       0
170   Magic-User Level  12
171   Thief Level       13

Offset 170 was changed from 0 to 12. I don't know if this will work for cases like Paladin to Mage.
I will need to research things like that. Gunther is a 12 Mage => 13 Thief.
« Last Edit: June 17, 2017, 04:22:35 AM by Ishad Nha »

Offline jhirvonen

  • Jr. Member
  • **
  • Posts: 92
Re: Dual-classing in the Krynn series.
« Reply #14 on: June 12, 2017, 04:34:10 PM »
I already mentioned earlier than you can get mage spell memorization to work by adding active mage levels but this leads to:
  • If you add active mage levels to another class, to a thief for example, the game will display something like "THIEFWHITE" in the character sheet if the class is set to thief. The class name will only be ok (WHITE MAGE / THIEF) if the class is set to mage/thief.
  • If you try to level up him in the game, he will be treated as a multiclass character and the mage levels will also be leveled.
I also tried setting the highest mage level value at offset 163 but that didn't help with memorization and probably causes only problems.

I don't want to add any hacks that the game's character sheet won't display correctly or that breaks leveling up in the game.

 

anything