Page tree

This page has not yet been translated to English.

Skip to end of metadata
Go to start of metadata

Importing game data from a specified file. Data must meet the requirements.

Importing technical entities Entity, Attribute and ProjectSettings is restricted.

Example:

Charon.exe DATA IMPORT --dataBase c:\myapp\gamedata.json --entities Character --input c:\myapp\character_names.json --inputFormat json --mode SafeUpdate

Command parameters

Parameter

Type

Required

Description

Example

dataBase

string

yes

Path to game data file. Use quotation marks if your path contains spaces.

"c:\my app\gamedata.json"
/User/Data/gamedata.json
entities

list of strings

Required if an array of documents is being supplied

A list of entities to import. Documents are imported into root lists of the entity's documents.

  • You can use wildcards (*) in the beginning and in the end of names.
  • You can use identifier in { } instead of entity name.
  • You can exclude certain names by using exclamaiton mark (!).

Default: all entities.

Character
Char*
*Modifier
*Mod*
{18d4bf318f3c49688087dbed}
Char* !Character
!*Item*

input

file, in, url

yes

Path to a file with data to import. Alternatively, you can use Standart Input or URL.

"c:\my app\input.json"
/User/Data/input.json
http://example.com/input.json
inputFormat

auto, json, bson, msgpack, xml, xlsx

no

Format of the game data being imported. See Supported data formats for more information. Can be identified automatically from file extension.

Default: auto.


inputFormattingOptions

See Supported data formats

no

Additional formatting parameters for game data being imported. Depend on selected data format.


mode

list:

  • CreateAndUpdate
  • Create
  • Update
  • SafeUpdate
  • Replace
  • Delete

no

Import mode:

  • CreateAndUpdate - Create new, upddate existing documents
  • Create - Only create documents which are missing from target game data file.
  • Update - Only update documents which are present in target game data file.
  • SafeUpdate - Only update existing fields for existing documents. Excludes creating, moving and erasing embedded documents.
  • Replace - Replaces entity's root list of documents. Existing documents will be deleted from target file.
  • Delete - Delete from target data file documents which are present in imported data file. Id is used to identify matches.

Default: CreateAndUpdate.


Related pages