Help with coding a JSON file-based framework for extending features in a Unity mod

In my current project I want other modders to be able to add their own features via JSON files in a "pack" format. This involves lots of collections and JSON confusion. The following is a general example structure i want each pack to follow through JSON files. Each "*_registry" is its own file within a "pack" folder with its own name.
.
├── pack/
│ ├── need_registry/
│ │ ├── need/
│ │ │ ├── maxValue
│ │ │ ├── decayRate
│ │ │ └── healthDecayRate
│ │ ├── need...
│ │ ├── need...
│ │ └── need...
│ ├── spawns_registry/
│ │ ├── bsr_entry/
│ │ │ ├── level_barcode
│ │ │ └── spawners/
│ │ │ ├── spawner/
│ │ │ │ └── possible_barcodes/
│ │ │ │ └── multi_barcode/
│ │ │ │ ├── barcode
│ │ │ │ └── chancePercent
│ │ │ ├── spawner...
│ │ │ ├── spawner...
│ │ │ └── spawner...
│ │ ├── bsr_entry...
│ │ ├── bsr_entry...
│ │ └── bsr_entry...
│ └── consumables_registry/
│ └── barcode_match_entry/
│ ├── barcode
│ └── values/
│ ├── affect_need/
│ │ ├── needName
│ │ ├── amount
│ │ └── effects
│ ├── affect_need...
│ ├── affect_need...
│ └── affect_need...
├── pack...
├── pack...
└── pack...
.
├── pack/
│ ├── need_registry/
│ │ ├── need/
│ │ │ ├── maxValue
│ │ │ ├── decayRate
│ │ │ └── healthDecayRate
│ │ ├── need...
│ │ ├── need...
│ │ └── need...
│ ├── spawns_registry/
│ │ ├── bsr_entry/
│ │ │ ├── level_barcode
│ │ │ └── spawners/
│ │ │ ├── spawner/
│ │ │ │ └── possible_barcodes/
│ │ │ │ └── multi_barcode/
│ │ │ │ ├── barcode
│ │ │ │ └── chancePercent
│ │ │ ├── spawner...
│ │ │ ├── spawner...
│ │ │ └── spawner...
│ │ ├── bsr_entry...
│ │ ├── bsr_entry...
│ │ └── bsr_entry...
│ └── consumables_registry/
│ └── barcode_match_entry/
│ ├── barcode
│ └── values/
│ ├── affect_need/
│ │ ├── needName
│ │ ├── amount
│ │ └── effects
│ ├── affect_need...
│ ├── affect_need...
│ └── affect_need...
├── pack...
├── pack...
└── pack...
How would I start with writing the general model + serialization and deserialization to JSON of each pack?
0 Replies
No replies yetBe the first to reply to this messageJoin