Discuss Scratch
- Discussion Forums
- » Developing Scratch Extensions
- » Welcome to the Developing Scratch Extensions Forum!
- CyberVen
- Scratcher
8 posts
Welcome to the Developing Scratch Extensions Forum!
My browser / operating system: Ubuntu Linux, Firefox 117.0, No Flash version detected
I would like to point out that I don't have much experience with the development tools for scratch 3.0 extensions, but I would like to know if, following the guidelines reported on the page https://github.com/scratchfoundation/scratch-gui
It is normal to receive this message after the npm install command:
134 packages are looking for funding
run `npm fund` for details
116 vulnerabilities (10 low, 39 moderate, 55 high, 12 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix –force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
I also had further problems with the npm start command.
Could anyone give me some suggestions?
I would like to point out that I don't have much experience with the development tools for scratch 3.0 extensions, but I would like to know if, following the guidelines reported on the page https://github.com/scratchfoundation/scratch-gui
It is normal to receive this message after the npm install command:
134 packages are looking for funding
run `npm fund` for details
116 vulnerabilities (10 low, 39 moderate, 55 high, 12 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues possible (including breaking changes), run:
npm audit fix –force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
I also had further problems with the npm start command.
Could anyone give me some suggestions?
- gamerwithasolomanner
- Scratcher
15 posts
Welcome to the Developing Scratch Extensions Forum!
Extensions Distribution site is not opening please recheck
@gamerwithasolomanner
- Boss_1s
- Scratcher
100+ posts
Welcome to the Developing Scratch Extensions Forum!
I tried npm install in the terminal at Github Codespace but it gave me the following error:
My browser / operating system: ChromeOS 14816.131.0, Chrome 103.0.0.0, No Flash version detected
- I have already git cloned the …/google/closure-library repo on Github Codespace.
bossofcode/workspaces/scratch-blocks/scratch-blocks $ npm install
> scratch-blocks@0.1.0 prepublish
> python build.py && webpack
Traceback (most recent call last):
File “/workspaces/scratch-blocks/scratch-blocks/build.py”, line 39, in <module>
raise Exception(“Blockly build only compatible with Python 2.x.\n”
Exception: Blockly build only compatible with Python 2.x.
You are using: 3.10.8 (main, Oct 5 2023, 20:05:15)
npm ERR! code 1
npm ERR! path /workspaces/scratch-blocks/scratch-blocks
npm ERR! command failed
npm ERR! command sh -c python build.py && webpack
npm ERR! A complete log of this run can be found in: /home/codespace/.npm/_logs/2023-10-20T17_34_08_713Z-debug-0.log
- I have already git cloned the …/google/closure-library repo on Github Codespace.
Last edited by Boss_1s (Oct. 24, 2023 20:21:21)
Do <Highlight+shift+down arrow ::sensing> to see the rest of my signature. ::hat :: events
Generation 11: the first time you see this copy and paste it on top of your signature in the scratch forums and increase generation by 1. Social experiment.
✊ Support the suggestion HERE by adding this button to your signature ✊
Blocks Scratch should have:
substring [letter#1] [letter#2] [string] ::operators //finds the string between a string…and more!
pause [this script v] for (1) seconds ::control
(() or ()::operators)
(() and ()::operators) //same as the boolean, but for reporting
<my boolean ::variables> //only stores true or false
show all variables::variables
hide all variable::variables
show all lists::list
hide all lists::list
Alt accounts: @Boss_1sALT(for cloud testing and other stuff), @Boss_1sARCHIVE(Archive of older game versions)
Hi, my name is @Boss_1s!
I'm 12 years old, and I joined Scratch to relearn block coding.
Other projects:
https://scratch.mit.edu/projects/869604293/ - cool MMO platformer
https://scratch.mit.edu/projects/792424859/ - This is my first ORIGINAL game.
https://scratch.mit.edu/projects/914686250/ - NEW! Remixed an RPG from Griffpatch, though it's pretty boring right now…
https://scratch.mit.edu/projects/895107188/ - NEW! Safe chat with anyone on Scratch, whitelist is present
Secret Special Advanced Project (SSAdP): COMPLETED!!! https://scratch.mit.edu/projects/946720515/
Predominant Languages:
I speak American English and Chinese.
我說美文和中文。
That's all for my signature, folks! cya!
- StefanMIX
- Scratcher
100+ posts
Welcome to the Developing Scratch Extensions Forum!
private messaging. have you ever readen the list of rejected suggestions????? Can you add a chat like thing . Where you can search the user and chat with him . Think that I am making a project and I discuss with the scratchers I am collaborating with and I am telling them what to do so if anyone of my followers enters the studio , forum or comment section in which I am chatting with and the story is leaked now no one would be intersted to look at my projects . They will think -
“ Ah , there is nothing in this project I already know what is there in that . Waste of time”
- My followers
So I don't want this to happen please add the feature of chat . Also add the status feature so that we can know when to contact the scratchers
Regards,
Viva44
everybody does the kumquat stuff so i have to do my own
<:|>this is uhhh idk
he hates the bad guys
do not hate him
hes cool
- Amazing_Programming
- Scratcher
16 posts
Welcome to the Developing Scratch Extensions Forum!
Hey, the scratchx.org link is broken, please fix.
when green flag clicked
forever
say <[Pigs Fly] = [True]>
end
- GFredboi115
- Scratcher
1 post
Welcome to the Developing Scratch Extensions Forum!
I've got an idea! Import blocks. Like how some files can't be loaded on, but the import blocks helps by you getting a blank sprite, uploading whatever yr gonna update, and insert.
- Hiitbox
- Scratcher
76 posts
Welcome to the Developing Scratch Extensions Forum!
One basic question:
Is it possible to use an extension (Scratch or Turbowarp, preferably Turbowarp) to convert blocks into text, like a text editor (Tosh in Turbowarp or smth)
Is it possible to use an extension (Scratch or Turbowarp, preferably Turbowarp) to convert blocks into text, like a text editor (Tosh in Turbowarp or smth)
Wings of Fire Forever
Artist | Programmer | Gamer | YouTuber
Don't judge by my low post count!
Highlight and press Ctrl + Shift + Down to see more!
Want to give tips on anything I do? Check out my profile or YouTube!
Languages: Scratch, HTML, JavaScript, C++, C#, Python, Java
Games: Minecraft (Java, has Bedrock), Apex Legends
Art: I use Krita for my art and I draw Wings of Fire and animals (closest I get to people are anthro animals).
YouTube: @aqwek_
Call me aqwek_ if you'd like, this is an old account.
You just lost the game.
- EllBean
- Scratcher
12 posts
Welcome to the Developing Scratch Extensions Forum!
@Paddle2See, how do you create your signature? And is there a separate scratch forum for that?
Hi! I'm @EllBean! I hope that my post/reply was helpful! If it was not, please contact me on one of my projects! Keep on Scratching! Bye! :D
- EllBean
- Scratcher
12 posts
Welcome to the Developing Scratch Extensions Forum!
I have a signature, but I don't remember how I made it.
Hi! I'm @EllBean! I hope that my post/reply was helpful! If it was not, please contact me on one of my projects! Keep on Scratching! Bye! :D
- jgtygfytr
- Scratcher
25 posts
Welcome to the Developing Scratch Extensions Forum!
trans rights are human rights
- jgtygfytr
- Scratcher
25 posts
Welcome to the Developing Scratch Extensions Forum!
define hello
ask [help me] and say [hello]
what the block
Last edited by jgtygfytr (Nov. 4, 2023 15:53:21)
- jgtygfytr
- Scratcher
25 posts
Welcome to the Developing Scratch Extensions Forum!
hello!
create new block in my image
create new block in my image
when green flag clicked
create command <save in [html v]>
if <(hello) = 5> then
create command <delete in [html v]>
else
save in [html v]
end
this good?
- please enter comment
Last edited by jgtygfytr (Nov. 4, 2023 16:26:26)
- VangPhil
- Scratcher
2 posts
Welcome to the Developing Scratch Extensions Forum!
…
Last edited by VangPhil (Nov. 5, 2023 01:42:47)
- jgtygfytr
- Scratcher
25 posts
Welcome to the Developing Scratch Extensions Forum!
run ({create clone:: control} @addInput:: grey ring):: control
<() @addInput:: grey ring>
say (http:// [snap.berkeley.edu]:: sensing)
((6) × (7):: operators)
(join [hello ] [world] @delInput @addInput:: operators)
script variables ((foo):: grey) ((bar):: grey) @delInput @addInput:: grey
(all but first of @list:: list)
warp {
move (10) steps
} :: grey
report [Done!]:: control cap
(<> @addInput) // without even the:: grey ring
// new blocks
Last edited by jgtygfytr (Nov. 7, 2023 13:01:59)
- jgtygfytr
- Scratcher
25 posts
Welcome to the Developing Scratch Extensions Forum!
{{featured|May|2020}}This article demonstrates the '''[[Block Plugin]] syntax'''.
On the [[Scratch Discussion Forums|Scratch Forums]], code must be written between <code>[scratchblocks]...[/scratchblocks]</code> tags. (On the wiki, <code><nowiki><scratchblocks>...</scratchblocks></nowiki></code> tags are used.) For a simplified explanation, see [[topic:54562|here]].
Every [[Blocks|block]] goes on a new line and is written as the text on the block is shown on Scratch. For example:
{| class="wikitable" style="width:100%;"
|-
! Code
! Result
|-
| <pre>[scratchblocks]
when green flag clicked
forever
turn cw (15) degrees
say [Hello!] for (2) seconds
if <mouse down?> then
change [mouse clicks v] by (1)
end
end
[/scratchblocks]</pre>
|<scratchblocks>
when green flag clicked
forever
turn cw (15) degrees
say [Hello!] for (2) seconds
if <mouse down?> then
change [mouse clicks v] by (1)
end
end
</scratchblocks>
|}
== Arguments ==
[[Arguments]], or inputs to a block, are represented within the block with various codes.
=== Numerical Insert ===
The round numerical insert is used with parentheses: <code>(10)</code>.
<pre>move (10) steps</pre>
<scratchblocks>move (10) steps</scratchblocks>
=== String Insert ===
[[String]] inputs are created with square brackets: <code>[lorem ipsum]</code>
<pre>say [Hi]</pre>
<scratchblocks>say [Hi]</scratchblocks>
<pre>think [bye]</pre>
<scratchblocks>think [bye]</scratchblocks>
<!-- first change i the wiki for pjtnt11 --><!-- congrats ~from Kenny2scratch -->
=== Block Insert ===
[[Boolean Block|Boolean blocks]] and [[Reporter Block|reporter blocks]] are created with <code><boolean></code> and <code>(reporter)</code>, respectively.
<pre>if <<mouse down?> and <(costume #) = [1]>> then
stamp
end</pre>
<scratchblocks>
if <<mouse down?> and <(costume #) = [1]>> then
stamp
end
</scratchblocks>
Boolean blocks used to appear round, like reporters, but this was corrected with scratchblocks3.
=== Color Picker ===
{{External Programs}}
A color picker is represented with <code>[#hexcode]</code>. #hexcode is a hexadecimal color code.
<pre>set pen color to [#00ff00]</pre>
<scratchblocks>set pen color to [#00ff00]</scratchblocks>
[http://colorpicker.com colorpicker.com] can be used to find hexadecimal colors.
=== Dropdown List ===
Dropdown lists are created with the code <code>[selection v]</code>.
<pre>stop [all v]</pre>
<scratchblocks>stop [all v]</scratchblocks>
Round dropdowns are created with <code>(selection v)</code>.
<pre>broadcast (start v)</pre>
<scratchblocks>broadcast (start v)</scratchblocks>
== Special Blocks ==
Some blocks have different code based on their unique shapes and features, as well as technical limitations.
=== Hat Blocks ===
The [[When Green Flag Clicked (block)|When Green Flag Clicked]] block can be typed with any of the following syntax options:
<pre>when green flag clicked
when gf clicked
when flag clicked</pre>
<scratchblocks>when gf clicked</scratchblocks>
For the [[When () Clicked (block)|When () Clicked]] block, the [[Block Plugin (1.4)/Syntax#Hat Blocks|old block plugin]] required the sprite's name to be surrounded by brackets. This is no longer necessary:
<pre>when this sprite clicked</pre>
<scratchblocks>when this sprite clicked</scratchblocks>
The [[When () Key Pressed (Events block)|when () key pressed]] block uses a drop-down menu:
<pre>when [space v] key pressed</pre>
<scratchblocks>when [space v] key pressed</scratchblocks>
===Stack Blocks===
The [[Turn () Degrees (block)|Turn () Degrees]] (clockwise) block can be written two ways:
<pre>turn cw () degrees
turn right () degrees</pre>
<scratchblocks>turn cw () degrees</scratchblocks>
The Turn () Degrees (counter-clockwise) block can be written two ways:
<pre>turn ccw () degrees
turn left () degrees</pre>
<scratchblocks>turn ccw () degrees</scratchblocks>
=== C Blocks ===
[[C Block|C blocks]] must be closed by typing "end" after the last stack block inside it. However, C blocks at the end of a script will close automatically. For example:
<pre>repeat (10)
move (5) steps
stamp
end
repeat (10)
move (10) steps
stamp</pre>
Makes:
<scratchblocks>
repeat (10)
move (5) steps
stamp
end
repeat (10)
move (10) steps
stamp
</scratchblocks>
== Comments ==
[[Comment (programming feature)|Comments]] are created with two slashes: <code>// comment</code> after a block.
<pre>move (10) steps // is that too far?</pre>
<scratchblocks>move (10) steps // is that too far?</scratchblocks>
== Custom Blocks ==
If one tries to show a custom block, it will appear obsolete (red) because it has not been defined.
<pre>jump</pre>
<scratchblocks>jump</scratchblocks>
A definition can be created by writing "define" followed by the name of the block:
<pre>define jump
repeat (10)
change y by (4)
end</pre>
<scratchblocks>
define jump
repeat (10)
change y by (4)
end
</scratchblocks>
Number, boolean, and string arguments can be added:
<pre>define jump (height) <gravity on?> [message]</pre>
<scratchblocks>define jump (height) <gravity on?> [message]</scratchblocks>
Once a define hat has been made, one can then use the block ''inside the same <scratchblocks> tag'', and it will no longer appear obsolete.
<pre>jump
define jump
repeat (10)
change y by (4)
end</pre>
<scratchblocks>
jump
define jump
repeat (10)
change y by (4)
end
</scratchblocks>
=== Custom Block Inputs ===
If one tries to use an input reporter without making a block definition first, it will appear as a [[variable]].
<pre>say (height)</pre>
<scratchblocks>say (height)</scratchblocks>
But if it is put below a block definition, it will render as an input reporter:
<pre>define jump (height)
say (input)</pre>
<scratchblocks>
define jump (height)
say (height)
</scratchblocks>
== List Reporters ==
If one tries to write a list reporter, it will look like a variable reporter, because the plugin has no way of telling them apart.
<pre>say (list of Scratch team members)</pre>
<scratchblocks>say (list of Scratch team members)</scratchblocks>
However, if one has used the list in a '''list block''' ''inside the same <scratchblocks> tag'', then it will render correctly:
<pre>add [mres] to [list of Scratch team members v]
add [paddle2see] to [list of Scratch team members v]
add [harakou] to [list of Scratch team members v]
say (list of Scratch team members)</pre>
<scratchblocks>
add [mres] to [list of Scratch team members v]
add [paddle2see] to [list of Scratch team members v]
add [harakou] to [list of Scratch team members v]
say (list of Scratch team members)
</scratchblocks>
If a list block is not wanted or needed inside the same <scratchblocks> tag, <code>:: list</code> can be used:
<pre>say (list of Scratch team members:: list)</pre>
<scratchblocks>
say (list of Scratch team members:: list)
</scratchblocks>
== Shortening Source Code ==
It is possible to make the source of ScratchBlocks code slightly shorter by removing unnecessary code. No spaces are necessary between an insert and the block text. Also, closing brackets (<code>]</code>) and parentheses (<code>)</code>) can be left off at the end of a line. Therefore, the following two snippets render identically, though the first is 226 characters, and the second only 183:
<pre>when gf clicked
ask [n=] and wait
set [n v] to (answer)
set [i v] to [0]
repeat until <(n) = [1]>
if <((n) mod (2)) = [0]> then
set [n v] to ((n) / (2))
else
set [n v] to (((3) * (n)) + (1))
end
change [i v] by (1)
end
say (i)</pre>
<pre>when gf clicked
ask[n=]and wait
set[n v]to(answer
set[i v]to[0
repeat until<(n)=[1
if<((n)mod(2))=[0]>then
set[n v]to((n)/(2
else
set[n v]to(((3)*(n))+(1
end
change[i v]by(1
end
say(i</pre>
<scratchblocks>
when gf clicked
ask[n=]and wait
set[n v]to(answer
set[i v]to[0
repeat until<(n)=[1
if<((n)mod(2))=[0]>then
set[n v]to((n)/(2
else
set[n v]to(((3)*(n))+(1
end
change[i v]by(1
end
say(i
</scratchblocks>
However, this is considered poor style and is not recommended.
== Hacks ==
The blocks plugin offers hacks to allow representation of scripts from [[Scratch Modifications]] and old or unreleased versions of Scratch.
For a full tutorial on how to use scratchblocks hacks, see [[topic:55586|this topic]].
=== Color and Shape Changing ===
The color and shape of a block can be changed. This can be useful for forcing non-Scratch blocks to appear correctly. Note that only color changing with the legacy syntax works in the old version. The legacy syntax is obsolete (it no longer works since scratchblocks3).
<div style="overflow:auto">
{| class="wikitable"
! width="30%" | Feature
! width="50%" | Code
! width="20%" | Result
|-
| Changing category (works for any kind of block)
| <pre>abc:: looks
say [I'm not a Motion block!]:: motion
eat (pen color:: pen):: control
if <touching [mouse pointer v]:: list> then
die:: grey
end</pre>
| <scratchblocks>
abc:: looks
say [I'm not a Motion block!]:: motion
eat (pen color:: pen):: control
if <touching [mouse pointer v] ?:: list> then
die:: grey
end
</scratchblocks>
|-
| Changing color
| <pre>think [Arbitrary colors?]:: #228b22</pre>
| <scratchblocks>think [Arbitrary colors?]:: #228b22</scratchblocks>
|-
| Changing shape
| <pre>abc:: events hat
def:: motion stack
ghi:: pen reporter
jkl:: operators boolean</pre>
| <scratchblocks>
abc:: events hat
def:: motion stack
ghi:: pen reporter
jkl:: operators boolean
</scratchblocks>
|-
| Creating C blocks and changing category
| <pre>mno {
...
}:: sensing</pre>
| <scratchblocks>
mno {
...
}:: sensing
</scratchblocks>
|-
| C blocks with multiple branches
| <pre>pqr {
...
} stu {
...
} vwx:: sound</pre>
| <scratchblocks>
pqr {
...
} stu {
...
} vwx:: sound
</scratchblocks>
|-
| C block with cap
| <pre>yz {
...
}:: motion cap</pre>
| <scratchblocks>
yz {
...
}:: motion cap
</scratchblocks>
|-
| Adding icons
| <pre>@greenFlag @stopSign @turnRight @loopArrow:: grey</pre>
| <scratchblocks>@greenFlag @stopSign @turnRight @loopArrow:: grey</scratchblocks>
|}
</div>
=== Snap''!'' ===
{{see also|Snap!}}
The new plugin also supports features specific to Snap''!'', such as "rings". Other blocks in Snap! can be created using the color/shape hacks above.
<pre>run ({create clone:: control} @addInput:: grey ring):: control
<() @addInput:: grey ring>
say (http:// [snap.berkeley.edu]:: sensing)
((6) × (7):: operators)
(join [hello ] [world] @delInput @addInput:: operators)
script variables ((foo):: grey) ((bar):: grey) @delInput @addInput:: grey
(all but first of @list:: list)
warp {
move (10) steps
} :: grey
report [Done!]:: control cap
(<> @addInput) // without even the:: grey ring</pre>
which produces these blocks:
<scratchblocks>
run ({create clone:: control} @addInput:: grey ring) :: control
<() @addInput:: grey ring>
say (http:// [snap.berkeley.edu]:: sensing)
((6) × (7):: operators)
(join [hello ] [world] @delInput @addInput:: operators)
script variables ((foo):: grey) ((bar):: grey) @delInput @addInput:: grey
(all but first of @list:: list)
warp {
move (10) steps
}:: grey
report [Done!]:: control cap
(<> @addInput) // without even the:: grey ring
</scratchblocks>
===GP===
This plugin also includes hacks to [[GP]].
<scratchblocks>
when tracking (mouse x:: variables) (mouse y:: variables):: hat control
((1) !=\ (0):: operators)
define(a function:: motion):: custom hat
return (1):: control
say (pi:: operators):: motion
when I receive [go]:: control
wait @addInput:: control
(isNil [obj v]:: operators)
(touching mouse:: sensing)
((--(:: #ffffff):: operators):: operators)
if (--(:: #ffffff):: operators) {
} @addInput:: control
</scratchblocks>
==Backslash==
A backslash (\) is a character that cancels out any special functionality of the next character, making it show up as normal text. If you need to make a character with special functionality, like a closing bracket (]), show up as normal text, put a backslash before it.
<pre>say []]</pre>
<scratchblocks>say []]</scratchblocks>
<pre>say [\]]</pre>
<scratchblocks>say [\]]</scratchblocks>
This is useful for a couple of blocks, which need backslashes to display properly:
<pre>[] \< []</pre>
<scratchblocks>[] \< []</scratchblocks>
<pre>play drum (\(1\) Snare Drum v) for (0.25) beats</pre>
<scratchblocks>play drum (\(1\) Snare Drum v) for (0.25) beats</scratchblocks>
[[Category:Scratch Extensions]]
[[fr:Scratch Wiki Accueil/le forum/blocs du forum/liste blocs]]
- StefanMIX
- Scratcher
100+ posts
Welcome to the Developing Scratch Extensions Forum!
dude talks off topic hello!
create new block in my imagewhen green flag clicked
create command <save in [html v]>
if <(hello) = 5> then
create command <delete in [html v]>
else
save in [html v]
endthis good?
- please enter comment
edit: nvm im taking the L
Last edited by StefanMIX (Nov. 7, 2023 21:40:29)
everybody does the kumquat stuff so i have to do my own
<:|>this is uhhh idk
he hates the bad guys
do not hate him
hes cool
- benoutfit7
- Scratcher
100+ posts
Welcome to the Developing Scratch Extensions Forum!
when green flag clicked
launch [youtube v]
go to channel [Gaming with vicki]
Last edited by benoutfit7 (Nov. 20, 2023 11:41:10)
when its a scratchers birthday :: events hat
eat cake :: looks
give them a present :: custom
define give them a present
give them robux :: operators
say [happy birthday] for (5) secs
give them a 100 [follower v] plaque :: looks
give them vbux :: operators
- benoutfit7
- Scratcher
100+ posts
Welcome to the Developing Scratch Extensions Forum!
when [left v] key pressed
launch [plex v]
play tv show [ah v] until done
when its a scratchers birthday :: events hat
eat cake :: looks
give them a present :: custom
define give them a present
give them robux :: operators
say [happy birthday] for (5) secs
give them a 100 [follower v] plaque :: looks
give them vbux :: operators
- Discussion Forums
- » Developing Scratch Extensions
- » Welcome to the Developing Scratch Extensions Forum!