UNPKG

@skyrim-platform/papyrus-util

Version:

TypeScript library for the PapyrusUtil Skyrim modding utility

534 lines (482 loc) 40.9 kB
import { Form } from "skyrimPlatform"; /** MOD AUTHORS, READ! This script contains functions for saving and loading any amount of int, float, form and string values by name on a form or globally. These values can be accessed and changed from any mod which allows mods to become compatible with each other without adding any requirements to the other mod or its version other than this plugin. Values will stay on forms or globally until they are Unset or Cleared in case of lists. If value is set on a form and the object is deleted then THE value will be removed when saving game. If you are done with using a certain variable you should use Unset or Clear function to remove them but it is not required. Saving MCM config values here would allow other mods to change your mod settings which may be useful. It should also allow you to change MCM config script without worrying about versioning since there are no new variables in the script itself. Functions that start with File in the name will save values to a separate file, so that you can access the same values from all savegames. This may be useful for configuration settings. (FILE FUNCTIONS ARE DEPRECATED! USE JSONUTIL.PSC INSTEAD) Saved values take very little memory - expect to use less than 500 KB of physical memory even when setting thousands of values. Value names are not case sensitive, that means GetIntValue(none, "abc") == GetIntValue(none, "aBC"). All values are separated from each other by type! That means SetIntValue(none, "abc", 1) and SetFloatValue(none, "abc", 2.0) create separate entries and aren't affected by each other. StorageUtil.SetIntValue(none, "myValue", 1) StorageUtil.SetFloatValue(none, "myValue", 5.0) int value = StorageUtil.GetIntValue(none, "myValue") value == 1 ; true value == 5 ; false When choosing names for variables try to remember that all mods access the same storage, so if you create a variable with name "Name" then many other mods could use the same variable but in different ways that lead to unwanted behavior. It is recommended to prefix the variable with your mod name, that way you can be sure nobody else will try to use the same variable in their mod. For example realistic needs and diseases might set hunger as "rnd_hungervalue". You can also use this storage to make your mod functions available to other mods, for example if your mod has a function that sets an Actor to be invisible you could add a script that checks: int i = StorageUtil.FormListCount(none, "MakeInvisible") while(i > 0) i-- Actor make = StorageUtil.FormListGet(none, "MakeInvisible", i) as Actor if(make) MyScriptFunction(make) endif StorageUtil.FormListRemoveAt(none, "MakeInvisible", i) endwhile And the other mod could write: StorageUtil.FormListAdd(none, "MakeInvisible", myActor) to make someone invisible using your mod. But if your mod isn't present then nothing happens. This is just an example, I'm sure you can find better ways to implement compatibility, it would help to include a documentation for other modders if you do. /** /** Storage functions - values in save game file. */ /** Set int/float/string/Form value globally or on any form by name and return the value passed, or as uninitialized variable if invalid keys given. ObjKey: form to save on. Set none to save globally. KeyName: name of value. value: value to set to the given keys. If zero, empty, or none are given, the key will be unset. */ export declare const SetIntValue: (ObjKey: Form | null | undefined, KeyName: string, value: number) => number; export declare const SetFloatValue: (ObjKey: Form | null | undefined, KeyName: string, value: number) => number; export declare const SetStringValue: (ObjKey: Form | null | undefined, KeyName: string, value: string) => string; export declare const SetFormValue: (ObjKey: Form | null | undefined, KeyName: string, value: Form | null | undefined) => Form | null | undefined; /** Remove a previously set int/float/string/Form value on an form or globally and if successful. This will return false if value didn't exist. ObjKey: form to remove from. Set none to remove global value. KeyName: name of value. */ export declare const UnsetIntValue: (ObjKey: Form | null | undefined, KeyName: string) => boolean; export declare const UnsetFloatValue: (ObjKey: Form | null | undefined, KeyName: string) => boolean; export declare const UnsetStringValue: (ObjKey: Form | null | undefined, KeyName: string) => boolean; export declare const UnsetFormValue: (ObjKey: Form | null | undefined, KeyName: string) => boolean; /** Check if int/float/string/Form value has been set on form or globally. ObjKey: form to check on. Set none to check global value. KeyName: name of value. */ export declare const HasIntValue: (ObjKey: Form | null | undefined, KeyName: string) => boolean; export declare const HasFloatValue: (ObjKey: Form | null | undefined, KeyName: string) => boolean; export declare const HasStringValue: (ObjKey: Form | null | undefined, KeyName: string) => boolean; export declare const HasFormValue: (ObjKey: Form | null | undefined, KeyName: string) => boolean; /** Get previously saved int/float/string/Form value on form or globally. ObjKey: form to get from. Set none to get global value. KeyName: name of value. [optional] missing: if value has not been set, return this value instead. */ export declare const GetIntValue: (ObjKey: Form | null | undefined, KeyName: string, missing?: number) => number; export declare const GetFloatValue: (ObjKey: Form | null | undefined, KeyName: string, missing?: number) => number; export declare const GetStringValue: (ObjKey: Form | null | undefined, KeyName: string, missing?: string) => string; export declare const GetFormValue: (ObjKey: Form | null | undefined, KeyName: string, missing?: Form | null | undefined) => Form | null | undefined; /** Plucks a previously saved int/float/string/Form value on form or globally. Returning the value stored, then removing it from storage. ObjKey: form to pluck from. Set none to get global value. KeyName: name of value. [optional] missing: if value has not been set, return this value instead. */ export declare const PluckIntValue: (ObjKey: Form | null | undefined, KeyName: string, missing?: number) => number; export declare const PluckFloatValue: (ObjKey: Form | null | undefined, KeyName: string, missing?: number) => number; export declare const PluckStringValue: (ObjKey: Form | null | undefined, KeyName: string, missing?: string) => string; export declare const PluckFormValue: (ObjKey: Form | null | undefined, KeyName: string, missing?: Form | null | undefined) => Form | null | undefined; /** Get previously saved int/float/string/Form value on form or globally. ObjKey: form to get from. Set none to get global value. KeyName: name of value. amount: +/- the amount to adjust the current value by given keys will be initialized to given amount if it does not exist */ export declare const AdjustIntValue: (ObjKey: Form | null | undefined, KeyName: string, amount: number) => number; export declare const AdjustFloatValue: (ObjKey: Form | null | undefined, KeyName: string, amount: number) => number; /** Add an int/float/string/Form to a list on form or globally and return the value's new index. Index can be -1 if we were unable to add the value. ObjKey: form to add to. Set none to add global value. KeyName: name of value. value: value to add. [optional] allowDuplicate: allow adding value to list if this value already exists in the list. */ export declare const IntListAdd: (ObjKey: Form | null | undefined, KeyName: string, value: number, allowDuplicate?: boolean) => number; export declare const FloatListAdd: (ObjKey: Form | null | undefined, KeyName: string, value: number, allowDuplicate?: boolean) => number; export declare const StringListAdd: (ObjKey: Form | null | undefined, KeyName: string, value: string, allowDuplicate?: boolean) => number; export declare const FormListAdd: (ObjKey: Form | null | undefined, KeyName: string, value: Form | null | undefined, allowDuplicate?: boolean) => number; /** Get a value from list by index on form or globally. This will return 0 as value if there was a problem. ObjKey: form to get value on. Set none to get global list value. KeyName: name of list. index: index of value in the list. */ export declare const IntListGet: (ObjKey: Form | null | undefined, KeyName: string, index: number) => number; export declare const FloatListGet: (ObjKey: Form | null | undefined, KeyName: string, index: number) => number; export declare const StringListGet: (ObjKey: Form | null | undefined, KeyName: string, index: number) => string; export declare const FormListGet: (ObjKey: Form | null | undefined, KeyName: string, index: number) => Form | null | undefined; /** Set a value in list by index on form or globally. This will return the previous value or 0 if there was a problem. ObjKey: form to set value on. Set none to set global list value. KeyName: name of list. index: index of value in the list. value: value to set to. */ export declare const IntListSet: (ObjKey: Form | null | undefined, KeyName: string, index: number, value: number) => number; export declare const FloatListSet: (ObjKey: Form | null | undefined, KeyName: string, index: number, value: number) => number; export declare const StringListSet: (ObjKey: Form | null | undefined, KeyName: string, index: number, value: string) => string; export declare const FormListSet: (ObjKey: Form | null | undefined, KeyName: string, index: number, value: Form | null | undefined) => Form | null | undefined; /** Plucks a value from list by index on form or globally. The index is removed from the list's storage after returning it's value. ObjKey: form to pluck value from. Set none to get global list value. KeyName: name of list. index: index of value in the list. [optional] missing: if index has not been set, return this value instead. */ export declare const IntListPluck: (ObjKey: Form | null | undefined, KeyName: string, index: number, missing: number) => number; export declare const FloatListPluck: (ObjKey: Form | null | undefined, KeyName: string, index: number, missing: number) => number; export declare const StringListPluck: (ObjKey: Form | null | undefined, KeyName: string, index: number, missing: string) => string; export declare const FormListPluck: (ObjKey: Form | null | undefined, KeyName: string, index: number, missing: Form | null | undefined) => Form | null | undefined; /** Gets the value of the very first element in a list, and subsequently removes the index afterward. ObjKey: form to shift value from. Set none to get global list value. KeyName: name of list to shift it's first value from. */ export declare const IntListShift: (ObjKey: Form | null | undefined, KeyName: string) => number; export declare const FloatListShift: (ObjKey: Form | null | undefined, KeyName: string) => number; export declare const StringListShift: (ObjKey: Form | null | undefined, KeyName: string) => string; export declare const FormListShift: (ObjKey: Form | null | undefined, KeyName: string) => Form | null | undefined; /** Gets the value of the very last element in a list, and subsequently removes the index afterward. ObjKey: form to pop value from. Set none to get global list value. KeyName: name of list to pop off it's last value. */ export declare const IntListPop: (ObjKey: Form | null | undefined, KeyName: string) => number; export declare const FloatListPop: (ObjKey: Form | null | undefined, KeyName: string) => number; export declare const StringListPop: (ObjKey: Form | null | undefined, KeyName: string) => string; export declare const FormListPop: (ObjKey: Form | null | undefined, KeyName: string) => Form | null | undefined; /** Adjust the existing value of a list by the given amount. ObjKey: form to set value on. Set none to set global list value. KeyName: name of list. index: index of value in the list. amount: +/- the amount to adjust the lists current index value by. s 0 if index does not exists */ export declare const IntListAdjust: (ObjKey: Form | null | undefined, KeyName: string, index: number, amount: number) => number; export declare const FloatListAdjust: (ObjKey: Form | null | undefined, KeyName: string, index: number, amount: number) => number; /** Insert an int/float/string/Form to a list on form or globally and return if successful. ObjKey: form to add to. Set none to add global value. KeyName: name of value. index: position in list to put the value. 0 is first entry in list. value: value to add. */ export declare const IntListInsert: (ObjKey: Form | null | undefined, KeyName: string, index: number, value: number) => boolean; export declare const FloatListInsert: (ObjKey: Form | null | undefined, KeyName: string, index: number, value: number) => boolean; export declare const StringListInsert: (ObjKey: Form | null | undefined, KeyName: string, index: number, value: string) => boolean; export declare const FormListInsert: (ObjKey: Form | null | undefined, KeyName: string, index: number, value: Form | null | undefined) => boolean; /** Remove a previously added int/float/string/Form value from a list on form or globally and return how many instances of this value were removed. ObjKey: form to remove from. Set none to remove global value. KeyName: name of value. value: value to remove. [optional] allowInstances: remove all instances of this value in a list. */ export declare const IntListRemove: (ObjKey: Form | null | undefined, KeyName: string, value: number, allInstances?: boolean) => number; export declare const FloatListRemove: (ObjKey: Form | null | undefined, KeyName: string, value: number, allInstances?: boolean) => number; export declare const StringListRemove: (ObjKey: Form | null | undefined, KeyName: string, value: string, allInstances?: boolean) => number; export declare const FormListRemove: (ObjKey: Form | null | undefined, KeyName: string, value: Form | null | undefined, allInstances?: boolean) => number; /** Clear a list of values (unset) on an form or globally and the previous size of list. ObjKey: form to clear on. Set none to clear global list. KeyName: name of list. */ export declare const IntListClear: (ObjKey: Form | null | undefined, KeyName: string) => number; export declare const FloatListClear: (ObjKey: Form | null | undefined, KeyName: string) => number; export declare const StringListClear: (ObjKey: Form | null | undefined, KeyName: string) => number; export declare const FormListClear: (ObjKey: Form | null | undefined, KeyName: string) => number; /** Remove a value from list by index on form or globally and if we were successful in doing so. ObjKey: form to remove from. Set none to remove global value. KeyName: name of list. index: index of value in the list. */ export declare const IntListRemoveAt: (ObjKey: Form | null | undefined, KeyName: string, index: number) => boolean; export declare const FloatListRemoveAt: (ObjKey: Form | null | undefined, KeyName: string, index: number) => boolean; export declare const StringListRemoveAt: (ObjKey: Form | null | undefined, KeyName: string, index: number) => boolean; export declare const FormListRemoveAt: (ObjKey: Form | null | undefined, KeyName: string, index: number) => boolean; /** Get size of a list on form or globally. ObjKey: form to check on. Set none to check global list. KeyName: name of list. */ export declare const IntListCount: (ObjKey: Form | null | undefined, KeyName: string) => number; export declare const FloatListCount: (ObjKey: Form | null | undefined, KeyName: string) => number; export declare const StringListCount: (ObjKey: Form | null | undefined, KeyName: string) => number; export declare const FormListCount: (ObjKey: Form | null | undefined, KeyName: string) => number; /** Get the number of occurrences of a specific value within a list. ObjKey: form to check on. Set none to check global list. KeyName: name of list. value: value to look for. [optional] exclude: if true, function will return number of elements NOT equal to value. */ export declare const IntListCountValue: (ObjKey: Form | null | undefined, KeyName: string, value: number, exclude?: boolean) => number; export declare const FloatListCountValue: (ObjKey: Form | null | undefined, KeyName: string, value: number, exclude?: boolean) => number; export declare const StringListCountValue: (ObjKey: Form | null | undefined, KeyName: string, value: string, exclude?: boolean) => number; export declare const FormListCountValue: (ObjKey: Form | null | undefined, KeyName: string, value: Form | null | undefined, exclude?: boolean) => number; /** Find a value in list on form or globally and return its index or -1 if value was not found. ObjKey: form to find value on. Set none to find global list value. KeyName: name of list. value: value to search. */ export declare const IntListFind: (ObjKey: Form | null | undefined, KeyName: string, value: number) => number; export declare const FloatListFind: (ObjKey: Form | null | undefined, KeyName: string, value: number) => number; export declare const StringListFind: (ObjKey: Form | null | undefined, KeyName: string, value: string) => number; export declare const FormListFind: (ObjKey: Form | null | undefined, KeyName: string, value: Form | null | undefined) => number; /** Find if a value in list on form or globally exists, true if it exists, false if it doesn't. ObjKey: form to find value on. Set none to find global list value. KeyName: name of list. value: value to search. */ export declare const IntListHas: (ObjKey: Form | null | undefined, KeyName: string, value: number) => boolean; export declare const FloatListHas: (ObjKey: Form | null | undefined, KeyName: string, value: number) => boolean; export declare const StringListHas: (ObjKey: Form | null | undefined, KeyName: string, value: string) => boolean; export declare const FormListHas: (ObjKey: Form | null | undefined, KeyName: string, value: Form | null | undefined) => boolean; /** Sort an int/float/string/Form list by values in ascending order. ObjKey: form to sort on. Set none for global value. KeyName: name of value. */ export declare const IntListSort: (ObjKey: Form | null | undefined, KeyName: string) => void; export declare const FloatListSort: (ObjKey: Form | null | undefined, KeyName: string) => void; export declare const StringListSort: (ObjKey: Form | null | undefined, KeyName: string) => void; export declare const FormListSort: (ObjKey: Form | null | undefined, KeyName: string) => void; /** Fills the given input array with the values of the list on form or globally, will fill the array until either the array or list runs out of valid indexes ObjKey: form to find value on. Set none to find global list value. KeyName: name of list. slice[]: an initialized array set to the slice size you want, i.e. int[] slice = new int[10] [optional] startIndex: the starting list index you want to start filling your slice array with */ export declare const IntListSlice: (ObjKey: Form | null | undefined, KeyName: string, slice: number[], startIndex?: number) => void; export declare const FloatListSlice: (ObjKey: Form | null | undefined, KeyName: string, slice: number[], startIndex?: number) => void; export declare const StringListSlice: (ObjKey: Form | null | undefined, KeyName: string, slice: string[], startIndex?: number) => void; export declare const FormListSlice: (ObjKey: Form | null | undefined, KeyName: string, slice: Form[], startIndex?: number) => void; /** Sizes the given list to a set number of elements. If the list exists already it will be truncated when given fewer elements, or resized to the appropriate length with the filler argument being used as the default values Returns the number of elements truncated (signed) or added (unsigned) onto the list. ObjKey: form to find value on. Set none to find global list value. KeyName: name of list. toLength: The size you want to change the list to. Max length when using this function is 500. [optional] filler: When adding empty elements to the list this will be used as the default value */ export declare const IntListResize: (ObjKey: Form | null | undefined, KeyName: string, toLength: number, filler?: number) => number; export declare const FloatListResize: (ObjKey: Form | null | undefined, KeyName: string, toLength: number, filler?: number) => number; export declare const StringListResize: (ObjKey: Form | null | undefined, KeyName: string, toLength: number, filler?: string) => number; export declare const FormListResize: (ObjKey: Form | null | undefined, KeyName: string, toLength: number, filler?: Form | null | undefined) => number; /** Creates a copy of array on the given storage list at the given object+key, overwriting any list that might already exists. Returns true on success. ObjKey: form to find value on. Set none to find global list value. KeyName: name of list. copy[]: The papyrus array with the content you wish to copy over into StorageUtil [optional] filler: When adding empty elements to the list this will be used as the default value */ export declare const IntListCopy: (ObjKey: Form | null | undefined, KeyName: string, copy: number[]) => boolean; export declare const FloatListCopy: (ObjKey: Form | null | undefined, KeyName: string, copy: number[]) => boolean; export declare const StringListCopy: (ObjKey: Form | null | undefined, KeyName: string, copy: string[]) => boolean; export declare const FormListCopy: (ObjKey: Form | null | undefined, KeyName: string, copy: Form[]) => boolean; /** Outputs the values currently stored by the given object+key. Returns a new array containing the values. ObjKey: form to find value on. Set none to find global list value. KeyName: name of list. */ export declare const IntListToArray: (ObjKey: Form | null | undefined, KeyName: string) => number[]; export declare const FloatListToArray: (ObjKey: Form | null | undefined, KeyName: string) => number[]; export declare const StringListToArray: (ObjKey: Form | null | undefined, KeyName: string) => string[]; export declare const FormListToArray: (ObjKey: Form | null | undefined, KeyName: string) => Form[]; /** Returns array of forms from list that have (or optionally don't have) the specified form types. For valid list of form types, see FormType.psc or http://www.creationkit.com/GetType_-_Form ObjKey: form to find value on. Set none to find global list value. KeyName: name of list. FormTypeIDs[]: The int papyrus array with all the form types you wish to filter for [optional] ReturnMatching: By default, TRUE, the output Form[] array will contain forms from list that match the form types If set to FALSE, inverts the resulting array with forms that have a type that DO NOT match. */ export declare const FormListFilterByTypes: (ObjKey: Form | null | undefined, KeyName: string, FormTypeIDs: number[], ReturnMatching?: boolean) => Form[]; export declare const FormListFilterByType: (ObjKey: Form | null | undefined, KeyName: string, FormTypeID: number, ReturnMatching?: boolean) => Form[]; /** Counts each type of of any KeyName that starts with a given string prefix on all objects. PrefixKey: The string a KeyName must start with to be counted. Cannot be empty. */ export declare const CountIntValuePrefix: (PrefixKey: string) => number; export declare const CountFloatValuePrefix: (PrefixKey: string) => number; export declare const CountStringValuePrefix: (PrefixKey: string) => number; export declare const CountFormValuePrefix: (PrefixKey: string) => number; export declare const CountIntListPrefix: (PrefixKey: string) => number; export declare const CountFloatListPrefix: (PrefixKey: string) => number; export declare const CountStringListPrefix: (PrefixKey: string) => number; export declare const CountFormListPrefix: (PrefixKey: string) => number; export declare const CountAllPrefix: (PrefixKey: string) => number; /** Counts each type of of any KeyName that starts with a given string prefix on all objects. ObjKey: form to perform the prefix count on. PrefixKey: The string a KeyName must start with to be counted. Cannot be empty. */ export declare const CountObjIntValuePrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const CountObjFloatValuePrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const CountObjStringValuePrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const CountObjFormValuePrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const CountObjIntListPrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const CountObjFloatListPrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const CountObjStringListPrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const CountObjFormListPrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const CountAllObjPrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; /** Clears each type of of any KeyName that starts with a given string prefix on all objects. Returns the number of values/lists that were unset. PrefixKey: The string a KeyName must start with to be cleared. Cannot be empty. */ export declare const ClearIntValuePrefix: (PrefixKey: string) => number; export declare const ClearFloatValuePrefix: (PrefixKey: string) => number; export declare const ClearStringValuePrefix: (PrefixKey: string) => number; export declare const ClearFormValuePrefix: (PrefixKey: string) => number; export declare const ClearIntListPrefix: (PrefixKey: string) => number; export declare const ClearFloatListPrefix: (PrefixKey: string) => number; export declare const ClearStringListPrefix: (PrefixKey: string) => number; export declare const ClearFormListPrefix: (PrefixKey: string) => number; export declare const ClearAllPrefix: (PrefixKey: string) => number; /** Clears each type of of any KeyName that starts with a given string prefix on specific objects. Returns the number of values/lists that were unset. ObjKey: form to perform the prefix clear on. PrefixKey: The string a KeyName must start with to be cleared. Cannot be empty. */ export declare const ClearObjIntValuePrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const ClearObjFloatValuePrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const ClearObjStringValuePrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const ClearObjFormValuePrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const ClearObjIntListPrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const ClearObjFloatListPrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const ClearObjStringListPrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const ClearObjFormListPrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; export declare const ClearAllObjPrefix: (ObjKey: Form | null | undefined, PrefixKey: string) => number; /** Debug functions - can be helpful to find problems or for development. */ export declare const debug_DeleteValues: (ObjKey: Form | null | undefined) => void; export declare const debug_DeleteAllValues: () => void; export declare const debug_Cleanup: () => number; export declare const debug_AllIntObjs: () => Form[]; export declare const debug_AllFloatObjs: () => Form[]; export declare const debug_AllStringObjs: () => Form[]; export declare const debug_AllFormObjs: () => Form[]; export declare const debug_AllIntListObjs: () => Form[]; export declare const debug_AllFloatListObjs: () => Form[]; export declare const debug_AllStringListObjs: () => Form[]; export declare const debug_AllFormListObjs: () => Form[]; export declare const debug_AllObjIntKeys: (ObjKey: Form | null | undefined) => string[]; export declare const debug_AllObjFloatKeys: (ObjKey: Form | null | undefined) => string[]; export declare const debug_AllObjStringKeys: (ObjKey: Form | null | undefined) => string[]; export declare const debug_AllObjFormKeys: (ObjKey: Form | null | undefined) => string[]; export declare const debug_AllObjIntListKeys: (ObjKey: Form | null | undefined) => string[]; export declare const debug_AllObjFloatListKeys: (ObjKey: Form | null | undefined) => string[]; export declare const debug_AllObjStringListKeys: (ObjKey: Form | null | undefined) => string[]; export declare const debug_AllObjFormListKeys: (ObjKey: Form | null | undefined) => string[]; export declare const debug_GetIntObjectCount: () => number; export declare const debug_GetFloatObjectCount: () => number; export declare const debug_GetStringObjectCount: () => number; export declare const debug_GetFormObjectCount: () => number; export declare const debug_GetIntListObjectCount: () => number; export declare const debug_GetFloatListObjectCount: () => number; export declare const debug_GetStringListObjectCount: () => number; export declare const debug_GetFormListObjectCount: () => number; export declare const debug_GetIntObject: (index: number) => Form | null | undefined; export declare const debug_GetFloatObject: (index: number) => Form | null | undefined; export declare const debug_GetStringObject: (index: number) => Form | null | undefined; export declare const debug_GetFormObject: (index: number) => Form | null | undefined; export declare const debug_GetIntListObject: (index: number) => Form | null | undefined; export declare const debug_GetFloatListObject: (index: number) => Form | null | undefined; export declare const debug_GetStringListObject: (index: number) => Form | null | undefined; export declare const debug_GetFormListObject: (index: number) => Form | null | undefined; export declare const debug_GetIntKeysCount: (ObjKey: Form | null | undefined) => number; export declare const debug_GetFloatKeysCount: (ObjKey: Form | null | undefined) => number; export declare const debug_GetStringKeysCount: (ObjKey: Form | null | undefined) => number; export declare const debug_GetFormKeysCount: (ObjKey: Form | null | undefined) => number; export declare const debug_GetIntListKeysCount: (ObjKey: Form | null | undefined) => number; export declare const debug_GetFloatListKeysCount: (ObjKey: Form | null | undefined) => number; export declare const debug_GetStringListKeysCount: (ObjKey: Form | null | undefined) => number; export declare const debug_GetFormListKeysCount: (ObjKey: Form | null | undefined) => number; export declare const debug_GetIntKey: (ObjKey: Form | null | undefined, index: number) => string; export declare const debug_GetFloatKey: (ObjKey: Form | null | undefined, index: number) => string; export declare const debug_GetStringKey: (ObjKey: Form | null | undefined, index: number) => string; export declare const debug_GetFormKey: (ObjKey: Form | null | undefined, index: number) => string; export declare const debug_GetIntListKey: (ObjKey: Form | null | undefined, index: number) => string; export declare const debug_GetFloatListKey: (ObjKey: Form | null | undefined, index: number) => string; export declare const debug_GetStringListKey: (ObjKey: Form | null | undefined, index: number) => string; export declare const debug_GetFormListKey: (ObjKey: Form | null | undefined, index: number) => string; /** Storage functions - separate file. These are shared in all save games. Values are loaded and saved when savegame is loaded or saved. DEPRECATED v2.9: Replaced by JsonUtil functions. Existing functions here have been proxied to a shared json file to maintain compatibility. */ export declare const FileSetIntValue: (KeyName: string, value: number) => number; export declare const FileSetFloatValue: (KeyName: string, value: number) => number; export declare const FileSetStringValue: (KeyName: string, value: string) => string; export declare const FileSetFormValue: (KeyName: string, value: Form | null | undefined) => Form | null | undefined; export declare const FileAdjustIntValue: (KeyName: string, amount: number) => number; export declare const FileAdjustFloatValue: (KeyName: string, amount: number) => number; export declare const FileUnsetIntValue: (KeyName: string) => boolean; export declare const FileUnsetFloatValue: (KeyName: string) => boolean; export declare const FileUnsetStringValue: (KeyName: string) => boolean; export declare const FileUnsetFormValue: (KeyName: string) => boolean; export declare const FileHasIntValue: (KeyName: string) => boolean; export declare const FileHasFloatValue: (KeyName: string) => boolean; export declare const FileHasStringValue: (KeyName: string) => boolean; export declare const FileHasFormValue: (KeyName: string) => boolean; export declare const FileGetIntValue: (KeyName: string, missing?: number) => number; export declare const FileGetFloatValue: (KeyName: string, missing?: number) => number; export declare const FileGetStringValue: (KeyName: string, missing?: string) => string; export declare const FileGetFormValue: (KeyName: string, missing?: Form | null | undefined) => Form | null | undefined; export declare const FileIntListAdd: (KeyName: string, value: number, allowDuplicate?: boolean) => number; export declare const FileFloatListAdd: (KeyName: string, value: number, allowDuplicate?: boolean) => number; export declare const FileStringListAdd: (KeyName: string, value: string, allowDuplicate?: boolean) => number; export declare const FileFormListAdd: (KeyName: string, value: Form | null | undefined, allowDuplicate?: boolean) => number; export declare const FileIntListAdjust: (KeyName: string, index: number, amount: number) => number; export declare const FileFloatListAdjust: (KeyName: string, index: number, amount: number) => number; export declare const FileIntListRemove: (KeyName: string, value: number, allInstances?: boolean) => number; export declare const FileFloatListRemove: (KeyName: string, value: number, allInstances?: boolean) => number; export declare const FileStringListRemove: (KeyName: string, value: string, allInstances?: boolean) => number; export declare const FileFormListRemove: (KeyName: string, value: Form | null | undefined, allInstances?: boolean) => number; export declare const FileIntListGet: (KeyName: string, index: number) => number; export declare const FileFloatListGet: (KeyName: string, index: number) => number; export declare const FileStringListGet: (KeyName: string, index: number) => string; export declare const FileFormListGet: (KeyName: string, index: number) => Form | null | undefined; export declare const FileIntListSet: (KeyName: string, index: number, value: number) => number; export declare const FileFloatListSet: (KeyName: string, index: number, value: number) => number; export declare const FileStringListSet: (KeyName: string, index: number, value: string) => string; export declare const FileFormListSet: (KeyName: string, index: number, value: Form | null | undefined) => Form | null | undefined; export declare const FileIntListClear: (KeyName: string) => number; export declare const FileFloatListClear: (KeyName: string) => number; export declare const FileStringListClear: (KeyName: string) => number; export declare const FileFormListClear: (KeyName: string) => number; export declare const FileIntListRemoveAt: (KeyName: string, index: number) => boolean; export declare const FileFloatListRemoveAt: (KeyName: string, index: number) => boolean; export declare const FileStringListRemoveAt: (KeyName: string, index: number) => boolean; export declare const FileFormListRemoveAt: (KeyName: string, index: number) => boolean; export declare const FileIntListInsert: (KeyName: string, index: number, value: number) => boolean; export declare const FileFloatListInsert: (KeyName: string, index: number, value: number) => boolean; export declare const FileStringListInsert: (KeyName: string, index: number, value: string) => boolean; export declare const FileFormListInsert: (KeyName: string, index: number, value: Form | null | undefined) => boolean; export declare const FileIntListCount: (KeyName: string) => number; export declare const FileFloatListCount: (KeyName: string) => number; export declare const FileStringListCount: (KeyName: string) => number; export declare const FileFormListCount: (KeyName: string) => number; export declare const FileIntListFind: (KeyName: string, value: number) => number; export declare const FileFloatListFind: (KeyName: string, value: number) => number; export declare const FileStringListFind: (KeyName: string, value: string) => number; export declare const FileFormListFind: (KeyName: string, value: Form | null | undefined) => number; export declare const FileIntListHas: (KeyName: string, value: number) => boolean; export declare const FileFloatListHas: (KeyName: string, value: number) => boolean; export declare const FileStringListHas: (KeyName: string, value: string) => boolean; export declare const FileFormListHas: (KeyName: string, value: Form | null | undefined) => boolean; export declare const FileIntListSlice: (KeyName: string, slice: number[], startIndex?: number) => void; export declare const FileFloatListSlice: (KeyName: string, slice: number[], startIndex?: number) => void; export declare const FileStringListSlice: (KeyName: string, slice: string[], startIndex?: number) => void; export declare const FileFormListSlice: (KeyName: string, slice: Form[], startIndex?: number) => void; export declare const FileIntListResize: (KeyName: string, toLength: number, filler?: number) => number; export declare const FileFloatListResize: (KeyName: string, toLength: number, filler?: number) => number; export declare const FileStringListResize: (KeyName: string, toLength: number, filler?: string) => number; export declare const FileFormListResize: (KeyName: string, toLength: number, filler?: Form | null | undefined) => number; export declare const FileIntListCopy: (KeyName: string, copy: number[]) => boolean; export declare const FileFloatListCopy: (KeyName: string, copy: number[]) => boolean; export declare const FileStringListCopy: (KeyName: string, copy: string[]) => boolean; export declare const FileFormListCopy: (KeyName: string, copy: Form[]) => boolean; export declare const debug_SaveFile: () => void; /** Currently no longer implemented, unknown if/when they will return. */ export declare const debug_FileGetIntKeysCount: () => number; export declare const debug_FileGetFloatKeysCount: () => number; export declare const debug_FileGetStringKeysCount: () => number; export declare const debug_FileGetIntListKeysCount: () => number; export declare const debug_FileGetFloatListKeysCount: () => number; export declare const debug_FileGetStringListKeysCount: () => number; export declare const debug_FileGetIntKey: (index: number) => string; export declare const debug_FileGetFloatKey: (index: number) => string; export declare const debug_FileGetStringKey: (index: number) => string; export declare const debug_FileGetIntListKey: (index: number) => string; export declare const debug_FileGetFloatListKey: (index: number) => string; export declare const debug_FileGetStringListKey: (index: number) => string; export declare const debug_FileDeleteAllValues: () => void; export declare const debug_SetDebugMode: (enabled: boolean) => void; export declare const ImportFile: (fileName: string, restrictKey?: string, restrictType?: number, restrictForm?: Form | null | undefined, restrictGlobal?: boolean, keyContains?: boolean) => boolean; export declare const ExportFile: (fileName: string, restrictKey?: string, restrictType?: number, restrictForm?: Form | null | undefined, restrictGlobal?: boolean, keyContains?: boolean, append?: boolean) => boolean;