This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-10-20 18:17:52

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

New types of blocks wanted!

I really think we should know a way to use code editing to make new types of blocks. To open the squeak code, do as instructed below.

1. Open scratch.
2. Shift click the loop in the R in scratch, click turn fill screen off.
3. Click the white space that appears below.
4. Choose open, then browser.
5. Find the materials.

__________________
I just need info on how to do the kinds of blocks. I already know how to do blockspecs and block codes, I need info on how to get the types.
______________________
Confused? Don't even dare to view up this page, it will really tangle you up.
___________________
Blocks wanted:
A C block that fits into strings. (currently being worked on)
An area that command blocks can go into.
A block that can connect to a hat block BELOW.
A hat block attached to a C block.
A place where only reporter blocks fit.
Lots more!

Example:
http://wiki.scratch.mit.edu/images/OperatorsBYOB.png
Image from BYOB3 wiki page.
____________________
Important messages received:

1. Q. Could you give us examples of ways you would use them, and describe a little more about what they are suppose to do? A.

2. A pathway: Scratch-Objects>scriptableScratchMorph>instance>blocks>blockFromSpec:
smile

3. I've came up with an idea: Lets find someone who knows how to use squeak and has BYOB3!

4. HOW TO HACK BYOB:


Code:

Step 1. Right Click A Block (It Cannot Be A Custom Made Block.)


Step 2. Drag Some Of The Block Things Away Then Put Them Back EXACTLY How They Used To Be.


Step 3. Click The Little Save Button That Appeared.


Step 4. When It Asks For Your Initials, Type: Preferences enableProgrammerFacilities


Step 5. Highlight The Text And Press Alt+D


Step 6. Exit Out Of All Of That.


Step 7. Alt+Click The Scripting Area


Step 8. Press The Goldenish Circle


Step 9. Click Anywhere In The White Area That Appears.


Step 10. Press Open Then Press Browser

5. EXTREMELY IMPORTANT MESSAGE: fit C blocks inside strings! Here you go!

6. A pathway to find where the block is drawn: Scratch blocks > command block morph > drawing.

7. Here is an easier way to get into squeak's source, written by pecola1:

Just edit elements, click class, then take a red report block (the squeak one) place a blue text insert block over into the report block and type in

self

click save. Type in your initials. A syntax error should come up. Right click on the 'ScratchSpriteMorph class as yet classified Message' (the ScratchSpriteMorph may be ScriptableScratchMorph or ScratchStageMorph depending on what block you edited and where.) select 'browse full' and there you have it!

Last edited by zorket (2011-04-18 15:14:53)


Marzipan11 must learn to not spoil

Offline

 

#2 2010-10-20 18:58:14

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: New types of blocks wanted!

Would you describe what you mean and what their uses could be?

Offline

 

#3 2010-10-20 19:02:41

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: New types of blocks wanted!

Magnie wrote:

Would you describe what you mean and what their uses could be?

I tried. Users can find it interesting in many ways.


This is my 300'th post.  lol

Last edited by zorket (2010-10-20 19:03:05)


Marzipan11 must learn to not spoil

Offline

 

#4 2010-10-20 20:44:13

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: New types of blocks wanted!

Well to start off, creating new blocks is not "using cheat codes." It's not even hacking. It's just editing the code.  tongue

Secondly, I really don't understand what you mean by "how to get the types". Are you looking for methods and code for specific blocks? If so, check out The Scratch Block Library thread in Advanced Topics.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#5 2010-10-21 16:38:33

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: New types of blocks wanted!

Harakou wrote:

Well to start off, creating new blocks is not "using cheat codes." It's not even hacking. It's just editing the code.  tongue

Secondly, I really don't understand what you mean by "how to get the types". Are you looking for methods and code for specific blocks? If so, check out The Scratch Block Library thread in Advanced Topics.

I don't know how to help you confused guys. I'll help a little by posting a picture from a WIKI page.


Marzipan11 must learn to not spoil

Offline

 

#6 2010-10-21 17:31:24

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: New types of blocks wanted!

Zorket: Could you give us examples of ways you would use them, and describe a little more about what they are suppose to do?

