Config
A global API used to save and load avatar data between game sessions
warning
This page is a WIP. It contains all the information in Figura's documentation but we're working on adding more helpful descriptions.
setName()
Aliases: name()
Sets the name of the destination file, data will be saved and loaded from that file
Defaults to the avatar name
setName(name)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name | String | - | - |
Returns:
Type | Description |
---|---|
ConfigAPI | Returns self for chaining |
Example:
config:setName("Something")
getName()
Returns the name of the destination file
getName()
Returns:
Type | Description |
---|---|
String | - |
Example:
config:getName()
load()
Loads a saved variable under the specific key
If no key is given, it will return a table with all saved variables
- Overload 1
- Overload 2
Example:
config:load("apple")
save()
Save to disk a variable under the specific key
If the value is nil, the variable is removed from the file
save(key, value)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key | String | - | - |
value | AnyType | - | - |
Returns:
Type | Description |
---|---|
ConfigAPI | Returns self for chaining |
Example:
config:save("apple", false)