New tooling: dataproc library + resdat packer#852
Draft
lhearachel wants to merge 7 commits intopret:mainfrom
Draft
New tooling: dataproc library + resdat packer#852lhearachel wants to merge 7 commits intopret:mainfrom
dataproc library + resdat packer#852lhearachel wants to merge 7 commits intopret:mainfrom
Conversation
Gudf
reviewed
Dec 12, 2025
Contributor
There was a problem hiding this comment.
Suggestion: It would be nice to have generated constants to refer to the cldat entries.
Collaborator
Author
There was a problem hiding this comment.
I would like to defer that as part of a follow-up PR after all of these files have been unpacked.
Collaborator
Author
There was a problem hiding this comment.
I went ahead and wound up doing this anyways. Not too hard.
10abefb to
164b9d1
Compare
Collaborator
Author
|
I've included unpacked data files for the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There are two pieces to this PR:
dataproclibrary source code into the tree, which is a successor todatagenand our use ofrapidjson.resdatandcldatfiles from an input JSON structure.dataprocThis is a middleware library that acts as a director on top of a generic interface for accessing elements from a plain-text data structure. Right now, the only implementation is for JSON, but any language could theoretically be used, if the appropriate interface is fully implemented.
yyjsonserves as the back-end for processing JSON files and is vendored into the source tree. The vendored files include a patch that I applied on top of the base source code to add support for spanning offsets on each value-node in the parsed document.I'm open to discussion about pulling
yyjsonfrom upstream and storing my changes as a patch file instead.The library comes with smart reporting of errors for free. For instance, given the following function call:
And the following data file snippet:
{ "base_stats": { "hp": 90, "attack": 92, "defense": 512 } }The following error will be written to the console:
This behavior can be suppressed during initialization. More details are in the
README.md.resdatThis is a small tool that illustrates some basic usage of the
dataproclibrary. It takes a JSON file and processes it into the packed binary structures calledresdatandcldatin the source code. These binary files are used to load "packs" of resources in unison and assign them to various sprite templates.This PR also includes an unpack of the
resdatandcldatfiles used by the party menu application, as a reference for their structure. I will unpack the otherresdatandcldatfiles as part of this PR, but I wanted to get this up for review in case folks wanted to discuss ahead of time.I'll also be asking for help porting the existing
datagentools to this new library once it's merged.