Save Data


Saves custom data to a file, with an optional password parameter for encrypting the file. The file is stored in the user's application data folder alongside their game saves. The data can be one of the following types: string, number, boolean, array, codex, coordinate, color, entity. If the provided filename ends with “.json”, the data is either an array or codex, and no password is used, the data will be stored as a human-readable JSON file.

For more information on using data files, check out Slayer's tutorial on YouTube.

Signature:

save_data(data, filename, password)
ArgumentDescriptionTypeRequired
data String, Number, Boolean, Array, Codex, Coordinate, Color, EntityYes
filename StringYes
password StringNo

Example:

 

Results:

Use the Save Data function to…


Editor Node: