Available since Version 1.27.
Gets a custom save data value for a mod.
Syntax
GetCustomSaveDataValues( [mod_name] )Arguments
- mod_name (string): The name of the mod to get the values from.
- Optional, defaults to the current mod.
Return Values
- (table<string, boolean | integer | number | string> | nil): A key/value table of all the values for the given mod or
nilif the mod has no data in the save file.
Examples
local MyModsValues = GetCustomSaveDataValues()
-- Do something with this mod's values
local AnotherModsValues = GetCustomSaveDataValues("DonutMod")
if AnotherModsValues ~= nil then
-- Do something with the other mod's values.
endNotes
This function will throw an error if it is called before the game's save manager is available (such as in CustomFiles.lua).