Disappeared script. Need Post-Mortem

Started by alcor29

alcor29 Lv 1

@bkoep I had a script called Datacute Nanowiggle. It has disappeared. Can I please know the reason. LuaV1? GUI? It would help me realize that all of these disappearing recipes went for a good reason, and I could stop investigating and do something else. Or does it exist in the realm of non authorized or my cookbook database?

LociOiling Lv 1

Your old all.macro file is a starting point for locating a missing recipe.

The easiest way is to fire up an old Foldit, using "Play Offline". (Assuming you saved an old Foldit, in c:\oldfoldit or whatever.)

Open up the cookbook in your old Foldit and locate the recipe in question.

Hover over the recipe and click on "Edit recipe", the little notepad icon.

In the recipe editor window, you'll see (GUI), (ScriptV1), or (ScriptV2) after the recipe name in the title bar. GUI and ScriptV1 will require work, ScriptV2 is relatively easy.

For ScriptV1 and ScriptV2, you can click "Save As", then "Export" to save the recipe to a file. I'd suggest copying the recipe name that's displayed at the "Save As" step, by highlighting it and then control-c to copy.

At the "Export" step, select a location for your file. Paste in the recipe name, add .lua as the extension, and click "Save".

For a ScriptV2 recipe, you can now open the file in Notepad++ or another suitable editor, copy it, and paste it into a new recipe on the new website. (You can also copy directly from the old recipe editor, but my method gives you a nice backup.)

For a ScriptV1 recipe, you can try rav3n_pl's V1 to V2 converter program. It was available on the old site, but I don't know if it's on the new site yet. Otherwise, there are wiki pages that show the correspondence between V1 and V2, so a manual conversion is possible.

For a GUI recipe, there's no external format, so you can't save to a file. I created a Python program, MacroScanner, which converts GUI to Lua V2. MacroScanner works directly with all.macro. As a bonus, MacroScanner can also dump V1 and V2 recipes. I will take requests if you care to share your cookbook with me.

See https://fold.it/forum/discussion/the-new-cookbook in the discussion forum for MacroScanner, etc.

On the wiki, https://foldit.fandom.com/wiki/Lua_functions_V1_to_V2 has a table which shows the correspondence between V1 and V2. It's a starting point for conversion. The V2 functions may have different arguments in a different order, so you really have to look at the definitions of both the V1 and V2 versions of a function.

At a more technical level, V2 also includes some core Lua functions that were left out of V1, such as the math library. So you may be able to replace lots of V1 code with a simple call to a library function in V2.