Interface CoreSetting
choices?: Record<string, string>;
config?: boolean;
default?: string | number | boolean | any[] | { [key: string]: any };
filePicker?:
| boolean
| "any"
| "audio"
| "folder"
| "font"
| "image"
| "imagevideo"
| "text"
| "video";
hint?: string;
input?: CustomFormInput;
name?: string;
onChange?: (
value: any,
options?: { [key: string]: any },
userId?: string,
) =>
| void
| Iterable<
(
value: any,
options?: { [key: string]: any },
userId?: string,
) => void,
any,
any,
>;
range?: { max: number; min: number; step?: number };
requiresReload?: boolean;
restricted?: boolean;
scope: "client" | "world" | "user";
type:
| typeof DataModel
| ArrayConstructor
| NumberConstructor
| StringConstructor
| BooleanConstructor
| ObjectConstructor
| DataField
| ((data: unknown) => unknown);
units?: string;
}
Index
Properties
Optionalchoices
If choices are defined, the resulting setting will be a select menu and type must be a string.
Optionalconfig
Specifies that the setting appears in the configuration view; default: true.
Optionaldefault
A default value for the setting.
OptionalfilePicker
| boolean
| "any"
| "audio"
| "folder"
| "font"
| "image"
| "imagevideo"
| "text"
| "video"
Setting is a file picker and type must be a string. You may use a boolean for any file type or
select a specific file type.
Optionalhint
A description of the registered setting and its behavior.
Optionalinput
A custom form field input used in conjunction with a DataField type.
Optionalname
The displayed name of the setting.
OptionalonChange
value: any,
options?: { [key: string]: any },
userId?: string,
) =>
| void
| Iterable<
(value: any, options?: { [key: string]: any }, userId?: string) => void,
any,
any,
>
An onChange callback function or iterable list of callbacks to directly receive callbacks from Foundry on setting change.
Optionalrange
If range is specified, the resulting setting will be a range slider.
OptionalrequiresReload
If true then a prompt to reload after changes occurs; default: false.
Optionalrestricted
If true then this setting is only visible to GM users.
scope
Scope for setting. client uses local storage, world is saved in Foundry DB for the World / only
accessible by GM for modification, and user is also saved in the Foundry DB associated w/ the current
user.
type
| typeof DataModel
| ArrayConstructor
| NumberConstructor
| StringConstructor
| BooleanConstructor
| ObjectConstructor
| DataField
| ((data: unknown) => unknown)
A constructable object, function, DataField instance, or DataModel.
Optionalunits
Additional string added next to the setting name to specify any descriptive unit type for the setting.
Defines the core Foundry options for a game setting.