Discuss Scratch

JGames101
Scratcher
100+ posts

Guide to Modding Scratch 3.0

s_federici wrote:

Is there anyone following this thread that knows how to work on Scratch 3 source code? It seems that JGames101 is not monitoring it
Sorry I wasn't updating this for a while. I realized when I rewrote the post how much has changed. I'll be updating and answering questions much more frequently now, as well as posting my modded example code to GitHub. If you have any more questions, I'm happy to help!
AmazingMech2418
Scratcher
1000+ posts

Guide to Modding Scratch 3.0

For some reason, the
npm link
is showing errors that won't let it build into the GUI when I run it.
AmazingMech2418
Scratcher
1000+ posts

Guide to Modding Scratch 3.0

Based on https://github.com/LLK/scratch-gui/wiki/Getting-Started, you should do the install before the link… Does that need to be changed? Scratch-vm works currently for me, but not scratch-blocks. Is that the problem?
AmazingMech2418
Scratcher
1000+ posts

Guide to Modding Scratch 3.0

If I try to link scratch-blocks, it fails.
AmazingMech2418
Scratcher
1000+ posts

Guide to Modding Scratch 3.0

In my mod, I was able to activate the speech to text extension! Now, it's time to make more extensions until I can work on scratch-blocks.
JGames101
Scratcher
100+ posts

Guide to Modding Scratch 3.0

AmazingMech2418 wrote:

Based on https://github.com/LLK/scratch-gui/wiki/Getting-Started, you should do the install before the link… Does that need to be changed? Scratch-vm works currently for me, but not scratch-blocks. Is that the problem?
Try that, it wasn't an issue for me, but just to be safe I'll change the tutorial. If that doesn't fix the problem, could you post the error message? Thanks!
JGames101
Scratcher
100+ posts

Guide to Modding Scratch 3.0

AmazingMech2418 wrote:

If I try to link scratch-blocks, it fails.
In the building step for scratch-blocks, it requires a Python library that I think is broken on Windows. On MacOS and Linux, it compiles properly. Is it possible for you to use a Bash terminal, such as the one that comes with GitHub, or using Windows Subsystem for Linux? Either way *should* work, but I'm now using Mac, so I can't confirm. Otherwise, using the online compiler, which is used when Java isn't available, definitely works on Windows. To do that, you can remove Java from your path while you compile Scratch Blocks.
AmazingMech2418
Scratcher
1000+ posts

Guide to Modding Scratch 3.0

JGames101 wrote:

AmazingMech2418 wrote:

If I try to link scratch-blocks, it fails.
In the building step for scratch-blocks, it requires a Python library that I think is broken on Windows. On MacOS and Linux, it compiles properly. Is it possible for you to use a Bash terminal, such as the one that comes with GitHub, or using Windows Subsystem for Linux? Either way *should* work, but I'm now using Mac, so I can't confirm. Otherwise, using the online compiler, which is used when Java isn't available, definitely works on Windows. To do that, you can remove Java from your path while you compile Scratch Blocks.
I used Git Bash. I also tried the normal CMD, but it didn't work either.
jokebookservice1
Scratcher
1000+ posts

Guide to Modding Scratch 3.0

EDIT: Whoops, didn't read earlier on in the thread!

Last edited by jokebookservice1 (Jan. 3, 2019 08:01:31)

JGames101
Scratcher
100+ posts

Guide to Modding Scratch 3.0

AmazingMech2418 wrote:

JGames101 wrote:

AmazingMech2418 wrote:

If I try to link scratch-blocks, it fails.
In the building step for scratch-blocks, it requires a Python library that I think is broken on Windows. On MacOS and Linux, it compiles properly. Is it possible for you to use a Bash terminal, such as the one that comes with GitHub, or using Windows Subsystem for Linux? Either way *should* work, but I'm now using Mac, so I can't confirm. Otherwise, using the online compiler, which is used when Java isn't available, definitely works on Windows. To do that, you can remove Java from your path while you compile Scratch Blocks.
I used Git Bash. I also tried the normal CMD, but it didn't work either.
Is it possible for you to temporarily remove Java from your path to compile? That's not the ideal solution but I know it works
mrchoosak
New Scratcher
4 posts

Guide to Modding Scratch 3.0

Dear Scratch mod friends,

Thank you for best information about Scratch mod.
I followed the steps on these and managed to start Scratch 3.0 on my PC.
Then I modified standard block moveSteps to make Sprite moved 100 steps, worked very well.
However I could not manage to create a new block move100Steps myself.
Any suggestion on this, please help
JGames101
Scratcher
100+ posts

Guide to Modding Scratch 3.0

mrchoosak wrote:

Dear Scratch mod friends,