Offline

 

#7 2010-10-21 18:08:05

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: New types of blocks wanted!

Magnie wrote:

Zorket: Could you give us examples of ways you would use them, and describe a little more about what they are suppose to do?

I'm gonna put this message in important messages.

Answer: The new type of C block is half C, half reporter. In the C, you put blocks, then clicking it reports all the block names in the script. One block down.
The inserter that oval shaped can only fit reporter blocks, when nothing can be typed in.
That's all I can answer. If you have more questions, post!


Marzipan11 must learn to not spoil

Offline

 

#8 2010-10-21 20:54:32

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: New types of blocks wanted!

zorket wrote:

Magnie wrote:

Zorket: Could you give us examples of ways you would use them, and describe a little more about what they are suppose to do?

I'm gonna put this message in important messages.

Answer: The new type of C block is half C, half reporter. In the C, you put blocks, then clicking it reports all the block names in the script. One block down.
The inserter that oval shaped can only fit reporter blocks, when nothing can be typed in.
That's all I can answer. If you have more questions, post!

Listen, I get that, but... Do you want to know how to make them in Scratch?


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#9 2010-10-21 22:55:33

XplodingEggs
Scratcher
Registered: 2009-12-09
Posts: 100+

Re: New types of blocks wanted!

This belongs in advanced topics, not in all about scratch.
I think there is a thread that has all sorts of blocks in advanced topics, might wanna go check there.


http://i54.tinypic.com/102kqr7.jpg

Offline

 

#10 2010-10-22 12:04:41

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: New types of blocks wanted!

This really belongs in suggestions. XplodingEggs.  smile

Offline

 

#11 2010-10-22 12:58:55

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: New types of blocks wanted!

If you're asking where the block types are coded, I can answer you with a brief path:

ScriptableScratchMorph -> blocks -> blockFromSpec:

For the actual 'block making' scripts, you find those in the various classes of
Scratch-UI-Blocks!
If this is not what you're asking please expand.

