charon icon indicating copy to clipboard operation
charon copied to clipboard

Some new features that are hoped to be added

Open scriptkitz opened this issue 1 month ago • 4 comments

  1. add a new export format : Lua

  2. Enum/List type need DisplayName prop.

  3. Data columns can be set with client/server tags to facilitate support for exporting client/server configurations.

scriptkitz avatar Oct 30 '25 03:10 scriptkitz

Hello @scriptkitz !

  1. Do you mean that Pick List/Multi-Pick List needs not a Name/Value pair but a Name/Display Name/Value triple?
  2. This can be achieved even now through data post-processing.
  • You can copy the data to a different file
  • Export Schemas into 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 Schemas back
# 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:

deniszykov avatar Oct 30 '25 10:10 deniszykov

2.Do you mean that Pick List/Multi-Pick List needs not a Name/Value pair but a Name/Display Name/Value triple?

YES.

scriptkitz avatar Oct 31 '25 06:10 scriptkitz

Hi @scriptkitz!

I have planned these features for the next iteration:

  • add a new export format : Lua
  • Enum/List type need DisplayName prop.

deniszykov avatar Nov 21 '25 11:11 deniszykov

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.

scriptkitz avatar Nov 25 '25 01:11 scriptkitz