Thank you for best information about Scratch mod.
I followed the steps on these and managed to start Scratch 3.0 on my PC.
Then I modified standard block moveSteps to make Sprite moved 100 steps, worked very well.
However I could not manage to create a new block move100Steps myself.
Any suggestion on this, please help
Was there an error in a command you ran? If so, please post the error message. If the issue is that the new block just appears red with no input, I also ran into that issue. Try running the build steps (at the end of the post, above the example mod) and see if that helps.
mrchoosak
New Scratcher
4 posts

Guide to Modding Scratch 3.0

It was my fault accidentally skip some steps.
I fixed it, now Scratch mod run perfectly.

Thank you very much JGames101.
gosafer
Scratcher
50 posts

Guide to Modding Scratch 3.0

Great thanks for sharing the instructions!
I've built the lib.min.js successfully by your instructions. However, the file size of lib.min.js is very large, near to 13M bytes. Is there any way to reduce the file size or to make the single file (lib.min.js) to some small files? Thanks!
LuckyLucky7
Scratcher
1000+ posts

Guide to Modding Scratch 3.0

Ok, I'm trying to mod Scratch 3 again, using this sticky, but this time I downloaded Node as a zip file. But when I put “npm install”, this happens in the Command Prompt:
C:\Users\...\Scratch_Mod\scratch-gui> npm install
'npm' is not recognized as an internal or external command, operable program or batch file.
And Node is in that folder. I even set the location of my environment variables to the Node folder that is in the scratch-gui folder.
jokebookservice1
Scratcher
1000+ posts

Guide to Modding Scratch 3.0

Hi LuckyLucky7, could you tell me what the output of this is when you run it:

node -v

Also, do you mean “node_modules” folder, or did you put the downloaded Node ZIP folder into scratch-gui? If so, and if the above command outputs a similar error, I suggest you try unzipping your downloaded zip folder, and locating the installer and then running it.
LuckyLucky7
Scratcher
1000+ posts

Guide to Modding Scratch 3.0

jokebookservice1 wrote:

Hi LuckyLucky7, could you tell me what the output of this is when you run it:

node -v

Also, do you mean “node_modules” folder, or did you put the downloaded Node ZIP folder into scratch-gui? If so, and if the above command outputs a similar error, I suggest you try unzipping your downloaded zip folder, and locating the installer and then running it.
I have already unzipped the node folder. Also, when I put “node -v”, the command prompt shows this:
C:\Users\...\Scratch_Mod\scratch-gui> node -v
'node' is not recognized as an internal or external command, operable program or batch file.

Last edited by LuckyLucky7 (Jan. 4, 2019 14:07:57)

jokebookservice1
Scratcher
1000+ posts

Guide to Modding Scratch 3.0

Hmm, it looks like your installation of Node (and also NPM) hasn't completed successfully. When you unzipped the folder, was there a .msi file inside? If so, could you have a go at running it… it'll be an installer.

In any case, you might find development a little easier if you install the binary directly, so .msi rather than .zip. You can find the downloads at https://nodejs.org/en/download . Then you can just run it and it'll guide you through the installation.

You might also want to consider using Git for Windows, because it gives you a lot of the UNIX commands for free, which can make development a bit quicker.

Last edited by jokebookservice1 (Jan. 4, 2019 14:33:14)

LuckyLucky7
Scratcher
1000+ posts

Guide to Modding Scratch 3.0

jokebookservice1 wrote:

Hmm, it looks like your installation of Node (and also NPM) hasn't completed successfully. When you unzipped the folder, was there a .msi file inside? If so, could you have a go at running it… it'll be an installer.

In any case, you might find development a little easier if you install the binary directly, so .msi rather than .zip. You can find the downloads at https://npmjs.org/download . Then you can just run it and it'll guide you through the installation.

You might also want to consider using Git for Windows, because it gives you a lot of the UNIX commands for free, which can make development a bit quicker.
Before installing the ZIP file for node, I installed the MSI installer and then when I reach the “Installing Node.js” part, the progress bar never goes up. When I try to cancel the installation, the installer doesn't close at all. Also, I already have GIT installed.

Last edited by LuckyLucky7 (Jan. 4, 2019 14:37:52)

jokebookservice1
Scratcher
1000+ posts

Guide to Modding Scratch 3.0

Sorry, when I said Git for Windows, I meant a terminal emulator: https://gitforwindows.org/

When I try to cancel the installation, the installer doesn't close at all.

That's annoying! I'm not sure, but you could try an unofficial port of NVM, a version manager of Node and NPM, for Windows, here: https://github.com/coreybutler/nvm-windows – and use that to install Node.js.

Powered by DjangoBB