BehaviorOptions 01a

The Recipe score modding checkbox in the behavior dialog controls whether a recipe can change the importance of key score parts.

Recipe score modding allows a Foldit recipe to change the relative importance of several score parts.

Recipe score modding was added to Foldit in 2020.

There's a "recipe score modding" checkbox in the behavior panel. Changes to score part importance are only effective if this box is checked. Opening a new puzzle or restarting Foldit clears the checkbox.

For each modifiable score part, there's a "getter" function to determine the current importance, and a "setter" function to change it.

Recipes can't change the setting of the "recipe score modding" checkbox. Recipes can indirectly determine whether the box is checked by changing a setting, then testing to see if the change has taken effect.

The default importance is 1.0. Values from 0.0 to 3.0 are valid. Values outside this range cause an error, which usually terminates the recipe. The pcall function can be used to trap errors of this type, see Using pcall to trap Lua errors for details.

In the behavior panel, the text of the "recipe score modding" checkbox turns red if a recipe has changed one of the defaults.

BehaviorOptions 02

The Recipe score modding checkbox turns red if a recipe has changed score part importance.

Importance values less than 1.0 reduce the normal importance of the score part, while values above 1.0 increase it.

The recipe score modding functions similar to changing Clashing Importance, which affects the clashing score part, but there are key differences. Valid values for clashing importance range between 0.0 and 1.0, so clashing importance can only be lowered, and not raised above its default value. Clashing importance can also be changed in the behavior menu, as well as in a recipe.

The modifiable score parts and the corresponding functions are:

score part setter getter
density behavior.SetDensityImportance behavior.GetDensityImportance
hiding behavior.SetHidingImportance behavior.GetHidingImportance
packing behavior.SetPackingImportance behavior.GetPackingImportance
pairwise behavior.SetPairwiseImportance behavior.GetPairwiseImportance

In addition to changing the importance of score parts, it's also possible to change the importance of sidechain and backbone hydrogen bonds. Similar to clashing importance, these settings can be changed using sliders in the behavior dialog, or through functions.

As in recipe score modding, the default importance for both types of hydrogen bonds is 1.0, and the valid settings range from 0.0 to 3.0.

The functions are:

bond type setter getter
backbone behavior.SetBackboneHBondImportance behavior.GetBackboneHBondImportance
sidechain behavior.SetSidechainHBondImportance behavior.GetSidechainHBondImportance
Community content is available under CC-BY-SA unless otherwise noted.