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

#1 2012-05-04 18:00:21

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Plugin API for 2.1 or Later | Allows Modding!

Last Major Revision: 7/11/12
This on Scratch Suggestions!

A Note For the Scratch Team:
Should this idea be accepted, I would be interested in helping develop the syntax (maybe the actual interface, if I learn Flash) and documentation for this API

Now, since this obviously would be too hard to implement for the 2.0 release, I'll ask for it for 2.1 or later
What I would like is an Plugin/Modding API (more extensive than the current Remote Sensors Connections) in Scratch 2.1 or a later release
For all those who don't know what an API is, here's a Wikipedia article
How it might work:
Scratch would pop up a dialog on startup asking which plugins to enable for this session.
On the user's computer, maybe in something like /appdata/roaming/.scratch, there is a folder /plugins which would contain all plugin folders.
Each plugin folder would contain a file, probably an XML format, that points Scratch to a file (like .jar, .js[see note at bottom], .exe, .bat [see note at bottom], .swf, etc).  After this, Scratch opens a socket connection to that program and tries to connect.  The program can then send messages like

Code:
new block(BlockSpec, returnFormat,);
creates a new block
new reporter(BlockSpec, returnFormat,);
creates a new reporter
new boolean(BlockSpec, returnFormat);
creates a new boolean reporter
new globalVariable(Name, value);
creates a new global variable with the name and value specified
new localVariable(Name, sprite, value);
creates a new local variable for the said sprite
updateGlobalVar(Name, value)
Changes the value of global variable Name
updateLocalVar(Name, sprite, value);
Update the local variable of sprite "sprite" and Name "name" to the value "value"
new dialogBox(type, title, message);
creates a new dialog/promt box in scratch
return(BlockSpec, value);
returns the value of the reporter/boolean with the given blockspec
broadcast(Message);
what do you think?
giveProjectPath();
returns the absolute path to the project
save();
saves the project
saveAs(Path);
saves the project to the given path
close();
opens the close dialog
open(path);
opens the "open" dialog box with the given path as default
upload();
opens the "Upload" dialog box

while Scratch could send these out:

Code:
callReporter(BlockSpec, args[]);
calls a reporter previously defined with the given arguments
callBoolean(BlockSpec, args[]);
same as above, but boolean
callBlock(BlockSpec, args[]);
same as above, but the block defined
updateSensors(Name, value);
same as in remote sensors connections
broadcast(message);
same as remote sensors connections

Some things it could allow for:
Custom blocks without modifications (Flash is hard to mod, so this would fix that)
More advanced coding
Integration of other languages
Ability to play audio formats other than those supported in Scratch
Auto-updating and uploading to other websites
Export to .exe, .jar, .app, maybe even import/export from/to .xml
More stuff  tongue

Now, with the blockspecs, they wouldn't be the standard squeak ones.
Each argument is preceded by either %, $, or #
$ means string
# means number
% means boolean

the name of the argument is after it, with no spaces

Supporters:
itsmomito
bobbybee
XenoK
veggieman001
SciTecCf
samtwheels
fg123
Bklecka
laser314
roijac (kinda)
me  tongue

Some examples:
If the plugin wrote this on startup,

Code:

new boolean("file at $1 is extension $2 ?", $1":"$2);

Then the block would be

<file at [] is extension []?>
in a plugins category

The Issue of Saving
Since 2.0 uses a JSON, it wouldn't be too hard.
Each plugin, in order to work, would have to be given a "signature" showing it is not malicious or anything else of the kind
In the file the block would be saved as normal except with *from(signatureHere) afterwards

A Note On Using JavaScript and Batch
JavaScript only supports sockets if the connection is identified as using the WebSocket protocol, so this would be a problem, and would rely on the browser supporting HTML5 standards
Batch files only support sockets through Telnet, which is disabled by default on Windows Vista/7 but enabled on other Windows OS's

Last edited by SJRCS_011 (2012-07-30 11:25:02)


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#2 2012-05-04 18:01:15

itsmomito
Scratcher
Registered: 2008-03-28
Posts: 100+

Re: Plugin API for 2.1 or Later | Allows Modding!

Support!

Offline

 

#3 2012-05-08 18:36:38

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

Too hard to implement, which could make it rather improbable. But anyways, I support.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#4 2012-05-08 18:52:07

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

