ReaScript Preset File
Preset script files allow you to modify main variables and functions used by a script without modifying its source, so that your modifications will be preserved even if the parent script is updated by its developer. It only works with scripts written with this concept in mind.
- Download the
Preset script.luanext to script you want to create a preset for (the parent script) and name it as you want. For that, press and RAW button and do CTRL+S for saving the file on your computer.
- Copy paste parent script file name to the
User Config Area 1/2section of the preset script.
- Copy paste parent script
User Config Areavariables to the
User Config Area 2/2section of the preset script.
- Alter the
User Config Area 2/2variables as you want.
- Import your preset in REAPER via Actions window New Action -> Load ReaScript.
- Wrap main code in a Init() as in
- Add boolean to prevent auto load the function if run from preset file.
- Have a user config area at top of the script.
- Prevent saving last input if necessary (for script with GUI) so that this feature stay for main script (not the preset, which usually will not have any popup).