Skip to content

data: port 26 MST tables and normalise deploy/system to the *_mst.json convention - #31

Open
Seltraeh wants to merge 3 commits into
decompfrontier:devfrom
Seltraeh:split/02-mst-data
Open

data: port 26 MST tables and normalise deploy/system to the *_mst.json convention#31
Seltraeh wants to merge 3 commits into
decompfrontier:devfrom
Seltraeh:split/02-mst-data

Conversation

@Seltraeh

@Seltraeh Seltraeh commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

data: port 26 MST tables and normalise deploy/system to the *_mst.json convention

Branch: split/02-mst-data
Base: dev
Merge position: 02 of 13

Part of the PR #28 split. Each PR branches from dev and contains only its
own changes, so this diff is exactly one subsystem. The set is designed to be
merged in numeric order; merging all 13 reproduces PR #28 byte for byte
(verified against tree 79a4e065).

Later PRs in the series touch Handlers.hpp, GmeControllerHandlers.cpp and
UserInfo.cpp too, so once earlier ones land this branch may need a rebase.
Those conflicts are always additions on both sides — keep both. Maintainer
edits are enabled, so feel free to push the rebase directly to this branch.

Data-only, plus the load-path updates the renames force. Large line count, near-zero review surface — 358,585 of the insertions are decoded game data.

What's included

  • 47 renames to the *_mst.json convention so files cross-reference directly against the IDA-decoded MstResponse class names. All content-identical (git log --follow confirms). A few also correct the stem to the game's own table name: challenge_mischlng_mission_mst, receipesrecipe_mst, TEMP_daily_tasksdaily_task_mst.
  • 26 new MST tables, notably unit_mst (2,291 rows), mission_mst (3,433 rows, merged F_MISSION_MST_1+_2), skill_mst (33k rows, merged F_SKILL_MST_1..9), item_mst (1,668 rows), plus leader_skill_mst, dungeon_mst, area_mst and the unit_evo family.
  • ServerCacheunitMst(), missionMst(), itemMst() accessors and loaders; every existing load path updated for the rename.
  • GachaArchiver — one line, gacha.jsongacha_mst.json.

Design note

The three cache accessors are added here rather than in the handler PRs that consume them, so ServerCache is touched once instead of by three separate branches. They are inert until called. Happy to move them into PRs 4/5/12 if you'd rather not have unused loaders — it costs a three-way conflict in one file.

Most of the newly added tables are on disk only: the matching <Name>MstCache type exists only where the packet-generator KDL declares it, and most of these have no KDL yet. They cost nothing at runtime.

Review focus

Filename correctness and that boot reports the expected row counts.

Verification

Fresh boot, no load errors, caches report 3,433 missions / 1,668 items / 2,291 units.

…n convention

Renames 47 files in deploy/system to the *_mst.json convention so they can be
cross-referenced directly against the IDA-decoded MstResponse class names. All
renames are content-identical; a few also correct the stem to match the game's
own table name (challenge_mis -> chlng_mission_mst, receipes -> recipe_mst,
TEMP_daily_tasks -> daily_task_mst).

Adds 26 newly decoded MST tables, including unit_mst (2291 rows), mission_mst
(3433 rows merged from F_MISSION_MST_1 and _2), skill_mst (33k rows merged
from F_SKILL_MST_1..9), item_mst (1668 rows), leader_skill_mst, dungeon_mst,
area_mst and the unit_evo family.

ServerCache gains unitMst(), missionMst() and itemMst() accessors with loaders
pointed at the new filenames, and every existing load path is updated for the
rename. GachaArchiver follows the same rename for gacha_mst.json.

Most of the newly added tables are on disk only for now: the matching
<Name>MstCache type exists only where the packet-generator KDL declares it,
and most of these do not have KDL yet. They cost nothing at runtime.
Comment thread deploy/mst/area_mst.json
@@ -0,0 +1,415 @@
{

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of renaming every file, can't we just rename deploy/system to deploy/mst?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought of that but then I realized, not everything in system is an MST. Some of the data in there came from something Arves concocted (or they got renamed and I didn't recognize the data) so I was naming things I imported from MSTs with the _MST suffix. If everything IS from MST then I'm fine losing the suffix and renaming the file but I'll have to look into this more.

* in ServerCache::Setup is uncommented.
* @return Vector of UnitMst entries
*/
inline const auto& unitMst() const { return m_unitMst; }

@Tom2096 Tom2096 Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this? whats in unit_mst that we cant get from unit archive?

Comment thread gimuserver/drogon/ServerCache.hpp Outdated
* for the full field map.
* @return Vector of MissionMst entries (3433 rows from the 21900 game data)
*/
inline const auto& missionMst() const { return m_missionMst; }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as above. energy cost, exp rewrad should be in mission under archive/ instead

Addresses the review question on this PR -- what mission_mst gives us that
deploy/archive/mission.json cannot, given "energy cost, exp reward should be
in mission under archive/ instead".

The answer is nothing today: no handler on this branch or any of the stacked
split branches (03-13) calls missionMst(). The getter, member, LoadJson and
auto_cache were dead weight, so this removes all four rather than keeping a
3433-row table cached for a consumer that does not exist.

The archive stays the source of truth for per-mission energy/exp/rewards. If
a handler later needs a field the archive lacks, the fix is to add it there,
not to re-cache the MST.

deploy/system/mission_mst.json is untouched -- the decoded data stays for
preservation, it is just no longer loaded at boot.
Review asked: "instead of renaming every file, can't we just rename
deploy/system to deploy/mst?"

The reply on this thread was that not everything in system/ is an MST. That
holds, but only for three files out of 77 -- features.json, brave_slots.json
and notice_info.json are server config and response fixtures, not decoded
tables. Every other file is.

So rather than renaming files, the directory splits by what the data IS:

  deploy/mst/     74 decoded MST tables (read-only reference data,
                  regenerated by tools/port_mst.py)
  deploy/system/  the 3 server config / response fixtures

config.json gains system_root beside mst_root, defaulting to "./system" so an
un-updated config still resolves. ServerCache reads the three fixtures from
system_root and everything else from mst_root; the stale
deploy/system/*_mst.json doc comments follow.

Checked before committing: all 49 mstRoot loads resolve to a file now in
deploy/mst, and all 3 systemRoot loads to one in deploy/system.

The *_mst.json filenames are left alone. The suffix is arguably redundant
under mst/, but dropping it is another 74 renames plus every LoadJson call,
and is worth agreeing separately rather than bundling here.
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