charon
charon copied to clipboard
Some new features that are hoped to be added
-
add a new export format : Lua
-
Enum/List type need DisplayName prop.
-
Data columns can be set with client/server tags to facilitate support for exporting client/server configurations.
Hello @scriptkitz !
- Do you mean that
Pick List/Multi-Pick Listneeds not a Name/Value pair but a Name/Display Name/Value triple? - This can be achieved even now through data post-processing.
- You can copy the data to a different file
- Export
Schemasinto temp file - Remove unnecessary "columns" (Schema Properties) from that file with yq by name or you can mark client columns and delete them based on this feature. You can modify the Specification field of column (Schema Property) in UI's JSON view.
- Import
Schemasback
# Create a client copy
# docs: https://gamedevware.github.io/charon/advanced/commands/data_backup.html
dotnet charon DATA BACKUP --dataBase "./gamedata.json" --output "./gamedata.client.json
# Export Schemas
# docs: https://gamedevware.github.io/charon/advanced/commands/data_export.html
dotnet charon DATA EXPORT --dataBase "./gamedata.client.json --schemas Schema --output "./schemas.client.json"
# Remove Schema Properties by Name
yq eval -i "del(.Collections.Schema[].Properties[] | select(.Name == "Id"))" ./schemas.client.json
# or remove Schema Properties by Specification value
yq eval -i "del(.Collections.Schema[].Properties[] | select(.Specification| contains("usage=client")))" ./schemas.client.json
# Import Schemas back
# docs: https://gamedevware.github.io/charon/advanced/commands/data_import.html
dotnet charon DATA IMPORT --dataBase "./gamedata.client.json" --schemas Schema --input "./schemas.client.json" --mode createAndUpdate"
If you use Unity/Unreal Engine this could be replaced with C#/C++ code using similar API:
- Unity CharonCli.cs
- Unreal Engine FCharonCli.h
2.Do you mean that Pick List/Multi-Pick List needs not a Name/Value pair but a Name/Display Name/Value triple?
YES.
Hi @scriptkitz!
I have planned these features for the next iteration:
- add a new export format : Lua
- Enum/List type need DisplayName prop.
That's great!
Also, have you considered using SQLite to store data? Because if the amount of data is large, reading and writing the entire JSON file every time there's a small change might affect efficiency, especially in a web-based multi-person development mode.