~~Title: ScriptConfig ~~
The **ScriptConfig** object is accessed via the **[[scriptinitdata|ScriptInitData]].config** and the **[[script|Script]].config** properties. The **[[scriptinitdata|ScriptInitData]].config** property allows a script (in its **[[..:scripting_events:oninit|OnInit]]** method) to specify what configuration properties it supports, and provide default values for them. The properties assigned in **[[..:scripting_events:oninit|OnInit]]** will then be available in Preferences for the user to edit, and the user-edited configuration can then be accessed by other script methods using **[[script|Script]].config**.\\
$$ Property Name
$$ Return Type
$$ Description
$$
$$ //variant//
$$ The properties of the **ScriptConfig** object are entirely determined by the script itself.
In the **OnInit** method, assign the default values of any configuration properties you want to this object. The type of each default value controls the type of the property.
The Preferences page only supports editing certain types of variables, so you must only assign properties of compatible types. Preferences supports:
* Boolean options (**True** or **False**) - the variable type must be //bool//
* Numeric options - the variable type must be //int//
* String options - the variable type must be //string//
* Multi-line string options - the variable type must be string and must contain at least one //CR/LF// pair. Note that a trailing //CR/LF// will be removed from the default value.
* Multiple string options - the variable type must be a **[[vector|Vector]]** of //strings//
* Drop-down list - the variable type must be a **[[vector|Vector]]** with an //int// as the first element (to specify the default selection), and strings for the remaining elements.