Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check new pc kit values #2055

Open
lynxlynxlynx opened this issue Mar 9, 2024 · 0 comments
Open

Check new pc kit values #2055

lynxlynxlynx opened this issue Mar 9, 2024 · 0 comments
Labels
bug game: bg2 good first issue tasks simple enough for someone completely new to the project research needed usually means testing in the original, to see how it behaved

Comments

@lynxlynxlynx
Copy link
Member

In bg2 chargen we explicitly set the kit of specialist mages to the baseclass constant of 0x4000 or-ed with the kit index (row index in the kitlist table). NPCs like Edwin on the other hand have it set to the usability value directly (which are famously unique).

In iwd1 and bg1 we do the sane thing and just use usability (though there are only specialist mages kits present):

gemrb/GUIScripts/bg1/GUICG22.py:127: GemRB.SetPlayerStat (MyChar, IE_KIT, Kit)
gemrb/GUIScripts/iwd/CharGen.py:1148: GemRB.SetPlayerStat (MyChar, IE_KIT, Kit)

vs

gemrb/GUIScripts/bg2/GUICG2.py:135: GemRB.SetPlayerStat (MyChar, IE_KIT, KitValue)
gemrb/GUIScripts/bg2/GUICG22.py:233: GemRB.SetPlayerStat (MyChar, IE_KIT, KitValue)

This discrepancy is odd and should be investigated. It's also the reason we have to jump through hoops in Actor::GetSpecialistSaveBonus and gemrb/GUIScripts/GUICommon.py:354. Since this is ancient code, I suspect we erroded the correct behaviour through time and either all kits should just use usability or specialist mages should be handled separately. Some remnants of that are in our magesch.2da handling, which also has a kit (usability) column.

So:

  1. Create a few characters in the original, at least a normal mage, a specialist, a gnome mage.
  2. Check with NearInfinity or some other tool what the stored values are. Warning, they're in big endian format, so compare to these values instead.
  3. Crosscheck with our behaviour
  4. Change it as needed
  5. Test for discrepancies — eg. is the stats screen displaying the correct kit? (many GUI functions rely on GetKitIndex working correctly)
@lynxlynxlynx lynxlynxlynx added bug game: bg2 good first issue tasks simple enough for someone completely new to the project research needed usually means testing in the original, to see how it behaved labels Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug game: bg2 good first issue tasks simple enough for someone completely new to the project research needed usually means testing in the original, to see how it behaved
Projects
None yet
Development

No branches or pull requests

1 participant