Skip to content

Parse table/guildraid.xml - #98

Merged
AngeloTadeucci merged 1 commit into
masterfrom
guild-raid-table
Nov 18, 2026
Merged

AngeloTadeucci merged 1 commit into
masterfrom
guild-raid-table

Conversation

@AngeloTadeucci

@AngeloTadeucci AngeloTadeucci commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

A guild raid clear should add guild exp and guild fund. Each level's base amounts are in table/guildproperty.xml, and table/guildraid.xml holds the factor that scales them for each raid room. Nothing parsed guildraid.xml, so the emulator can't read those factors. This adds the type and TableParser.ParseGuildRaid().

  • Xml/Table/GuildRaid.cs, new: the four attributes each guildRaid row carries, dungeonRoomID, clearRaidPoint, clearGuildExp and clearGuildFund. The two factors are floats because the XML ships values like 1.25 and 1.75. feature and locale come from M2dFeatureLocale keyed on dungeonRoomID, the same way GuildQuestRewardFactor and GuildBuff filter their rows.
  • TableParser.cs: ParseGuildRaid() yields each row that survives feature filtering, keyed by room id. The file needs no sanitising.
  • TableParserTest.TestGuildRaid: under NA Live the parser returns exactly rooms 26001001 to 26005001. The test checks room 26001001 at 1000, 1 and 1, room 26004001 at 1000, 1.3 and 1.75, and room 26005001 at 1.4 and 2, as the shipped XML states. All rows are under GuildRaid01, which feature.xml sets to 35 for NA, below the NA Live setting of 47.
  • Version: 2.4.39.

The GMS2 file and the KMS2 end-of-service copy are the same 5 rows with the same attributes and values. They differ only in line endings, so the type fits both.

The consumer is MS2Community/PrivateMaple2#2272. Guild raid clears there add no guild exp or fund, and the fix needs this package.

Verification

  • dotnet build succeeds.
  • dotnet test Maple2.File.Tests --filter "FullyQualifiedName~TableParserTest" ran against the GMS2 archives. 158 passed and 1 failed. TestGuildRaid passes.
  • The failure is TestFieldMetaData, and it fails the same way on master without this change. Its assertion expects field 2000250's portal to field 2000114 to have portalIndoor set, but the shipped NA fieldmetadata.xml row has portalIndoor="0". I left it alone because it falls outside this change.
  • dotnet format whitespace --verify-no-changes is clean on the touched files.
  • dotnet pack Maple2.File.Parser/Maple2.File.Parser.csproj -c Release -p:PackageVersion=2.4.39-debug.0 was restored into a scratch emulator worktree, with Maple2.File.Ingest pointed at it. dotnet build Maple2.File.Ingest succeeded. A small probe there opened the real Xml.m2d the ingest reads, ran Filter.Load(reader, "NA", "Live") and ParseGuildRaid(), and printed 5 rows: 26001001 1000/1/1, 26002001 1000/1.1/1.25, 26003001 1000/1.2/1.5, 26004001 1000/1.3/1.75, 26005001 1000/1.4/2, all GuildRaid01.
  • Not run: the emulator's ingest, and anything in game. The emulator doesn't read this table yet.
  • I ran only TableParserTest, not the rest of Maple2.File.Tests.

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • New Features
    • Added support for reading guild raid information, including dungeon identifiers, clear rewards, guild experience, and guild funds.
    • Raid entries now support locale-specific feature selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The parser adds XML models and a ParseGuildRaid() method for guild raid table entries. The method yields each raid keyed by its dungeon room ID. A test checks five expected IDs and selected parsed values.

Changes: Guild raid parsing

Layer / File(s) Summary
Guild raid XML model
Maple2.File.Parser/Xml/Table/GuildRaid.cs
Adds XML models for the ms2 root and guild raid entries. The entry model exposes dungeon room ID and reward attributes, and the root applies locale selection to the raid list.
Parser integration and validation
Maple2.File.Parser/TableParser.cs, Maple2.File.Tests/TableParserTest.cs, Maple2.File.Parser/Maple2.File.Parser.csproj
TableParser initializes the guild raid serializer and adds ParseGuildRaid() to deserialize table/guildraid.xml and yield entries keyed by dungeon room ID. The test checks five IDs and selected values. The package version changes from 2.4.38 to 2.4.39.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: zintixx

Merge Risk: Minimal · up to 378ed

This adds parsing for the guild raid table with a matching test and a version bump. No functional risk was found, and the change is low risk to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Parse table/guildraid.xml" names the main change. The PR adds a GuildRaid row type, GuildRaidRoot, and TableParser.ParseGuildRaid() to read table/guildraid.xml. The title is short, specific…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Parse table/guildraid.xml" names the main change. The PR adds a GuildRaid row type, GuildRaidRoot, and TableParser.ParseGuildRaid() to read table/guildraid.xml. The title is short, specific, and matches the changeset. It does not cover the version bump or the test, which is expected.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ffc6d7c7-6c3b-4449-ab1a-60e24c1c3144
Commits

Reviewing files that changed from the base of the PR and between 7cbe52b and 378ed46.

Files selected for processing: 4

  • Maple2.File.Parser/Maple2.File.Parser.csproj
  • Maple2.File.Parser/TableParser.cs
  • Maple2.File.Parser/Xml/Table/GuildRaid.cs
  • Maple2.File.Tests/TableParserTest.cs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@AngeloTadeucci
AngeloTadeucci merged commit 62466ec into master Nov 18, 2026
3 checks passed
@AngeloTadeucci
AngeloTadeucci deleted the guild-raid-table branch November 18, 2026 01:38
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.

1 participant