3 replies [Last post]
LociOiling's picture
User offline. Last seen 3 hours 40 min ago. Offline
Joined: 12/27/2012

In case anyone missed the announcement, support for GUI recipes is slated to be removed in 2021.

There's now a Python-based converter called MacroScanner that can extract GUI recipes from your cookbook. Check out Python eats GUI for a quick overview of MacroScanner. The entire script can be downloaded from GitHub.

MacroScanner seems to work, but it's not very smart. The wiki has additional resources for refining the Lua scripts it generates.

Check out GUI to Lua - converting Co lapse's Settle for a detailed example of converting a GUI recipe by hand. The results are similar to what MacroScanner does. Then GUI to Lua - refining Co lapse's Settle shows how to refine the intial version by grouping repeated statements into a Lua function.

For reference, GUI commands to Lua functions, which gives the Lua V2 equivalents for each of the 21 GUI recipe commands. Each of the GUI commands now has its own wiki page, too.

See GUI commands Lua V2 equivalents for same information in table format.

Finally, GUI Recipe JSON names gets into the actual structure of the cookbook, giving the names used for various parts of a recipe. The cookbook is stored in a file called all.macro, which uses a format that it almost, but not quite compatible with the JSON data interchange format. (MacroScanner does a little bit of hammering to get JSON format, then uses standard Python functions to get at the data.)

LociOiling's picture
User offline. Last seen 3 hours 40 min ago. Offline
Joined: 12/27/2012
some updates...

See more python for info on a new version of MacroScanner, which includes the Lua "user pick" functions and the ability to dump Lua recipes as well as GUI.

Joined: 12/06/2008
Groups: Contenders
How can I tell?

How can I tell if a recipe needs to be converted to LUA V2? I think I can tell the difference between a GUI recipe and a LUA-based recipe. But how do I tell the difference between LUA V1 and LUA V2?

I can't find the post, but I remember someone writing that there is a program to convert our recipes to LUA 2. Where do I find that program?

joshmiller's picture
User offline. Last seen 1 week 3 days ago. Offline
Joined: 09/08/2017
Groups: Foldit Staff
Lua V1

Hey Boots, if you're on Windows, Rav3n_pl made a converter program here https://fold.it/portal/files/FolditLuaConverter.exe

The V1 functions look like this and the V2 functions look like this. More generally, V1 is in lower_snake_case and V2 is namespace.UpperCamelCase


Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, Boehringer Ingelheim, RosettaCommons