Settings

class bioxtasraw.RAWSettings.RawGuiSettings(settings=None)

Bases: object

Essentially just a fancy wrapper for a big dictionary. It contains pretty much all of RAW’s settings, both for the GUI and for computation.

__init__(settings=None)

Constructor.

Parameters:

settings (dict, optional) – A dictionary with RAW settings. If not provided, then the default values of the settings are used.

findParamById(param_id)

Given a particular setting id, finds the name (key) associated with that id. Note that this will only work in a GUI setting.

Parameters:

param_id (int) – The setting’s id.

Returns:

key – The setting name.

Return type:

str

get(key)

Gets the setting value for the input key.

Parameters:

key (str) – The setting name to get the value of.

Returns:

setting – The setting value, which can be anything that can be included in a dictionary.

Return type:

object

getAllParams()

Gets the entire settings dictionary.

Returns:

settings – All of the settings.

Return type:

dict

getId(key)

Gets the Id associated with the setting. In the RAW GUI, this is a unique wx ID that can be used in windows that contain the setting value.

Parameters:

key (str) – The setting name to get the value of.

Returns:

id – The setting id.

Return type:

int

getIdAndType(key)

Gets the id and type of the setting.

Parameters:

key (str) – The setting name to get the value of.

Returns:

  • id (int) – The setting id.

  • type (str) – The setting type. Can be: text, bool, choice, float, int.

getType(key)

Gets the type of the setting, useful when auto-creating a GUI based on the settings.

Parameters:

key (str) – The setting name to get the value of.

Returns:

type – The setting type. Can be: text, bool, choice, float, int.

Return type:

str

set(key, value)

Sets the setting value for the input key to the input value.

Parameters:
  • key (str) – The setting name to get the value of.

  • value (object) – The new value of the setting.