Add option to export grf file to JSON #46
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.
I added an option to export the data from a game rule file to a json file for use in other applications / tools.
This is a feature I really needed for one of my projects, and I figured it could be useful to other people also.
In the grf editor I added File > Export to JSON to the menubar

Here is a sample of the generated JSON
[ { "Name": "MapOptions", "Parameters": { "seed": "-5069382193672799790", "spawnX": "-62", "spawnY": "212", "spawnZ": "208", "flatworld": "false", "worldName": "IDS_ICARUS_WORLD_NAME", "worldDescription": "IDS_ICARUS_DESCRIPTION", "worldPreviewImage": "WorldSave/Icarus.png", "baseSaveName": "Icarus_MG03.mcs", "mapSize": "0", "themeId": "14", "texturePackId": "1031" }, "ChildRules": [] }, { "Name": "LevelRules", "Parameters": { "ruleType": "3" }, "ChildRules": [ { "Name": "ActiveChunkArea", "Parameters": { "name": "Box - 1", "x0": "-3", "z0": "-23", "x1": "-1", "z1": "-18" }, "ChildRules": [] }, (4014 more lines...)See the sister pull request in -OMI-Filetype-Library