Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How to hack your own magic custom blocks
- tpaley
- Scratcher
100+ posts
How to hack your own magic custom blocks
This is a cool hack, but my concern is that when anyone who doesn't know what you've done (or how you've done it) tries to view your project, they won't be able to understand your scripts - they won't even make sense.
I wouldn't mind at all if this was being done only with downloaded, local projects. But these are public, shared ones, that people are likely to “see inside”.
Any thoughts on the issue?
I think that you should make it so that you can't do the JSON hack but let reporters go into dropdown menus
- roijac
- Scratcher
100+ posts
How to hack your own magic custom blocks
Am I the only one around here that supports custom inputs in the editor?
ST, please don't close the walls further, the limitations of no return values make it hard enough to port algorithms into scratch.
ST, please don't close the walls further, the limitations of no return values make it hard enough to port algorithms into scratch.
- Nathanator1416J
- Scratcher
100+ posts
How to hack your own magic custom blocks
Hardmath, when I read the wiki article about the JSON file setup, I saw the possibilities in it. I don't know what programming languages you know, but a program editor of scratch 2.0 files that allowed these features/helped in the adding of new block possibilities would be very useful to the community. I know Visual Basic.NET very well, and C# pretty well, but I would need some help with the JSON stuff, so it would be great if you would help.
Last edited by Nathanator1416J (Feb. 12, 2013 01:49:36)
PEPPERTREE LABS! (PtP/PtL)
Tourmaline Scientific Research Programs at PEPPERTREE LABS!
Someone actually used that link! (They were from Virginia….)
GEOLOGY ROCKS! (chemistry too!)
I Tried Supporting Klingons here! But It Was Too late!!!!!
Running Windows XP SP3 (Home) With a 2.2 GHz Dual Core AMD Athlon 64 X2! Support my petition! (here)
- Hardmath123
- Scratcher
1000+ posts
How to hack your own magic custom blocks
Sure, I've been doing really serious research on the 2.0 format (I've written a translator to convert to another language).
@blob I discovered that trick independently; this one doesn't need Kurt: http://scratch.mit.edu/forums/viewtopic.php?id=61971
@blob I discovered that trick independently; this one doesn't need Kurt: http://scratch.mit.edu/forums/viewtopic.php?id=61971
- Nathanator1416J
- Scratcher
100+ posts
How to hack your own magic custom blocks
@BLOB8108
Not exactly hacking, well, maybe.
@Hardmath,
I set up a form so we could communicate about the program. It is:
http://beta.scratch.mit.edu/forums/topic/2208/?page=1#post-11876
Thanks!
Nathan
Not exactly hacking, well, maybe.
@Hardmath,
I set up a form so we could communicate about the program. It is:
http://beta.scratch.mit.edu/forums/topic/2208/?page=1#post-11876
Thanks!
Nathan
PEPPERTREE LABS! (PtP/PtL)
Tourmaline Scientific Research Programs at PEPPERTREE LABS!
Someone actually used that link! (They were from Virginia….)
GEOLOGY ROCKS! (chemistry too!)
I Tried Supporting Klingons here! But It Was Too late!!!!!
Running Windows XP SP3 (Home) With a 2.2 GHz Dual Core AMD Athlon 64 X2! Support my petition! (here)
- Nathanator1416J
- Scratcher
100+ posts
How to hack your own magic custom blocks
grr!! no one wants to help!!!
PEPPERTREE LABS! (PtP/PtL)
Tourmaline Scientific Research Programs at PEPPERTREE LABS!
Someone actually used that link! (They were from Virginia….)
GEOLOGY ROCKS! (chemistry too!)
I Tried Supporting Klingons here! But It Was Too late!!!!!
Running Windows XP SP3 (Home) With a 2.2 GHz Dual Core AMD Athlon 64 X2! Support my petition! (here)
- Epicness123
- Scratcher
1000+ posts
How to hack your own magic custom blocks
will this put a virus on my pc? i just want to ask before I do it.
Sadly, my kumquats were eaten by an evil forum signature.
- Hardmath123
- Scratcher
1000+ posts
How to hack your own magic custom blocks
No, not at all! It's perfectly safe—all you're doing is editing a file and uploading it.
- comp500
- Scratcher
100+ posts
How to hack your own magic custom blocks
JSON is part of the file format (.sb2) so unless they change it you can still see the JSON. They might still allow the hack because of backwards-compatability with obsolete blocks.This is a cool hack, but my concern is that when anyone who doesn't know what you've done (or how you've done it) tries to view your project, they won't be able to understand your scripts - they won't even make sense.
I wouldn't mind at all if this was being done only with downloaded, local projects. But these are public, shared ones, that people are likely to “see inside”.
Any thoughts on the issue?
I think that you should make it so that you can't do the JSON hack but let reporters go into dropdown menus
EDIT: and some normal blocks use those reporters.
Last edited by comp500 (Feb. 18, 2013 07:28:32)
Ubuntu 13.04: Chrome 29.0.1547.76, Flash 11.8 (release 800) Windows 7: Same Both: Dell Inspiron 545: Dual-Core w/3GB RAM… let's stop boasting now…
For more info ask me on my profile page…
AttackScratch.php
- Weetile
- Scratcher
29 posts
How to hack your own magic custom blocks
Cool! Does this work with 1.4?
Hey, I am Weetile123.
Minecraft: Weetile123
Skype: cp_agent
Scratch: umm… i told you before?
Twitter: @Weetile
Website: http://weetileontheweb.weebly.com
- andre_rifaut
- Scratcher
100+ posts
How to hack your own magic custom blocks
Sharing with the Scratch community legible programs is important. So allowing only “valid” project on the scratch website just corresponds to the **intent** of the policy (for 1.4) that does not allow scratch modifications so that all the community can “understand” your works. Do not forget that advanced users provide examples for less advanced ones, and so, “teaches” how to program to them.
(See “Why Can't Projects Made in Scratch Modifications be Shared to the Scratch Website?”)
But, exploring is also important.
So, one way to reconcile both positions, would be to make accessible a “non-validating” scratch version (without/with source code) on another website (see “Mod Share”).
You could still make announcements or provide explanations (not only howto, but also pros and cons) about your “alternative” projects with the standard scratch projets on the standard website, in a standard studios, galleries, …
What do you think about it ?
- nXIII
- Scratcher
1000+ posts
How to hack your own magic custom blocks
I think limiting the format to prevent stuff like this is not a good idea. We're not introducing Scratchers to any really new concepts—they've seen all the argument types we can use, they've seen custom block inputs, and they've seen reporters answering their value in place of input slots. We're just putting some of these concepts together to achieve specific functionality that helps us write better, more concise, and more useful Scratch projects.
A curious Scratcher can leave a comment like "How did you do X?," and I'm sure everyone here would be happy to reply with a short message and a link to this topic if the Scratcher is interested.
A curious Scratcher can leave a comment like "How did you do X?," and I'm sure everyone here would be happy to reply with a short message and a link to this topic if the Scratcher is interested.
- comp500
- Scratcher
100+ posts
How to hack your own magic custom blocks
I agree, this would also help with compiling other things to scratch, like the complex algorithms ppl use for 3D… I think limiting the format to prevent stuff like this is not a good idea. We're not introducing Scratchers to any really new concepts—they've seen all the argument types we can use, they've seen custom block inputs, and they've seen reporters answering their value in place of input slots. We're just putting some of these concepts together to achieve specific functionality that helps us write better, more concise, and more useful Scratch projects.
A curious Scratcher can leave a comment like "How did you do X?," and I'm sure everyone here would be happy to reply with a short message and a link to this topic if the Scratcher is interested.
Last edited by comp500 (Feb. 20, 2013 06:23:45)
Ubuntu 13.04: Chrome 29.0.1547.76, Flash 11.8 (release 800) Windows 7: Same Both: Dell Inspiron 545: Dual-Core w/3GB RAM… let's stop boasting now…
For more info ask me on my profile page…
AttackScratch.php
- lalala3
- Scratcher
100+ posts
How to hack your own magic custom blocks
An even better way to prevent confusion would be to remove the source of the confusion: the belief that such isn't possible, i.e. adding every single one of the special inputs/drop-downs/etc. into the standard editor. We get cool input options without having to go through that lengthy process and nobody's confused by the blocks. Problem solved.Bump. Lightnin? Can you please read this?Hmm. It's definitely a problem. I personally see doing this JSON-hacking a lot in the future, and not just for nefarious purposes—putting together an abnormally large script is much easier with a simply Python program. Also, being able to do this allows us to read Scratch projects, too, so I can imagine being able to implement a nice Scratch 2.0 to Snap! converter for Jens and Brian, or do a similar fun project. This is a cool hack, but my concern is that when anyone who doesn't know what you've done (or how you've done it) tries to view your project, they won't be able to understand your scripts - they won't even make sense.
I wouldn't mind at all if this was being done only with downloaded, local projects. But these are public, shared ones, that people are likely to “see inside”.
Any thoughts on the issue?
That said, it would definitely be confusing and intimidating to a new user; when I saw nXIII's highscore project I was totally lost (ok, intrigued, impressed and curious, but still admittedly lost).
One possible solution may be to change the way block definitions are stored, so that you can't hack in special inputs. You should only be able to have string and number and boolean inputs, the rest can gracefully become string inputs. That lets us continue messing with blocks in the JSON, but prevents odd-looking blocks. One issue with that is being able to stuff blocks into others offline—it can be awkward to explain how I fit a reporter into a dropdown to every new Scratcher who asks. Yet having, for example, a variable in the <key {} pressed?> block, is extremely useful.
I suppose the truth is that you can't completely disallow hacks just like you can't completely disallow chat rooms—there will always be the ingenuous, enterprising people who get around any walls you put up. But making the source completely closed and not letting anyone explore is pretty unfair, too. So I think the best ways is to actively discourage making scary-looking hacked blocks, but allow smaller things like stuffing reporters into dropdowns or making really long scripts with external programs.
Sorry, I did - just didn't get to respond to it. Thanks for pinging me about it with a comment to remind me.
A couple days ago we started a discussion on this by email, and John said:
“His suggestion would prevent making user-defined blocks with drop-down menu parameters via JSON. That's pretty easy and probably worth doing. It doesn't prevent all ”impossible to construct“ scripts but it would prevent user-defined blocks with input slots that can't be created via our block definition dialog.”
So it's likely on his list, with the 2000 other things.
The main concern I have about this technique is that if we have a ‘public code repository’ - which is one way of seeing the Scratch website - it's important that code is legible, makes sense, and corresponds accurately to what the project actually does. If hacking the JSON makes projects that don't behave how their scripts indicate they'd behave, or which can't be re-created with the normal editor, then I think it's potentially really confusing for anyone viewing the code. If some way of doing that becomes common, I'd recommend we think about validating uploads and rejecting hand JSON edits that can't be recreated in the editor. But if it's not much of an issue, we won't have to.
But as for making scripts by hacking the JSON that *can* be accurately represented / recreated in the editor - knock yourself out!
Last edited by lalala3 (Feb. 21, 2013 00:50:54)
- nXIII
- Scratcher
1000+ posts
How to hack your own magic custom blocks
Not only would that make the interface extremely cluttered, but that's also not the only thing you can do in the JSON that you can't do in a normal project. An even better way to prevent confusion would be to remove the source of the confusion: the belief that such isn't possible, i.e. adding every single one of the special inputs/drop-downs/etc. into the standard editor. We get cool input options without having to go through that lengthy process and nobody's confused by the blocks. Problem solved.
- lalala3
- Scratcher
100+ posts
How to hack your own magic custom blocks
Well, a solution to the custom inputs confusing people would be to add them into the standard/base editor. We don't have to hack them in anymore, and Scratchers unfamiliar with the technique are not confused.Bump. Lightnin? Can you please read this?Hmm. It's definitely a problem. I personally see doing this JSON-hacking a lot in the future, and not just for nefarious purposes—putting together an abnormally large script is much easier with a simply Python program. Also, being able to do this allows us to read Scratch projects, too, so I can imagine being able to implement a nice Scratch 2.0 to Snap! converter for Jens and Brian, or do a similar fun project. This is a cool hack, but my concern is that when anyone who doesn't know what you've done (or how you've done it) tries to view your project, they won't be able to understand your scripts - they won't even make sense.
I wouldn't mind at all if this was being done only with downloaded, local projects. But these are public, shared ones, that people are likely to “see inside”.
Any thoughts on the issue?
That said, it would definitely be confusing and intimidating to a new user; when I saw nXIII's highscore project I was totally lost (ok, intrigued, impressed and curious, but still admittedly lost).
One possible solution may be to change the way block definitions are stored, so that you can't hack in special inputs. You should only be able to have string and number and boolean inputs, the rest can gracefully become string inputs. That lets us continue messing with blocks in the JSON, but prevents odd-looking blocks. One issue with that is being able to stuff blocks into others offline—it can be awkward to explain how I fit a reporter into a dropdown to every new Scratcher who asks. Yet having, for example, a variable in the <key {} pressed?> block, is extremely useful.
I suppose the truth is that you can't completely disallow hacks just like you can't completely disallow chat rooms—there will always be the ingenuous, enterprising people who get around any walls you put up. But making the source completely closed and not letting anyone explore is pretty unfair, too. So I think the best ways is to actively discourage making scary-looking hacked blocks, but allow smaller things like stuffing reporters into dropdowns or making really long scripts with external programs.
Sorry, I did - just didn't get to respond to it. Thanks for pinging me about it with a comment to remind me.
A couple days ago we started a discussion on this by email, and John said:
“His suggestion would prevent making user-defined blocks with drop-down menu parameters via JSON. That's pretty easy and probably worth doing. It doesn't prevent all ”impossible to construct“ scripts but it would prevent user-defined blocks with input slots that can't be created via our block definition dialog.”
So it's likely on his list, with the 2000 other things.
The main concern I have about this technique is that if we have a ‘public code repository’ - which is one way of seeing the Scratch website - it's important that code is legible, makes sense, and corresponds accurately to what the project actually does. If hacking the JSON makes projects that don't behave how their scripts indicate they'd behave, or which can't be re-created with the normal editor, then I think it's potentially really confusing for anyone viewing the code. If some way of doing that becomes common, I'd recommend we think about validating uploads and rejecting hand JSON edits that can't be recreated in the editor. But if it's not much of an issue, we won't have to.
But as for making scripts by hacking the JSON that *can* be accurately represented / recreated in the editor - knock yourself out!
- nXIII
- Scratcher
1000+ posts
How to hack your own magic custom blocks
Well, a solution to the custom inputs confusing people would be to add them into the standard/base editor. We don't have to hack them in anymore, and Scratchers unfamiliar with the technique are not confused.http://beta.scratch.mit.edu/forums/topic/1810/?page=2#post-13305
- lalala3
- Scratcher
100+ posts
How to hack your own magic custom blocks
Sorry. I failed. I forgot there was a second page and my post mysteriously disappeared.Well, a solution to the custom inputs confusing people would be to add them into the standard/base editor. We don't have to hack them in anymore, and Scratchers unfamiliar with the technique are not confused.http://beta.scratch.mit.edu/forums/topic/1810/?page=2#post-13305
Edit: In my defense, it shows the page numbers outside of the topic on the 1.4 forums. But I still fail.
Last edited by lalala3 (Feb. 22, 2013 01:19:33)
- lalala3
- Scratcher
100+ posts
How to hack your own magic custom blocks
Okay. Getting to the point, I was only proposing a solution to that one problem, and to prevent interface cluttering, there could be scrollbars. Yeah.Sorry. I failed. I forgot there was a second page and my post mysteriously disappeared.Well, a solution to the custom inputs confusing people would be to add them into the standard/base editor. We don't have to hack them in anymore, and Scratchers unfamiliar with the technique are not confused.http://beta.scratch.mit.edu/forums/topic/1810/?page=2#post-13305
- Discussion Forums
- » Help with Scripts
- » How to hack your own magic custom blocks