Discuss Scratch

clubpenguin552222
Scratcher
100+ posts

How to hack your own magic custom blocks

You not need to download! I tested! it don't need!
DotDash
Scratcher
1000+ posts

How to hack your own magic custom blocks

I was wondering if you could put that custom block thing in the dropdown by hacking?
Scratch12300
Scratcher
500+ posts

How to hack your own magic custom blocks

DotDash wrote:

I was wondering if you could put that custom block thing in the dropdown by hacking?
Yes, you can. I'll show you how to later.
DotDash
Scratcher
1000+ posts

How to hack your own magic custom blocks

Scratch12300 wrote:

DotDash wrote:

I was wondering if you could put that custom block thing in the dropdown by hacking?
Yes, you can. I'll show you how to later.
Thanks
Scratch12300
Scratcher
500+ posts

How to hack your own magic custom blocks

DotDash wrote:

Scratch12300 wrote:

DotDash wrote:

I was wondering if you could put that custom block thing in the dropdown by hacking?
Yes, you can. I'll show you how to later.
Thanks


It's not working…



Sorry…
DotDash
Scratcher
1000+ posts

How to hack your own magic custom blocks

Scratch12300 wrote:

DotDash wrote:

Scratch12300 wrote:

DotDash wrote:

I was wondering if you could put that custom block thing in the dropdown by hacking?
Yes, you can. I'll show you how to later.
Thanks


It's not working…



Sorry…
anyone else know how to?
DotDash
Scratcher
1000+ posts

How to hack your own magic custom blocks

DotDash wrote:

Scratch12300 wrote:

DotDash wrote:

Scratch12300 wrote:

DotDash wrote:

I was wondering if you could put that custom block thing in the dropdown by hacking?
Yes, you can. I'll show you how to later.
Thanks


It's not working…



Sorry…
anyone else know how to?
…..
clubpenguin552222
Scratcher
100+ posts

How to hack your own magic custom blocks

DotDash wrote:

DotDash wrote:

Scratch12300 wrote:

DotDash wrote:

Scratch12300 wrote:

DotDash wrote:

I was wondering if you could put that custom block thing in the dropdown by hacking?
Yes, you can. I'll show you how to later.
Thanks


It's not working…



Sorry…
anyone else know how to?
…..

Last edited by clubpenguin552222 (Sept. 24, 2013 02:34:47)

FireBird2003
Scratcher
100+ posts

How to hack your own magic custom blocks

scimonster wrote:

comp500 wrote:

scimonster wrote:

SFollis wrote:

How do you open .json file? it doesn't have the ‘right program’ to view it.
Use Notepad (Windows), TextEdit (Mac), or gedit (Linux), or any other plaintext editor you want.
but mine says it doesnt have the left editor to view it
Oh, you're hilarious.
Just change the extension of the file.
PoniesFiM
New Scratcher
4 posts

How to hack your own magic custom blocks

skeletonxf wrote:

Does anyone know where I can get a free text editor that supports the JSON text? My notepad can't read it XD

