Repository navigation
contract: 16-bit CharFlag; me.maxdiff and me.ladder from the character flags - #69
Merged
Merged
Conversation
ResurrectedTrader
added this pull request to stack #78
October 6, 2026 23:12
ResurrectedTrader
force-pushed
the
charflag-16bit
branch
2 times, most recently
from
October 7, 2026 07:03
675b986 to
6fbb2bc
Compare
ResurrectedTrader
force-pushed
the
charflag-16bit
branch
4 times, most recently
from
October 7, 2026 07:30
128ed0b to
d9f5170
Compare
…r flags The game keeps the character flags as one 16-bit word: 1.14d stores BnetData+0x1EF with a word move and tests it as one. CharFlag is now uint16_t, and BnetData carries one CharFlag at 0x1EF where it split the word into nCharFlags and nMaxDiff, so GetCharFlags returns the whole word (ProgressionMask and WeaponSwitch read 0 before). GetMaxDiff and IsLadder leave the contract; the bindings derive them: - me.maxdiff is the progression, (flags & ProgressionMask) >> 8 - the acts completed across all difficulties, documented with how to turn it into a difficulty. 1.14d returned the same high byte (plus the WeaponSwitch bit). - me.ladder is a boolean, the Ladder bit (0x40), which 1.14d sets on realm characters and the creation screen's ladder toggle flips; the BnetData+0x3C0 byte read before is never touched by the game's own code. kolbot / SoloPlay only test it for truthiness or > 0; the character-state identity.ladder reads the same bit. The 1.14d congrats-screen intercept sets the progression bits to 10 instead of overwriting the whole high byte, so WeaponSwitch survives, and lod114d's GetGameType reads the flags' expansion bit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ResurrectedTrader
force-pushed
the
charflag-16bit
branch
from
October 7, 2026 07:35
d9f5170 to
86e3c40
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The character flags are one 16-bit word (1.14d stores and tests BnetData+0x1EF as a word):
CharFlagisuint16_t;BnetDatacarries oneCharFlagat 0x1EF instead of splitting it intonCharFlags/nMaxDiff, soGetCharFlags()returns the whole word.GetMaxDiff/IsLadderleave the contract; the bindings derive them from the flags.me.maxdiffis the progression(flags & ProgressionMask) >> 8(documented with how to turn it into a difficulty);me.ladderis a boolean, the Ladder bit (0x40) - the BnetData+0x3C0 byte read before is never written by the game. kolbot / SoloPlay only test it for truthiness /> 0. The character-stateidentity.ladderreads the same bit.GetGameTypereads the flags' expansion bit.Script-visible:
me.ladderis a boolean from the Ladder bit;me.maxdiffno longer carries the WeaponSwitch bit.Stack
Stacked on #68 (this PR's base branch); it depends on that change and the ones below it. Merge in order; once the base merges, this PR is retargeted to
main(automatically when the merged branch is deleted).Verification
build.ps1 Release(Win32, the 1.14d DLL): buildsbuild.ps1 test: 169/169 passbuild.ps1 check-format: cleanscripts/gen_enum_names.py --check: up to date🤖 Generated with Claude Code