bobbybee wrote:

Too hard to implement, which could make it rather improbable. But anyways, I support.

there's a reason I suggested it for 2.1  tongue
Thanks for the support though


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#5 2012-05-14 09:43:49

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

What are "remote sensor connections" anyway?


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#6 2012-05-14 10:12:37

veggieman001
Scratcher
Registered: 2010-02-20
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

wow

I say yay, that would be great.
And they use JSON, not XML.

Last edited by veggieman001 (2012-05-14 10:12:47)


Posts: 20000 - Show all posts

Offline

 

#7 2012-05-14 21:33:11

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

mythbusteranimator wrote:

What are "remote sensor connections" anyway?

Remote Sensors

Thanks for support veggie  big_smile

Last edited by SJRCS_011 (2012-05-14 21:34:43)


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#8 2012-05-15 11:46:33

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

kinda support the idea, but seems a bit too easy to manipulate and abuse  hmm

Offline

 

#9 2012-05-17 07:53:37

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

roijac wrote:

kinda support the idea, but seems a bit too easy to manipulate and abuse  hmm

thanks
Maybe there could be some sort of limitation though
Plus each user would decide whether or not to use that certain plugin


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#10 2012-05-23 08:49:34

Bklecka
Scratcher
Registered: 2011-08-27
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

You Got This From Minecraft's Upcoming Modding API But I Support.


http://i48.tinypic.com/106ijc9.jpg

Offline

 

#11 2012-05-23 20:06:52

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

Bklecka wrote:

You Got This From Minecraft's Upcoming Modding API But I Support.

Actually no.  But thanks for support.


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#12 2012-05-31 22:28:33

XenoK
Scratcher
Registered: 2011-09-08
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

support 110%


Eternity Tasks has launched into Alpha One! http://tasks.eternityincurakai.com/EI%20projects.png

Offline

 

#13 2012-06-01 07:42:46

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

XenoK wrote:

support 110%

Thanks XenoK!


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#14 2012-07-13 01:26:59

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

I support!


Hai.

Offline

 

#15 2012-07-13 01:32:25

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

I support! Would this allow for multiple mods to be installed? I was thinking of making a mod for that in 1.4, but never got around to it.

Offline

 

#16 2012-07-13 04:23:34

SciTecCf
Scratcher
Registered: 2011-11-23
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

I support!


http://bit.ly/LCZEJRhttp://bit.ly/LSONcOhttp://bit.ly/LF3vIc
http://trinary.site40.net/images/scratchrank.php?username=SciTecCf&amp;display=small

Offline

 

#17 2012-07-13 10:38:40

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

@samtwheels: yeah, it would allow for multiple mods to be loaded at a time
Thanks SciTecCf, samtwheels, and fg123!


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#18 2012-07-16 11:46:23

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

Re: Plugin API for 2.1 or Later | Allows Modding!

Support! It would be really awesome.

Offline

 

#19 2012-07-16 13:38:39

muppetds
Scratcher
Registered: 2011-02-11
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

support


SCRATCH'S PARTLY INSANE RESIDENT 
http://internetometer.com/imagesmall/31691.pnghttp://bluetetrarpg.x10.mx/usercard/?name=muppetds

Offline

 

#20 2012-07-29 21:35:53

laser314
Scratcher
Registered: 2010-07-16
Posts: 100+

Re: Plugin API for 2.1 or Later | Allows Modding!

Support!


http://alpha.scratch.mit.edu/scratchr2/static//images/logo_sm.png 2.0 Alpha Tester!http://i49.tinypic.com/1zckcqb.png

Offline

 

#21 2012-07-30 11:23:25

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

laser314 wrote:

Support!

Thanks!  big_smile


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#22 2013-01-03 21:34:35

SJRCS_011
Scratcher
Registered: 2011-02-07
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

bump


http://i.imgur.com/vQqtH.png
Learning to Program in a Nutshell:  "You're missing a closing parentheses" - LS97

Offline

 

#23 2013-01-04 04:34:59

soniku3
Scratcher
Registered: 2011-12-08
Posts: 1000+

Re: Plugin API for 2.1 or Later | Allows Modding!

Support , however , hasn't the ST has this type of suggestions before? Remember little kids wouldn't understand.


internet's all about cats today.

Offline

 

Board footer