Here's one. It's Notepad++(Windows only)(look for it on google or something). It supports JSON, and many other stuff(e.g. HTML, Javascript, Java, YAML, TeX, VB, Lua, Shell, Plain Text, Assembly, C, C#, C++, Python, Properties file, MS INI file).
rifj190
Scratcher
25 posts

How to hack your own magic custom blocks

Do you program in any other languages than scratch? I was wondering because jSON is not an easy thing to understand. I program in JavaScript, PHP, Python and of course, html and css. I am curious to know what programming languages you know.
rifj190
Scratcher
25 posts

How to hack your own magic custom blocks

DotDash wrote:

I was wondering if you could put that custom block thing in the dropdown by hacking?

I have made an example for you:

Just follow the directions:

  • Make a new project called demo.
  • Then download the project.
  • Rename it to a .zip file.
  • Unzip it.
  • Then open the project.json and replace it with this:


{
	"objName": "Stage",
	"variables": [{
			"name": "Variable",
			"value": 0,
			"isPersistent": false
		}],
	"sounds": [{
			"soundName": "pop",
			"soundID": 1,
			"md5": "83a9787d4cb6f3b7632b4ddfebf74367.wav",
			"sampleCount": 258,
			"rate": 11025,
			"format": ""
		}],
	"costumes": [{
			"costumeName": "backdrop1",
			"baseLayerID": 3,
			"baseLayerMD5": "510da64cf172d53750dffd23fbf73563.png",
			"bitmapResolution": 1,
			"rotationCenterX": 240,
			"rotationCenterY": 180
		}],
	"currentCostumeIndex": 0,
	"penLayerMD5": "279467d0d49e152706ed66539b577c00.png",
	"tempoBPM": 60,
	"videoAlpha": 0.5,
	"children": [{
			"objName": "ScratchCat",
			"scripts": [[10,
					10,
					[["procDef", "change variable %s by %n", ["variable", "number"], ["", 1], false],
						["setVar:to:", ["getParam", "variable"], 0]]],
				[304,
					10,
					[["whenGreenFlag"],
						["setVar:to:", "Variable", 0],
						["call", "change variable %s by %n", "", ["randomFrom:to:", 1, 100]]]]],
			"sounds": [{
					"soundName": "meow",
					"soundID": 0,
					"md5": "83c36d806dc92327b9e7049a565c6bff.wav",
					"sampleCount": 18688,
					"rate": 22050,
					"format": ""
				}],
			"costumes": [{
					"costumeName": "costume1",
					"baseLayerID": 1,
					"baseLayerMD5": "f9a1c175dbe2e5dee472858dd30d16bb.svg",
					"bitmapResolution": 1,
					"rotationCenterX": 47,
					"rotationCenterY": 55
				},
				{
					"costumeName": "costume2",
					"baseLayerID": 2,
					"baseLayerMD5": "6e8bd9ae68fdb02b7e1e3df656a75635.svg",
					"bitmapResolution": 1,
					"rotationCenterX": 47,
					"rotationCenterY": 55
				}],
			"currentCostumeIndex": 0,
			"scratchX": 0,
			"scratchY": 0,
			"scale": 1,
			"direction": 90,
			"rotationStyle": "normal",
			"isDraggable": false,
			"indexInLibrary": 1,
			"visible": true,
			"spriteInfo": {
			}
		},
		{
			"target": "Stage",
			"cmd": "getVar:",
			"param": "Variable",
			"color": 15629590,
			"label": "Variable",
			"mode": 1,
			"sliderMin": 0,
			"sliderMax": 100,
			"isDiscrete": true,
			"x": 5,
			"y": 5,
			"visible": true
		}],
	"info": {
		"hasCloudData": false,
		"spriteCount": 1,
		"projectID": "14541577",
		"swfVersion": "v378",
		"flashVersion": "MAC 11,9,900,117",
		"scriptCount": 2,
		"userAgent": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit\/537.71 (KHTML, like Gecko) Version\/6.1 Safari\/537.71",
		"videoOn": false
	}
}

Last edited by rifj190 (Nov. 21, 2013 04:13:33)

rifj190
Scratcher
25 posts

How to hack your own magic custom blocks

PoniesFiM wrote:

skeletonxf wrote:

Does anyone know where I can get a free text editor that supports the JSON text? My notepad can't read it XD

Here's one. It's Notepad++(Windows only)(look for it on google or something). It supports JSON, and many other stuff(e.g. HTML, Javascript, Java, YAML, TeX, VB, Lua, Shell, Plain Text, Assembly, C, C#, C++, Python, Properties file, MS INI file).

Mac users could use a program called TextWrangler - this is the program I code with. TextWrangler is free and supports dozens of different programming languages.
blob8108
Scratcher
1000+ posts

How to hack your own magic custom blocks

Sublime Text is pretty.
Photoguy77
Scratcher
100+ posts

How to hack your own magic custom blocks

BoltBait wrote:

I had to hack work around an editor limitation in order to create my clock project.

You see, the block "go to [clock]" couldn't directly be made using the editor while in the clock sprite itself. Normally, I can see why you'd want to limit this behavior since you can't really go to yourself. But, in my case, the block would be used by a clone to go to the original sprite.

I had to create a different sprite and select it. Then I could go to the motion blocks and drag the one I wanted over to the clock sprite and let it go. It properly showed up in the clock sprite and I was able to drag it around and connect it in the proper place. Then I deleted the temporary sprite that I created.

I'm just not sure there's any value in fixing this editor limitation.
You did not need to do that. You could have just had the sprite set a variable to its y and another to its x. The clone could do this then:
go to x: (mainxpos) y: (mainypos)
110Percent
Scratcher
100+ posts

How to hack your own magic custom blocks

Hi! Sorry, I'm the only one here without an insanely long post. XD
I wanted to know how you could perhaps make dropdown menus and hack them into your custom blocks… like this for example
when gf clicked
load shopping list [ Walmart v]
say [Can't wait for dat CHEESE!]
stop all
Thanks!

edit: Oops! Sorry… Just realized that I'm bumping an old topic. Sorry!

Last edited by 110Percent (Dec. 14, 2013 13:31:23)

Zambonifofex
Scratcher
100+ posts

How to hack your own magic custom blocks

110Percent wrote:

Hi! Sorry, I'm the only one here without an insanely long post. XD
I wanted to know how you could perhaps make dropdown menus and hack them into your custom blocks… like this for example
when gf clicked
load shopping list [ Walmart v]
say [Can't wait for dat CHEESE!]
stop all
Thanks!

edit: Oops! Sorry… Just realized that I'm bumping an old topic. Sorry!
It's not that old =P

BTW, so, can you make something like that:

replace item (3 v) of (variable) with [thing]

to replace the 3rd item of a list with the name of the value of “variable” with “thing”, right?

Last edited by Zambonifofex (Dec. 16, 2013 14:51:45)

elementalninjaday
Scratcher
45 posts

How to hack your own magic custom blocks

there is no File>>Export to local drive thing. I don't know how to do it.

when green flag clicked
forever
say [Help!]
end
sakafitrady
Scratcher
100+ posts

How to hack your own magic custom blocks

COOL IT WORKED!
k9lego
Scratcher
1000+ posts

How to hack your own magic custom blocks

Lightnin wrote:

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?
You should just add those features. k9lego.

Powered by DjangoBB