Foldit Wiki

101 - Cookbook

1,358pages on
this wiki
Add New Page
Comments3 Share
back to Foldit 101

The cookbook is the store for recipes. The cookbook is available everywhere except the Tutorial interface.

Editor's note: this page is supposed to be about the cookbook, but it's mostly about recipes. True, recipes go in the cookbook, but they have their own pages. Also, some of the information is a bit dated. Look for updates to this page in the near future.

LociOiling (talk) 21:01, February 1, 2017 (UTC)

Recipes are a way of automatically interacting with your protein, you can consistently repeat simple shake and wiggle routines or perform a series of complex routines which never stop!

The term recipes includes both GUI and Lua Scripts, the terms tend to be used interchangeably but they do represent different things.

GUI recipes perform predefined actions in a single sequence and can be compared to macros. Scripts use the more powerful Lua script and some libraries and can be compared to simple programming code.

Tip: GUI recipes stop running when you minimize the Foldit game window, Script recipes keep running in the background.

In August 2011 another version of Lua Scripts was introduced, scripts are now called: GUI, V1 or V2.

V2 introduced many new functions and libraries and will continue to be enhanced. GUI and V1 script types are supported for backward compatibility only.

And you may like to read: What's the point? Can't this just be automated using recipes?

If you have ideas and suggestions for the cookbook please add them to this post:

Robgee's Recipes - quick start guide

Download recipes Edit

There are some excellent recipes of both types written by Foldit players on the Foldit recipe page. Foldit 101 recommends Blue Fuse v1.1 as a very useful addition to your cookbook.

Tip: You must be logged into the Foldit web portal and have the game running. Downloading recipes to your game client requires chat to be operating. If you can't see Global Chat, you won't be able to download.

Tip: If you are running multiple clients you can still add recipes to the cookbook by clicking the blue screen icon on the cookbook and entering the script number found at the end of the address in your browser, Blue Fuse: number is 2052 as you can see from the link above. Note that you have to close the client with the global chat running last for the script to stay in your cookbook; actually the [all_macro] file which is where your recipes are kept.

Using more than one computer? Copy the all_macro file to a USB or your Cloud storage noting the file location in the Foldit directory structure, copy it to the other computer. Keeping a frequent backup of your all_macro file is highly recommended.

Groups usually have recipes which can only be used by members of the group; these recipes are available from the relevant group recipe pages.

Self shared recipes - are your own recipes which you share with yourself.

All recipes of any type are loaded up to the server the first time they are run as the Foldit team is also interested in how folders create and use recipes.

Running recipes Edit

Some recipes are very computer resource intensive, and may appear to run slowly, this may be a result of your particular computer configuration and available graphics processing.

If you notice Foldit running slowly there are some things you can do while running intensive, resource hungry recipes, particularly if you are not watching the recipe run.

Use the view menu to reduce the amount of drawing to the screen your computer has to do:

  • Uncheck all of the clashes and bond view options
  • Trace line is the fastest View protein option
  • hydro is the fastest color option
  • don't use the show exposed, issue analysis etc views
  • reduce the size of the Foldit window

Minimize the Foldit window so that it is not drawing at all. (GUI recipes will stop running!)

Recipes output to a text file on your computer [scriptlog.default.xml]. Note that this is overwritten if you start a new recipe. If you name your tracks look for the track name for example: [scriptlog.793-evo.xml] You can put a shortcut to the file on your desktop and right click to open it using Notepad or Notepad++. There is also a recipe to copy scriptlog.default.xml to a named file

Modify recipesEdit

You may want to modify (mod) a recipe, for example, to change a parameter in the options provided. Modifying is easy to do but take care as the in game editor will not check for errors. Good code writers explain the recipe options on the recipe page and in the code itself.

To modify a recipe click the Edit recipe button next to the recipe name in the cookbook, the edit window will open showing the code. Read any instructions that the code writer has provided and make your changes. You will need to use Save As to save the changes by changing the title of the recipe.

Tip (video here): use an external text (.txt) editor, or even a script editors like Notepad++.

Editing Scripts in Foldit, An Introduction (English version)09:18

Editing Scripts in Foldit, An Introduction (English version)

To do this, open a recipe in the Foldit editor. Cut the code (or copy it) by clicking on the code then Ctrl+x (or Ctrl+c) . Paste it (Ctrl+v) into a white page of your editor. In script editors, it's possible to select the script languages (choose Lua). The editor will highlight functions and Lua commands with colors. It will show you your main errors (unclosed loops etc). When done, come back to the Foldit editor by clicking on your code page, selecting all (Ctrl+A), copy (ctrl+c) and paste back to the empty page of your Foldit editor (Ctrl+ v). "Save As" takes track of the parent recipe. If you only changed some small think (debugging) of one of your recipe, you can only update the version in the "info" screen before to simply "save". If you then "share", the new version will be updated on the site, erasing the former version if you simply saved. Note that a backup of the older version still remains in the cookbooks. The users must load the new version if they want to test it.

Create recipesEdit

You can create new recipes from scratch or by modifying existing recipes.

To create GUI Recipes, click the Open Recipe Editor button on the cookbook, and an edit window will open.

Click New (GUI) and two blue bars will appear at the top of the window. Click the bars and a menu of actions will appear, the Help menu in the edit window has more detailed information about how to use the predefined actions.

To create the more powerful Lua scripts read the tutorials here.

Also see Lua scripting and Tlaloc Script Standards

The list of available functions for V2 is automatically created and updated: Foldit Lua Functions v2.

More standard Lua functions and libraries have been added, see the Lua manual. V2 scripts can now use the functions in the: Lua standard libraries.

To create a V2 recipe, open the recipe editor and click the "New (Script V2)" button at the bottom.

Access to cookbook while recipe is runningEdit

In the Selection interface only while a script is running, you can:

  • edit, add, save, and upload recipes the same way as you do without scripts runnin.
  • change the script you are running -- the change will take effect the next time you run the script

Sharing recipesEdit

Once you are satisfied with your recipes, consider sharing them with other players. Simply click the Share button in the Edit window and choose how you want to share. You can "Share with Public", which makes the recipe available to all players. If you're the member of a group, "Share with Group" makes the recipe available only to group members. The "Share with Me" option stores the recipe on the Foldit server, but only you can access it.

Sharing recipes across machines Edit

To share your personal selection of recipes across machines just take the all.macro file with you on a thumbdrive. You can use your operating system search functionality to find the all.macro file.

Or you can "share to myself" using the cookbook, any recipes you want to use on multiple machines.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.