marchitek Posted May 20, 2023 Posted May 20, 2023 I'm trying to connect class/kit description to hptable and I'm having hard time. hpclass.2da file "externalizes which HP table to use for each class/kit". We have there entries like: FIGHTER HPWAR BERSERKER HPWAR WIZARD_SLAYER HPWAR BEAST_MASTER HPWAR BLACKGUARD HPWAR CLERIC HPPRS TALOS HPPRS BARBARIAN HPBARB I learned somewhere else that kit entry can be missing and then probably class entry is used. So far so good. Then we have clastext.2da that "defines class/kit related descriptions". We have there entries like: CLASSID KITID LOWER DESCSTR MIXED BIOGRAPHY FALLEN BRIEFDESC FIGHTER 2 16384 7201 9556 1076 15881 0 31252 BERSERKER 2 1 24239 24284 24261 15881 0 31252 WIZARD_SLAYER 2 2 24240 24285 24262 15881 0 31252 BEAST_MASTER 12 9 24247 24300 24269 15888 0 31257 BLACKGUARD 6 32 28604 28606 28605 31492 0 31256 CLERIC 3 16384 7204 24230 1079 15884 0 31255 GODTALOS 3 19 24254 24307 24276 15884 0 31255 BARBARIAN 2 1073741824 24226 24235 24229 31493 0 31268 We can see that this is almost working, but only almost. In hpclass we have TALOS, but here GODTALOS. So, I was thinking that I would use HELP column form kitlist.2da thet also contains description strref. KITID columns in clastext.2da seems to be total mess, sometimes it is kit.ids value and sometimes is row number in kitlist.2da. But I could try to check kitlist.2da agains classes from hpclass.2da. We have there entries like: ROWNAME LOWER MIXED HELP ABILITIES PROFICIENCY UNUSABLE CLASS KITIDS 1 BERSERKER 25298 25329 24284 CLABFI02 29 0x00000001 2 0x00004001 2 WIZARD_SLAYER 25299 25330 24285 CLABFI03 30 0x00000002 2 0x00004002 9 BEASTMASTER 25306 25337 24300 CLABRN04 37 0x00020000 12 0x00004009 19 TALOS 24254 25347 24307 CLABPR02 47 0x01000000 3 0x00004013 30 WILDMAGE 25327 24282 24283 CLABMA01 52 0x80000000 1 0x80000000 31 BARBARIAN 25328 24229 24235 CLABFI05 51 0x40000000 2 0x40000000 32 Blackguard 28604 28605 28606 CLABPA06 53 0x00000021 6 0x00004020 And this is also not matching because we have BEASTMASTER while in hpclass.2da we have BEAST_MASTER (putting aside Blackguard which can be easily converted to uppercase). Then I noticed in kitlist.2da there is KITIDS column so I could have map of kit.ids values to description strrefs. In kit.ids we have: 0x4001 BERSERKER 0x4002 WIZARDSLAYER 0x4009 BEASTMASTER 0x4013 GODTALOS 0x40000000 BARBARIAN 0x4020 Blackguard This doesn't match neither hpclass.2da (WIZARDSLAYER, BEASTMASTER, GODTALOS) nor kitlist.2da (WIZARDSLAYER, GODTALOS). This is pretty much when my brain exploded. I guess game code uses numeric ids instead of those string values. But in hpclass.2da there is no numeric ids of class/kit. So how to translate classes from hpclass.2da to some numeric values I could match agains KITID column of clastext.2da or KITIDS column of kitlist.2da? One of my supposition is that many values in hpclass.2da are in fact invalid, but since only barbarian and dragon disciple use different hp table then base class, this not results with bug during game, because those kits has consistent naming. Quote
subtledoctor Posted May 20, 2023 Posted May 20, 2023 It’s just a mish-mash of things added at different times. Mostly it works as you expect it should work, with one or two small exceptions (WIZARDSLAYER vs. WIZARD_SLAYER). If you are getting caught up trying to implement something particular for a mod I’m sure someone can give you the particular answer. But in general, don’t let these small inconsistencies explode your brain. If you want to add entries to HPCLASS.2da, then the name should match kit.ids… then in KIT.ids it matches a hex number… then that hex number matches up to other kit characteristics in KITLIST.2da. (CLASTEXT.2da only controls some description text, you generally don’t need to worry about it.) Quote
kjeron Posted May 20, 2023 Posted May 20, 2023 CLASTEXT.2da runs off it's own KITID/CLASSID columns. Most other 2da's run off the kit's "ROWNAME" from KITLIST.2DA, excepting case. The "BEAST_MASTER" entry in HPCLASS.2da is ignored, it needs to be "BEASTMASTER", matching KITLIST.2DA. Quote
marchitek Posted May 20, 2023 Author Posted May 20, 2023 1 hour ago, kjeron said: CLASTEXT.2da runs off it's own KITID/CLASSID columns. Most other 2da's run off the kit's "ROWNAME" from KITLIST.2DA, excepting case. The "BEAST_MASTER" entry in HPCLASS.2da is ignored, it needs to be "BEASTMASTER", matching KITLIST.2DA. That makes sense. Thank you! I can only add that BLACKGUARD entry in hpclass is working, so matching is case insensitive, at least with this table. Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.