-
Notifications
You must be signed in to change notification settings - Fork 4
RuneLite configuration introduction
This guide teaches you the required details you need to know about RuneLite configurations to fully utilize Plugin Presets.
RuneLite saves all of its client and plugin configurations to ~/.runelite/settings.properties file in your local machine. This file contains every configurable setting in RuneLite and it is used to remember your clients state between sessions. Settings file is not meant to be modified manually, it gets automatically updated when you make configuration changes in the client.
Configurations in the settings file are stored in a particular format. For example setting "Drag delay" from the Anti Drag plugin is stored in the settings file as follows:
antiDrag.dragDelay=30 where antiDrag is the groupName, dragDelay is the key and "30" is the value of the setting.
These settings in this particular format are used and handled with ConfigManager found in the RuneLite client api. When RuneLite starts it looks at your settings file and sets your clients configurations to match the settings file.
Plugin Presets handle presets with one simple loop. When Plugin Presets starts, it creates a copy of your current RuneLite configurations by listing all your plugins with PluginManagers getPlugins and parses every plugin configurations with ConfigManager and stores them in the Plugin Preset format. Current configurations are used to determine whether a preset matches with your current configurations.
When you modify your RuneLite configurations, configChanged event gets invoked and the plugin updates the current configurations list and then compares every preset again to determine which preset is on and off.
When a preset is loaded, your current configurations get overwritten with configurations from the loaded preset and then current configurations and preset comparing is done again.
Plugin Presets follow format as show below. Every preset has an id, a name and a list of saved pluginConfigs and optionally a keybind and a focus activation modifier.
Plugin Presets handle plugin configurations as pluginConfigs that contains a readable name of that plugin that is shown in the edit panel, configName that is used by ConfigManager, enabled value that determines whether or not the plugin is on or off and a list of settings that you edit from the RuneLite side panel. A single setting contains a readable name, a key that is used with ConfigManager and its value.
{
"id": 1672490728636,
"name": "Preset",
"keybind": {
"keyCode": 79,
"modifiers": 128
},
"pluginConfigs": [
{
"name": "Anti Drag",
"configName": "antiDrag",
"enabled": false,
"settings": [
{
"name": "Drag Delay",
"key": "dragDelay",
"value": "30"
},
{
"name": "On Shift Only",
"key": "onShiftOnly",
"value": "true"
},
{
"name": "Disable On Control Pressed",
"key": "disableOnCtrl",
"value": "false"
}
]
},
{
"name": "Attack Styles",
"configName": "attackIndicator",
"enabled": true,
"settings": []
},
{
"name": "Bank",
"configName": "bank",
"settings": [
{
"name": "Show Grand Exchange price",
"key": "showGE",
"value": "true"
}
]
}
]
}If you experience any issues with the wiki, or have a recommendation on how to improve it, please create an issue with relevant details.