Skip to content

Give champion tomes their bonuses and read monster MODE settings from the right columns - #3906

Merged
erwan-joly merged 3 commits into
masterfrom
claude/project-thread-dmsvm2
Nov 29, 2026
Merged

erwan-joly merged 3 commits into
masterfrom
claude/project-thread-dmsvm2

Conversation

@erwan-joly

@erwan-joly erwan-joly commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Erwan · project thread

Two .dat decoding fixes found during the column audit. Part of #2873. Collector's Guide is left for #3905.

Champion tomes and life-skill books (Skill.dat)

Passive skills with a TYPE cast id from 19 to 46 (PvP boosts, Forgotten Hero journals, Loa tomes, Dragon and Techron books, Forgotten Dimension books, Fairy Affinity, chef, angler, pet trainer, fruit and catacomb guides) have no BASIC line. Until now only the training courses (kinds 4 to 9) got a BCard, so learning any of these did nothing.

For these kinds the DATA columns mean something else than for the courses:

DATA Courses 4-9 Kinds 19-46
c1 amount tier (1, 2, 3, 4)
c2 - amount
c3 - second amount (kinds 36-43 and 40: defence or MP)

Every one of the 65 rows matches its client tooltip with these readings (Bear Loa Tome c2 = 7000, "Increases maximum HP by 7000"; Expert Training for Chefs c2 = c3 = 100, "attack power by 100, defence by 100").

  • Parser: one table maps each kind to the BCards it grants. Where one amount raises several stats, the ratios come from the tooltips: melee, ranged and magic tomes give defence at half the amount, and ranged tomes also give hit rate at twice the amount and dodge equal to it. Course handling moved into AddBCards, so it reads the DATA columns directly.
  • Bonuses: experience (kind 29), gold (30) and double drop (46, Beginner Fruit-Picking Research) were only summed from buffs, gear and medals. They now include passive skills, like the stat and vitality services already did.

monster.dat MODE settings were read one column early

MODE is four BCard groups (c1-c20), five empty columns, then seven settings (c26-c32). The parser read the settings from c25-c31, so AlwaysActive was always false, CModeVNum held the range threshold, and OwnerBlessingCardId read c31 instead of c32. No pet's owner blessing (Golden Gloopy Cake 709 → card 840 and 58 other pets) was ever imported. The blessing feature only worked when the value was set by hand in the database.

