BakkesMod Wiki
Advertisement

Settings files[]

In order to configure plugins, plugin settings files can be used. These files should have the file extension ".set" and must be placed in the bakkesmod/plugins/settings/ folder.

Loading of settings files[]

By default, all files matching *.set in the plugins/settings folder are loaded when the game/mod is loaded. Alternatively, the command "cl_settings_refreshplugins" can be used to reload all settings files whilst in-game.

Note: All files matching *.set will be loaded, so this means you do not have to have a matching dll name. This way you can split settings over multiple tabs if needed.

.set format[]

The .set files are simply text files, thus they can be edited with any text editor.

The first line of the .set file is the label that is shown in the left of the "plugins" tab in-game. From line 2 and onward, components can be declared. The components are in the forms described below.

A github repository showing how settings components are used inside plugin code can be found here: https://github.com/CinderBlocc/SettingsFileExamples

ID Parameters Type Info
0 Label|command Button Will execute command when button is pressed
1 Label|cvar Checkbox Will set cvar to true or false
2 Label|cvar|min_val|max_val Float range slider Range slider allowing the user to select a range (float). Generate new random value in plugin code with "cvarManager->getCvar("cvar").getFloatValue()"
3 Label|cvar|min_val|max_val Integer range slider Range slider allowing the user to select a range (int). Generate new random value in plugin code with "cvarManager->getCvar("cvar").getIntValue()"
4 Label|cvar|min_val|max_val Float slider Slider allowing the user to select one value (float)
5 Label|cvar|min_val|max_val Integer slider Slider allowing the user to select one value(int)
6 Label|cvar|options Combobox options=items inside the combobox in the form of label@value, separated by &. For example:

key1@value1&key2@value2, will display "key1" and "key2" to the user, and set cvar to either "value1" or "value2"

7 Same line Will make it so the item declared under this component is on the same line as the item declared above this component
8 Separator Will insert a separator line at this position
9 Label Label Will simply render the label, has the ability to display cvar values, for example:

9|cl_goalreplay_pov value is $cl_goalreplay_pov$.

10 cvar Grayed component start Will disable all components below if the evaluated cvar is false until grayed component end is found. Grayed components can be nested.

An "inverted" option is available by adding '!' to the front of the cvar name. This will invert the cvar's boolean value. i.e. "10|!cvar"

11 Grayed component end Ends the most recently declared grayed component section. Every 10| must be matched with an 11|
12 Label|cvar Textbox Will set cvar value equal to whatever is in the textbox. Note: this will automatically be applied as soon as a single character is added/removed/changed.
13 Label|cvar Color Edit A color picker for LinearColor cvars. Provides RGBA color in 0-255 range.

Notes[]

Labels for components are also used as identifiers, therefore if you use the same label for two components you could run into some issues, to fix this, simply add ##id to the label to add an identifier. IDs will not be displayed in the UI. For example

0|Start##defenderstart|defender_start

0|Start##otherstart|other_start

Advertisement