Skip to content

Add 4d6 drop lowest and maximum first-level hit points as house rules - #346

Merged
mmacy merged 4 commits into
mainfrom
creation-house-rules
Nov 26, 2026
Merged

mmacy merged 4 commits into
mainfrom
creation-house-rules

Conversation

@mmacy

@mmacy mmacy commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Closes #341.

Adds two house rules for first-level character creation. Both are off by default, so Ruleset() is still the SRD as written.

  • Ruleset.ability_score_method is "3d6" (the default) or "4d6_drop_lowest". roll_ability_scores takes the same choice as its method keyword. On a 4d6 roll, AbilityScoreRolls.rolls stays the three dice that count, in the order thrown, and the new AbilityScoreRolls.dropped gives the die left out for each ability.
  • Ruleset.max_hp_at_first_level counts the first-level hit die as its maximum. roll_hit_points throws the same dice as with it off, so the starting gold roll that follows doesn't change, and the new HitPointRoll.maximized says the maximum was taken.
  • examples/rulesets/creation_house_rules.json is an example ruleset with both rules on and every Ruleset field written out, for a front end to copy. The ruleset options guide includes the file itself, and docs/adaptations.md records both rules as house rules that the SRD doesn't print.

NPC adventurers keep 3d6 whatever the ruleset says, and level_up is unchanged. Every new field has a default, so a 2.8.0 save, ruleset, and roll result still parse, and SCHEMA_VERSION stays 4.

How it was checked

The acceptance tests in tests/test_creation_house_rules.py were written before the implementation by a different agent. An independent review compared the branch with osrlib 2.8.0 over 4,200 cases (7 classes, 300 seeds, both reroll settings): with the defaults the results are byte-identical, and with the maximum on every draw is identical. Ten mutations of the rolling code were all caught by the tests.

https://claude.ai/code/session_01V7Ertq3gKJ46oFQD6635f3

…e rules

The new names are stubs with defaults and their final docstrings: `Ruleset.ability_score_method`
("3d6" or "4d6_drop_lowest") and `Ruleset.max_hp_at_first_level`, the `method` keyword of
`roll_ability_scores`, `AbilityScoreRolls.dropped`, and `HitPointRoll.maximized` (#341). The
`Ruleset` docstrings and the ruleset options guide name house rules as a third kind of flag, which
the SRD doesn't print and `Ruleset()` leaves off.

examples/rulesets/creation_house_rules.json is a ruleset document with both house rules on and
every other field written out at its default, with a README beside it, and the guide includes the
file through pymdownx.snippets.

tests/test_creation_house_rules.py marks the behaviour tests xfail until the creation-house-rules
chunk lands. Its unmarked tests pin that the 3d6 method and the default options draw and give what
osrlib 2.8.0 did, and that a save and a creation result that 2.8.0 wrote, kept under tests/saves/,
still load. The roll_hit_points example's output comments show the new field. No golden file
changes.

Claude-Session: https://claude.ai/code/session_01V7Ertq3gKJ46oFQD6635f3
…leset asks

roll_ability_scores takes its method keyword: "3d6" rolls as before, and "4d6_drop_lowest"
throws four d6 per ability, drops the first of the lowest, and records that die in
AbilityScoreRolls.dropped. It refuses an unknown method before its first draw.
create_character passes Ruleset.ability_score_method as the method.

roll_hit_points throws the same dice whatever max_hp_at_first_level says, and with the flag on
counts the hit die's size instead of the last die and sets HitPointRoll.maximized, so the
starting gold roll after it is unchanged. With both house rules at their defaults every draw and
result is what 2.8.0 gave. No golden file changes.

The changelog bullet for #341 goes under Unreleased, Added.

Claude-Session: https://claude.ai/code/session_01V7Ertq3gKJ46oFQD6635f3
…ations register

The adaptations register gains house rules as a third kind of entry and a House rules section
with one entry for ability_score_method and one for max_hp_at_first_level, each citing the tests
that lock it. The spec's Ruleset flag list and its rules-scope lines for ability scores and
first-level hit points name the two flags, and the RNG streams page says the ability scores take
18 creation draws with 3d6 and 24 with 4d6 drop lowest (#341).

Claude-Session: https://claude.ai/code/session_01V7Ertq3gKJ46oFQD6635f3
The acceptance tests of the character creation house rules now run as
ordinary tests. The review flagged an em dash and an en dash on two spec
lines this branch rewrote, and an ambiguous sentence in the ruleset guide.

Claude-Session: https://claude.ai/code/session_01V7Ertq3gKJ46oFQD6635f3
@mmacy
mmacy merged commit e9f5867 into main Nov 26, 2026
5 checks passed
@mmacy
mmacy deleted the creation-house-rules branch November 26, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 4d6 drop lowest ability scores and maximum first-level hit points as optional rules

1 participant