Eng:JSON Tutorial/Win32

This is a tutorial for modifying the Scratch JSON code on Windows32.

Requirements
You will need:
 * 1) The Scratch 2.0 Offline Editor
 * 2) A working knowledge of JSON
 * 3) A ZIP extractor and text editor (You probably have Microsoft Notepad)

Your computer will also need to show file extensions for every file (you can do that here).

Tutorial
Create the project you want to modify in the Offline Editor.



Save it to your Desktop.





Now, make sure that you can see the file extension.



You will need to rename the extension. If your project is named "MyProject.sb2", rename this to "MyProject.zip" On Windows, you may get a warning that the program may no longer work properly if the extension is renamed. Accept this warning as we will rename the file back to .sb2 later.



Open the zip file. You will see svg, png, and wav files with numbers. Those are the costumes and sounds for the project. Open project.json with Notepad. In this tutorial, we'll be changing the boolean to a string.

Search for your custom block. In this tutorial, the block is called "The Scratch Wiki".



Change the part that says:

to say:

Now save project.json, rename MyProject.zip to MyProject.sb2, and open it up with the offline editor.

Here is the finished result:



JSON Tutorial - Creating Custom Block drop-downs
Create a project with two Custom Blocks placed down in the Scratch Editor. define List Dropdown (list) List Dropdown [text...] define Variable Dropdown (var) Variable Dropdown [text...] Download the project as  open the ZIP file you just saved and open the File named , open this file in your built in text editor. In the file find the word 'Dropdown'. After the search you should find something that says: Were it says  in the "List Dropdown..." line replace that with. This tells you that it will be a list dropdown menu. Were it says  in the "Var Dropdown..." line replace that with. This simply means that it is a variable dropdown menu.

Next, Save the  file back into the .ZIP file. Open the Editor and click  and choose the .ZIP file. If a warning pops up click 'Yes'. Viola, here is the outcome: define List Dropdown (list) List Dropdown [ v] define Variable Dropdown (var) Variable Dropdown [ v]