project.json structre - hayattgd/Emuratch GitHub Wiki

project.json is not formatted. Meaning you have to format it for better view.

Please extract .sb3 and check file yourself for more accurate information

targets

An array containing every sprites including Stage(backdrop).

Sprites

Sprites are located inside targets. For details, please extract .sb3 and see project.json yourself.

Blocks

Blocks are saved in key:value, where key is id of block and value contains actual information.

  • opcode : Actual type of block. Like motion_movesteps
  • next : Block id of next block
  • parent : Block id of previous block

inputs

Input field (which is replaceable with other block)

image basically, they are rounded box.


This is input of motion_gotoxy

image

"X": [
	1,
	[
		4,
		"0"
	]
],
"Y": [
	1,
	[
		4,
		"0"
	]
]

"X" and "Y" is just input name, so ignoring.

Currently, we know that 0, 0 is the correct inputs. So we only have to find zeros, and its written like "0".


Input of sensing_keypressed

image

"KEY_OPTION": [
	1,
	"A"
]

In the image, I specified space key. but now it's saying A.What is A?

...Let's take a look at previous one. It have array inside array. But, this time we have "A" instead of array. This is actually an id of block, "A" is id of sensing_keyoptions.

sensing_keyoptions is a dropdown menu that returns space. (I don't know why they are separated)


Input of control_if

image

"CONDITION": [
	2,
	"B"
],
"SUBSTACK": [
	2,
	"C"
]

This time, we have 2 inputs. One is for condition (sensing_keypressed) and second one for substack (motion_movesteps). "a" and "b" is not it's actual value, but instead, it's an id of block to reference.


another interesting thing...

fields

Drop down field (which is not replaceable with other block)

image basically, they are not dimmed. And it's dropdown menu.

fields are not so complicated compared to inputs.


This is fields of control_stop

"STOP_OPTION": [
	"other scripts in sprite",
	null
]

We only have to reference index 0 of this array to get value.


This is fields of data_showvariable

"VARIABLE": [
	"my variable",
	"`jEk@4|i[#Fk?(8x)AV.-my variable"
]

Sometimes, fields can contain 2 strings. one for display name, second one for id.

`jEk@4|i[#Fk?(8x)AV.-my variable is declared in variables section.

"variables": {
	"`jEk@4|i[#Fk?(8x)AV.-my variable": [
		"my variable",
		0
	]
},

Using these data, we can access to it's real value.