(PS. sorry for the really late reply but my computer has defunct and I'm using my other (not that awesome) computer now)

Offline

 

#12 2010-10-22 15:48:45

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: New types of blocks wanted!

LS97 wrote:

If you're asking where the block types are coded, I can answer you with a brief path:

ScriptableScratchMorph -> blocks -> blockFromSpec:

For the actual 'block making' scripts, you find those in the various classes of
Scratch-UI-Blocks!
If this is not what you're asking please expand.

(PS. sorry for the really late reply but my computer has defunct and I'm using my other (not that awesome) computer now)

Don't worry about posting late, I was at school anyway. I just got home and got on.

Anyway, I'm gonna help you understand what I mean. Lots of helping materials below!

http://wiki.scratch.mit.edu/images/OperatorsBYOB.png
The C blockspec:

('the script' #isc #theScript)

isc makes the block so it fits into strings  smile

And the 2nd block, the new area where only reporter blocks fit (not strings)

('the %rbo block' #r #the:block)

%rbo makes a space where only reporter blocks fit.

http://wiki.scratch.mit.edu/images/ControlBYOB.png
The first blockspec:

('run %cbo' #- #run:)

%cbo produces where only command blocks fit.

These are some of the things I want.

Alright, I need to know what code to use and where, please. (I guess you told me where)


Help?

Last edited by zorket (2010-10-22 16:28:41)


Marzipan11 must learn to not spoil

Offline

 

#13 2010-10-23 06:49:21

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: New types of blocks wanted!

I can assure you, it's not easy to make new types of blocks. BYOB did it alright though, so if you want it quick just mod off BYOB to get the blocks. But, to actually create a block, the process becomes more complicated.  hmm

Offline

 

#14 2010-10-23 08:24:44

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: New types of blocks wanted!

Were gonna need some experts on squeak, like nXIII.


Marzipan11 must learn to not spoil

Offline

 

#15 2010-10-23 08:57:06

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: New types of blocks wanted!

zorket wrote:

Were gonna need some experts on squeak, like nXIII.

not necessarily. i can do it, but it's difficult to explain to you unless i give you my changes file  tongue  which i prefer not to do. so, you have two options:

1. If you just want those blocks to put in your mod and that's it, ask nXIII for his changes file (if he feels like making one).

2. If you want to learn something from squeak and have fun, explore the different classes and methods i explained above and make your own code by taking bits and pieces from other existing codes  big_smile

Offline

 

#16 2010-10-23 09:57:15

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: New types of blocks wanted!

The really major things you change are the #drawOn: and #fixBlockLayout messages. You can look at the various block type classes for inspiration, but feel free to ask me if you can't find anything!  smile

Last edited by nXIII (2010-10-23 09:57:27)


nXIII

Offline

 

#17 2010-10-23 10:04:36

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: New types of blocks wanted!

LS97, I'm not making a mod, I just want the codes to put in. You probably aren't gonna help, unless I work like a big brain.

nXIII, I mostly want the C block that fits into strings. Can you help me with the codes?


Maby Bhavery or jens can help. They builded BYOB!

Last edited by zorket (2010-10-23 10:07:17)


Marzipan11 must learn to not spoil

Offline

 

#18 2010-10-23 10:10:53

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: New types of blocks wanted!

Harakou wrote:

zorket wrote:

Magnie wrote:

Zorket: Could you give us examples of ways you would use them, and describe a little more about what they are suppose to do?

I'm gonna put this message in important messages.

Answer: The new type of C block is half C, half reporter. In the C, you put blocks, then clicking it reports all the block names in the script. One block down.
The inserter that oval shaped can only fit reporter blocks, when nothing can be typed in.
That's all I can answer. If you have more questions, post!

Listen, I get that, but... Do you want to know how to make them in Scratch?

Yep, in scratch!


Marzipan11 must learn to not spoil

Offline

 

#19 2010-10-23 10:23:26

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: New types of blocks wanted!

zorket wrote:

nXIII, I mostly want the C block that fits into strings. Can you help me with the codes?


Maby Bhavery or jens can help. They builded BYOB!

Jens wrote all/most of BYOB.
And trust me, closures aren't easy. I've been working on them for a while.


nXIII

Offline

 

#20 2010-10-23 15:44:42

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: New types of blocks wanted!

nXIII wrote:

zorket wrote:

nXIII, I mostly want the C block that fits into strings. Can you help me with the codes?


Maby Bhavery or jens can help. They builded BYOB!

Jens wrote all/most of BYOB.
And trust me, closures aren't easy. I've been working on them for a while.

What are those?


Marzipan11 must learn to not spoil

Offline

 

#21 2010-10-25 15:51:10

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: New types of blocks wanted!

Is everyone confused?


Marzipan11 must learn to not spoil

Offline

 

#22 2010-10-25 16:12:22

Billybob-Mario
Scratcher
Registered: 2008-01-05
Posts: 500+

Re: New types of blocks wanted!

Base your mod on BYOB.

Offline

 

#23 2010-10-25 16:26:12

bbbeb
Scratcher
Registered: 2009-06-11
Posts: 1000+

Re: New types of blocks wanted!

Billybob-Mario wrote:

Base your mod on BYOB.

That's a failure.


Back in my day.... there were no laws that censored the internet... now, there are.... nah.

Offline

 

#24 2010-10-26 16:34:59

zorket
Scratcher
Registered: 2010-05-25
Posts: 500+

Re: New types of blocks wanted!

Billybob-Mario wrote:

Base your mod on BYOB.

I could try, but I'm NOT (NOT) (NOT) gonna make a mod, nethier am I gonna download a mod maker.

I'm not even gonna download BYOB!

bbbeb wrote:

Billybob-Mario wrote:

Base your mod on BYOB.

That's a failure.

Correct bbbeb!

Last edited by zorket (2010-10-26 20:18:10)


Marzipan11 must learn to not spoil

Offline

 

#25 2010-10-27 11:35:10

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: New types of blocks wanted!

zorket wrote:

Billybob-Mario wrote:

Base your mod on BYOB.

I could try, but I'm NOT (NOT) (NOT) gonna make a mod, nethier am I gonna download a mod maker.

a... mod... maker??

never heard of those. what are they

Offline

 

Board footer