Topic api
World Data Manager API
Functions
wdata.read (fname) | Reads config file from world directory. |
wdata.write (fname, data[, flags]) | Writes to config file in world directory. |
Tables
FlagsDef | Flags definition. |
Functions
- wdata.read (fname)
-
Reads config file from world directory.
Parameters:
- fname string Base filename with optional directory structure (e.g. "my_mod/my_config")
Returns:
-
table
Table with contents read from json file or
nil
. - wdata.write (fname, data[, flags])
-
Writes to config file in world directory.
Parameters:
- fname string Base filename with optional directory structure (e.g. "my_mod/my_config").
- data table Table data to be written to config file.
- flags FlagsDef (optional)
Returns:
-
bool
true
if succeeded,false
if not.