Skip to content

feat(UI): JSONize options#8442

Draft
scarf005 wants to merge 5 commits intocataclysmbn:mainfrom
scarf005:feat/jsonize-options
Draft

feat(UI): JSONize options#8442
scarf005 wants to merge 5 commits intocataclysmbn:mainfrom
scarf005:feat/jsonize-options

Conversation

@scarf005
Copy link
Copy Markdown
Member

@scarf005 scarf005 commented Apr 2, 2026

Purpose of change (The Why)

i hate having to recompile src/options.cpp for 20 seconds only to update a single value

Describe the solution (The How)

  • add OPTION / OPTION_GROUP JSON loading for static option definitions
  • move large static chunks of general, debug, performance, and world_default into data/json/options/*.json
  • add option-definition hot reload on option-page re-entry and F5
  • keep dynamic option families in C++ for now

Testing

  • cmake --build out/build/linux-full --target style-json-parallel
  • cmake --build --preset linux-full --target cataclysm-bn-tiles cata_test-tiles
  • ./out/build/linux-full/tests/cata_test-tiles \"json_option_definitions_are_loaded\"
  • ./build-scripts/lint-json.sh

Additional context

Draft while interface / graphics / android / dynamic world-default options are still being migrated.

Checklist

Mandatory

Optional

  • This is a C++ PR that modifies JSON loading or behavior.
  • I have documented the changes in the appropriate location in the docs/ folder.
  • New localizable fields need to be added to the lang/bn_extract_json_strings.sh script if it does not support them yet.

PR opened by gpt-5.4 high on opencode

@github-actions github-actions Bot added src changes related to source code. JSON related to game datas in JSON format. tests changes related to tests labels Apr 2, 2026
@scarf005 scarf005 force-pushed the feat/jsonize-options branch from 5c778c3 to 88a720e Compare April 2, 2026 12:04
@scarf005 scarf005 changed the title feat: move static option definitions into JSON feat: JSONize options Apr 3, 2026
@scarf005 scarf005 force-pushed the feat/jsonize-options branch 2 times, most recently from a370d30 to 11e75cb Compare April 7, 2026 17:19
@scarf005 scarf005 changed the title feat: JSONize options feat(UI): JSONize options Apr 8, 2026
Assisted-by: openai/gpt-5.4 on opencode
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
@scarf005 scarf005 force-pushed the feat/jsonize-options branch from 11e75cb to ae87a6a Compare April 8, 2026 00:38
scarf005 and others added 4 commits April 8, 2026 10:07
Assisted-by: openai/gpt-5.4 on opencode
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Assisted-by: openai/gpt-5.4 on opencode
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Assisted-by: openai/gpt-5.4 on opencode
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Assisted-by: openai/gpt-5.4 on opencode
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

JSON related to game datas in JSON format. src changes related to source code. tests changes related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant