Discuss Scratch

Raspberry693
Scratcher
26 posts

Externally Sourced Blocks in Scratch

Ok, so what the subject says is my question. If I went into the JSON files of a .SB3 and add in custom block functionality with the blocks and their function defined, will Scratch still run the project and use those blocks (strictly in the player, not the editor, but if they display in the editor that'd be cool). I'm wanting to get into making forks of Scratch's open source and TurboWarp's too. I don't want to be changing mass amounts of the code, just adding in blocks.

Thanks,
Raspberry
gdpr0d1c374ad4b131d0c9c84821
Scratcher
89 posts

Externally Sourced Blocks in Scratch

.

Last edited by gdpr0d1c374ad4b131d0c9c84821 (Dec. 26, 2024 18:50:58)

scratchusername40
Scratcher
1000+ posts

Externally Sourced Blocks in Scratch

the project.json file is only a list of blocks that are in the project. If you want to actually add in new functionality, you'll have to edit scratch-vm I think
Raspberry693
Scratcher
26 posts

Externally Sourced Blocks in Scratch

Ok, thanks for your help
ZZC12345
Scratcher
500+ posts

Externally Sourced Blocks in Scratch

Try the `src/blocks` directory in `scratch-vm`: https://github.com/LLK/scratch-vm/tree/develop/src/blocks
and the `blocks_vertical` directory in `scratch-blocks`: https://github.com/LLK/scratch-blocks/tree/develop/blocks_vertical
kccuber
Scratcher
1000+ posts

Externally Sourced Blocks in Scratch

Check out the tutorial to modding Scratch 3.0, it shows how to add new blocks.
NFlex23
Scratcher
1000+ posts

Externally Sourced Blocks in Scratch

kccuber wrote:

Check out the tutorial to modding Scratch 3.0, it shows how to add new blocks.
There's a more updated version of that tutorial here (written by @dinonil).
kccuber
Scratcher
1000+ posts

Externally Sourced Blocks in Scratch

NFlex23 wrote:

kccuber wrote:

Check out the tutorial to modding Scratch 3.0, it shows how to add new blocks.
There's a more updated version of that tutorial here (written by @dinonil).
I find that you have to npm install and link the 2 other modules before you npm install in scratch-gui. You also have to npm translate in blocks before prepublishing. Can I edit that tutorial? I'm a moderator on Aviate.
Aarmesh
Scratcher
100+ posts

Externally Sourced Blocks in Scratch

gdpr0d1c374ad4b131d0c9c84821 wrote:

.
gdpr
Aarmesh
Scratcher
100+ posts

Externally Sourced Blocks in Scratch

gdpr0d1c374ad4b131d0c9c84821 wrote:

.
gdpr
cosmosaura
Scratch Team
1000+ posts

Externally Sourced Blocks in Scratch

Topic closed due to necroposting.

Powered by DjangoBB