data: port 26 MST tables and normalise deploy/system to the *_mst.json convention - #31
data: port 26 MST tables and normalise deploy/system to the *_mst.json convention#31Seltraeh wants to merge 3 commits into
Conversation
…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.
| @@ -0,0 +1,415 @@ | |||
| { | |||
There was a problem hiding this comment.
instead of renaming every file, can't we just rename deploy/system to deploy/mst?
There was a problem hiding this comment.
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; } |
There was a problem hiding this comment.
why do we need this? whats in unit_mst that we cant get from unit archive?
| * 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; } |
There was a problem hiding this comment.
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.
data: port 26 MST tables and normalise deploy/system to the *_mst.json convention
Branch:
split/02-mst-dataBase:
devMerge position: 02 of 13
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
*_mst.jsonconvention so files cross-reference directly against the IDA-decodedMstResponseclass names. All content-identical (git log --followconfirms). A few also correct the stem to the game's own table name:challenge_mis→chlng_mission_mst,receipes→recipe_mst,TEMP_daily_tasks→daily_task_mst.unit_mst(2,291 rows),mission_mst(3,433 rows, mergedF_MISSION_MST_1+_2),skill_mst(33k rows, mergedF_SKILL_MST_1..9),item_mst(1,668 rows), plusleader_skill_mst,dungeon_mst,area_mstand theunit_evofamily.unitMst(),missionMst(),itemMst()accessors and loaders; every existing load path updated for the rename.gacha.json→gacha_mst.json.Design note
The three cache accessors are added here rather than in the handler PRs that consume them, so
ServerCacheis 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>MstCachetype 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.