Interface CoreSetting
choices?: Record<string, string>;
config?: boolean;
default: string | number | boolean | object;
filePicker?:
| boolean
| "any"
| "audio"
| "folder"
| "font"
| "image"
| "imagevideo"
| "text"
| "video";
hint?: string;
name?: string;
onChange?: Function
| Iterable<Function>;
range?: { max: number; min: number; step?: number };
requiresReload?: boolean;
scope: "client" | "world";
type:
| ObjectConstructor
| NumberConstructor
| StringConstructor
| BooleanConstructor
| ArrayConstructor
| new (...args: any[]) => DataModel
| (data: unknown) => unknown;
}
Properties
Optional
choices
If choices are defined, the resulting setting will be a select menu and type
must be a string
.
Optional
config
Specifies that the setting appears in the configuration view; default: true
.
default
A default value for the setting.
Optional
filePicker
| 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.
Optional
hint
A description of the registered setting and its behavior.
Optional
name
The displayed name of the setting.
Optional
onChange
An onChange callback function or iterable list of callbacks to directly receive callbacks from Foundry on setting change.
Optional
range
If range is specified, the resulting setting will be a range slider.
Optional
requiresReload
If true then a prompt to reload after changes occurs; default: false
.
scope
Scope for setting. client
uses local storage and world
is saved in Foundry DB.
type
| ObjectConstructor
| NumberConstructor
| StringConstructor
| BooleanConstructor
| ArrayConstructor
| new (...args: any[]) => DataModel
| (data: unknown) => unknown
A constructable object, function, or DataModel.
Defines the core Foundry options for a game setting.