The existing test that put 462 in c30 now asserts it as CModeVNum (462 is Mountain Turtle's mode monster), and a new test covers all seven settings. The monster.dat documentation snapshot is regenerated.

Tests

Parser: 507 passed. GameObject: 3561 passed (new PassiveTomeBonusTests).

Still for a client (added to documentation/manual-test-plan.md, Skill teachers)

  • Read a Bear Loa Tome (2468) with Character Info open: max HP +7000. An Eagle Loa Tome (2469): ranged attack +120, ranged defence +60, hit rate +240, dodge +120
  • Read a Vitality Guide (2721): max HP and MP +3000 each
  • With Aurelius Roshu's Primordial History (1) known, a kill gives 5% more experience
  • After a parser rerun, send a Golden Gloopy Cake (709) out with no SQL edit: the owner gets card 840

Client check

Tester (adventurer, level 90, champion level 60) with a Bear Loa Tome, an Eagle Loa Tome and a Vitality Guide in the bag and a Golden Gloopy Cake (709) in the team. Master was parsed with master's parser, the branch after a parser rerun from the branch; the scene and the steps are the same.

Master: the three books are read and the skills are stored, but Character Info does not move: HP 5650, MP 2775, ranged line 99, hit rate 100, dodge 102, ranged defence 90. No blessing buff next to the portrait.

master, before reading master, after all three books

Branch: the Golden Gloopy Cake's blessing (card 840) shows next to the portrait at login with no SQL edit. Bear Loa Tome: max HP 5650 → 12650. Vitality Guide: HP 15650 and MP 5775. Eagle Loa Tome: ranged attack, hit rate 100 → 340, dodge 102 → 222, ranged defence 90 → 150.

branch, before reading Bear Loa Tome Vitality Guide Eagle Loa Tome

Buff bar, master then branch:

Stats side by side after all three books, master then branch:

The attack lines on the branch are 10% higher than the tome alone gives (melee 99 → 108, ranged 99 + 120 → 240). That is the blessing card's own attack +10% (ItemAttackIncreased 10). Without the pet in the team, the same run gives melee 99 and ranged 219.


Generated by Claude Code

@erwan-joly erwan-joly self-assigned this Nov 29, 2026
@coderabbitai

coderabbitai Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c3e11e1 and 3474c97.

Files selected for processing: 9

  • documentation/dat/monster.dat.md
  • documentation/manual-test-plan.md
  • src/NosCore.GameObject/Services/BattleService/RewardService.cs
  • src/NosCore.GameObject/Services/ExperienceService/ExperienceBonusService.cs
  • src/NosCore.Parser/Parsers/NpcMonsterParser.cs
  • src/NosCore.Parser/Parsers/SkillParser.cs
  • test/NosCore.GameObject.Tests/Services/SkillService/PassiveTomeBonusTests.cs
  • test/NosCore.Parser.Tests/NpcMonsterParserTests.cs
  • test/NosCore.Parser.Tests/SkillParserTests.cs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copy link
Copy Markdown
Collaborator Author

Review: OK. The body promises a Golden Gloopy Cake (709) → card 840 check, but manual-test-plan.md doesn't have it; add that bullet. The parser has to run again after this lands. SkillParser.cs conflicts trivially with #3900.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CUfJ46iekh4rbiCyoTamtn


Generated by Claude Code

erwan-joly pushed a commit that referenced this pull request Nov 29, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gSmkVYHFq6wdFRBtmzrW5
@erwan-joly
erwan-joly force-pushed the claude/project-thread-dmsvm2 branch from a8da924 to 282606d Compare November 29, 2026 10:24

Copy link
Copy Markdown
Collaborator Author

Added the Golden Gloopy Cake (709) → card 840 check the PR body promises to documentation/manual-test-plan.md, after this PR's Loa Tome, Vitality Guide and Primordial History checks: rerun the parser, send the pet out with no database edit, and the owner gets card 840. Documentation only.


Generated by Claude Code

Copy link
Copy Markdown
Collaborator Author

Review: MERGE-WITH-NOTE

Fixed: nothing needed a fix commit; the branch stays at c54552b (not rebased, #3925 and #3919 are stacked on it).

Checked: the tome BCards are written by NosCore.Parser into the database, the stat ratios live in a parser table rather than read from descriptions, the MODE column shift is covered by a test of all seven settings, and the manual test plan has the new Skill teachers checks. No !, no ConfigureAwait, no BOM, no provenance in code, comments, commits or title. Built the solution; Parser tests 509/509 and the GameObject experience/reward/tome tests 68/68 pass.

Left (note, not blocking):

  • src/NosCore.GameObject/Services/BattleService/RewardService.cs:233 and :256: passive skills now feed the double-drop (kind 46) and gold (kind 30) bonuses, but only the experience path has a test (PassiveTomeBonusTests). A test that learns a DropX2Chance / ItemIncreaseEarnedGold passive and checks the drop count / gold reward would cover the other two.

Screenshots: present — master vs branch Character Info before and after each tome, the buff bar with the owner blessing, and a side-by-side of the final stats.

🤖 Generated with Claude Code


Generated by Claude Code

From cast id 19 on, a passive skill's DATA c1 is the tome's tier, c2 its
amount and c3 a second amount. Read them into BCards for every kind the
client describes, and count passive skills in the experience, gold and
double-drop bonuses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gSmkUfkSas3RmznMafvB5
MODE holds four BCard groups, five empty columns and then seven settings,
but the parser read each setting one column early. The last column, the
card a pet grants its owner, was never imported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014gSmkUfkSas3RmznMafvB5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CUfJ47EGEawjsFustqpb2f
@erwan-joly
erwan-joly force-pushed the claude/project-thread-dmsvm2 branch from c54552b to 3474c97 Compare November 29, 2026 14:10
@erwan-joly
erwan-joly merged commit 0fdca37 into master Nov 29, 2026
15 checks passed
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.

2 participants