Foldit recipes can be written using Lua Scripting. Lua is a simple programming language. Like GUI recipes, recipes written in Lua contain a series of instructions or commands that tell Foldit what to do with your protein.
Lua recipes have many features not found in GUI recipes. For one thing, more Foldit commands are available in Lua. Also, programming features, such as variables, if-then-else statements, while loops, and functions are available in Lua.
Lua is easy enough to learn that everyone can use it, even people who have never programmed or scripted before.
The best place to get started if you don't have any programming experience is to work through the beginner scripting tutorials:
- Lua Scripting Tutorial (Beginner 1)
- Lua Scripting Tutorial (Beginner 2)
- Lua Scripting Tutorial (Beginner 3)
If, on the other hand, you have some programming experience or want to get a quicker start, begin with Lua Scripting Tutorial (Intermediate). This intermediate tutorial starts from the ground up and assumes no prior knowledge but moves through material at a more rapid pace, including basics about how to run and modify scripts as well as core programming concepts like looping and variables.
Another option for experienced programmers is to use the full Lua Interface listing (below) in combination with the Lua Reference Manual to learn the material on your own. If you already know how to program, you'll find that it's just a matter of learning Lua's simple syntax and the Foldit command set. Additional resources for working with Lua are listed below, including guides to exporting and importing scripts.
Cookbook / Recipe Scripting TutorialsEdit
- 101 - Cookbook
- Lua Scripting Tutorial (Beginner 1) (browsing, loading and running scripts, open output window)
- Lua Scripting Tutorial (Beginner 2) (Lua commands)
- Lua Scripting Tutorial (Beginner 3) (using game commands)
- Lua Scripting Tutorial (Intermediate) (similar to Beginner 1-3, but more compact)
- Lua Scripting Tutorial (Advanced) (using functions and tables)
- User's Guide to Foldit Lua 2.0 API (blog entry by smith92clone )
- Foldit Scripting Preview
- Foldit Cookbook Scripting
Commands / FunctionsEdit
- Simplified list of Foldit Lua Functions (V1)
- Foldit Lua Functions (V1)
- Foldit Lua Functions (V2)
- Lua Standard Libraries (V2)
- Error Handling in Lua (V2)
- Lua Script Library (useful functions you can add to your recipes)
- Lua Export and Import of Scripts using Text and HEX editor
- Lua Export and Import of Scripts using WORDPAD++
- Lua Script Advice
- Lua Functions that should be implemented
- Foldit library for debugging
External / OtherEdit
- Lua 5.1 Reference Manual
- Lua-users wiki
- Programming in Lua Book (First Edition)
- Lua Wiki for WOW (WOW-specific but contains a lot of useful resources)
Lua Language Edit
Foldit Lua InterfaceEdit
See Foldit Lua Interface.