Add json library and convert description table into json#807
Add json library and convert description table into json#807BuffYoda21 wants to merge 19 commits into
Conversation
|
Went ahead and pushed commit 3b5823d and a32fa39 for the sake of having them here. It currently has an issue that causes a crash during seed generation a few frames after displaying Just to clarify, everything works perfectly up until commit a3fe894 |
|
Decided to pivot my current approach and reset basically everything to how it was before I messed with it but keep the json files I made. This is because the way I was doing things (using a python script at the start of the build process to convert the json data into cpp code) was a little dumb and wouldn't have been great to maintain anyway. My new approach will have the json files embedded into the app it's self and read from them on app startup. |
|
Might as well take this opportunity to update my fork since there have been plenty of changes |
|
Small note, in order for intellesense not to get upset for trying to reference the json files, contributors will need to add |
This PR adds this json library that supports jsonc (which is +25k of this PR's diff) and goes ahead and converts all the descriptions originally defined in
descriptions.cppto json indescription_table.jsonc. There are alsoitem_table.jsonc,location_table.jsonc, andsettings_table.jsoncwhich are not implemented yet and are really just included in this PR so I don't lose them.I chose jsonc over json since these files would become the primary way developers would interact with surface level changes like adding a new item, setting, location, etc so making them more humanly readable is important. I understand that parsing jsonc vs json does take more overhead but the difference in runtime is all just startup cost and most users likely wouldn't notice a difference.
These data files are intended to be shared with the upcoming OoT3D archipelago implementation so that syncing changes between them remains easy. Best case scenario becoming entirely automated when a new release is published here.
Small note, in order for intellesense not to get upset for trying to reference the json files, contributors will need to add
"${workspaceFolder}/build"to their includePath inc_cpp_properties.json. Not sure if there is another better way to do this since that will mean if you haven't built the app yet or runmake cleanintellesense will get upset.-------------------- Original Post --------------------
Very big change but I believe this is the best way to ensure maintainability and scalability as the project grows. The json files used here can also be used for an eventual archipelago implementation making maintaining parody between the standalone and AP randomizers much easier. Currently plan to convert the following to be data driven (but will add to this list as necessary):