Discuss Scratch

dude341
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

djdolphin wrote:

dude341 wrote:

Is there any way to mod without upgrading to the worst os ever? (A.K.A OS 10.10)
I'm pretty sure you don't have to, but Yosemite isn't bad.
X-Code requires you to use 10.10, which in my opinion, is the worst OS ever.
ChocolatePi
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

dude341 wrote:

djdolphin wrote:

dude341 wrote:

Is there any way to mod without upgrading to the worst os ever? (A.K.A OS 10.10)
I'm pretty sure you don't have to, but Yosemite isn't bad.
X-Code requires you to use 10.10, which in my opinion, is the worst OS ever.
You don't have to use XCode to mod Scratch, just use another text editor.
micheleruralhub
New Scratcher
3 posts

Scratch 2.0 Modding for Newbs

djdolphin wrote:

micheleruralhub wrote:

Hello everybody,

first of all I would thank djdolphin for the tutorial,
second I have the following question:

How do i include my custom sprites in the media library?

Thank you in advance.
To create new media library, it looks like you'd have to run Scratch off of a web server, create a folder called medialibraries in the same folder as Scratch.swf, and put a file called <asset type>Library.json there, filled with information identifying the media. These are the files that Scratch uses:

https://cdn.scratch.mit.edu/scratchr2/static/__f9572735fe30b0336e0af6daf6c8e648__/medialibraries/spriteLibrary.json
https://cdn.scratch.mit.edu/scratchr2/static/__f9572735fe30b0336e0af6daf6c8e648__/medialibraries/costumeLibrary.json
https://cdn.scratch.mit.edu/scratchr2/static/__f9572735fe30b0336e0af6daf6c8e648__/medialibraries/backdropLibrary.json
https://cdn.scratch.mit.edu/scratchr2/static/__f9572735fe30b0336e0af6daf6c8e648__/medialibraries/soundLibrary.json

Then you'd have to modify getAsset in Server.as to retrieve the assets from your server. I haven't tried this, so I don't really know the specifics.
Thank you a lot djdolphin.

I will work on it, and if there are good news, I will contact you.

Thank you again.
dude341
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

ChocolatePi wrote:

dude341 wrote:

djdolphin wrote:

dude341 wrote:

Is there any way to mod without upgrading to the worst os ever? (A.K.A OS 10.10)
I'm pretty sure you don't have to, but Yosemite isn't bad.
X-Code requires you to use 10.10, which in my opinion, is the worst OS ever.
You don't have to use XCode to mod Scratch, just use another text editor.
Xcode is not a text editor and the main post say's you need it.
Znapi
Scratcher
500+ posts

Scratch 2.0 Modding for Newbs

dude341 wrote:

ChocolatePi wrote:

dude341 wrote:

djdolphin wrote:

dude341 wrote:

Is there any way to mod without upgrading to the worst os ever? (A.K.A OS 10.10)
I'm pretty sure you don't have to, but Yosemite isn't bad.
X-Code requires you to use 10.10, which in my opinion, is the worst OS ever.
You don't have to use XCode to mod Scratch, just use another text editor.
Xcode is not a text editor and the main post say's you need it.
The appstore calls Xcode an entire IDE, but I guess we can call it a text editor since none of the IDE features will be handy when developing something other than an iPhone app. You don't really need Xcode, you only need the command line developer tools that are packaged with it, because they aren't packaged with Mac OS X. I don't know if there are downloads for the command line tools(or the entire app) for older versions of OS X somewhere on the internet. Apple likes to push everyone towards upgrading.
TimothyLawyer
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

Znapi wrote:

Apple likes to push everyone towards upgrading.
You should see the spam I am getting from Microsoft to upgrade to Windows 10 on my Windows 7 machine.
dude341
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

TimothyLawyer wrote:

Znapi wrote:

Apple likes to push everyone towards upgrading.
You should see the spam I am getting from Microsoft to upgrade to Windows 10 on my Windows 7 machine.
Windows 10 could just randomly change it's name, so let's call it “Windows NT 6.4”
ChocolatePi
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

dude341 wrote:

ChocolatePi wrote:

dude341 wrote:

djdolphin wrote:

dude341 wrote:

Is there any way to mod without upgrading to the worst os ever? (A.K.A OS 10.10)
I'm pretty sure you don't have to, but Yosemite isn't bad.
X-Code requires you to use 10.10, which in my opinion, is the worst OS ever.
You don't have to use XCode to mod Scratch, just use another text editor.
Xcode is not a text editor and the main post say's you need it.
I meant to say “Don't use XCode, use another thing, like a text editor”, but it didn't come out right.

Anyway, I don't see any reason why you need XCode, I'm modding Scratch fine without it.
DigiTechs
Scratcher
500+ posts

Scratch 2.0 Modding for Newbs

ChocolatePi wrote:

dude341 wrote:

ChocolatePi wrote:

dude341 wrote:

djdolphin wrote:

dude341 wrote:

Is there any way to mod without upgrading to the worst os ever? (A.K.A OS 10.10)
I'm pretty sure you don't have to, but Yosemite isn't bad.
X-Code requires you to use 10.10, which in my opinion, is the worst OS ever.
You don't have to use XCode to mod Scratch, just use another text editor.
Xcode is not a text editor and the main post say's you need it.
I meant to say “Don't use XCode, use another thing, like a text editor”, but it didn't come out right.

Anyway, I don't see any reason why you need XCode, I'm modding Scratch fine without it.

I'm modding Scratch over SSH with Vim. PuTTY is a nice terminal interface.
dude341
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

Just please tell me how to install Homebrew without Xcode! (You do need Xcode Unnecessary Command Lines !)
ChocolatePi
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

dude341 wrote:

Just please tell me how to install Homebrew without Xcode! (You do need Xcode Unnecessary Command Lines !)
Then you can download ant manually. http://ant.apache.org/
micheleruralhub
New Scratcher
3 posts

Scratch 2.0 Modding for Newbs

djdolphin wrote:

micheleruralhub wrote:

Hello everybody,

first of all I would thank djdolphin for the tutorial,
second I have the following question:

How do i include my custom sprites in the media library?

Thank you in advance.
To create new media library, it looks like you'd have to run Scratch off of a web server, create a folder called medialibraries in the same folder as Scratch.swf, and put a file called <asset type>Library.json there, filled with information identifying the media. These are the files that Scratch uses:

https://cdn.scratch.mit.edu/scratchr2/static/__f9572735fe30b0336e0af6daf6c8e648__/medialibraries/spriteLibrary.json
https://cdn.scratch.mit.edu/scratchr2/static/__f9572735fe30b0336e0af6daf6c8e648__/medialibraries/costumeLibrary.json
https://cdn.scratch.mit.edu/scratchr2/static/__f9572735fe30b0336e0af6daf6c8e648__/medialibraries/backdropLibrary.json
https://cdn.scratch.mit.edu/scratchr2/static/__f9572735fe30b0336e0af6daf6c8e648__/medialibraries/soundLibrary.json

Then you'd have to modify getAsset in Server.as to retrieve the assets from your server. I haven't tried this, so I don't really know the specifics.

Ok I solved it with a “bad solution” that for now it's sufficient.
In Scratch.as file, there is isOffline var (it's in initialize method) that you will set up to true.
After, if you have installed Scratch 2.0 offline editor previously, go to in the installation folder and copy media,locale,icons folders into same folder of Scratch.swf.
A this point, you will able to see all media library loaded
Praktikantin
New Scratcher
4 posts

Scratch 2.0 Modding for Newbs

Hello everybody,


I have a problem - it doesn't work! (I have Windows7 on my PC)
I have followed the instructions and wrote this in my command prompt:

C:\Users\praktikant\Documents\scratch\scratch-flash-master>ant


And I got this back:


C:\Users\praktikant\Documents\scratch\scratch-flash-master>ant
Buildfile: C:\Users\praktikant\Documents\scratch\scratch-flash-master\build.xml

init:
Deleting directory C:\Users\praktikant\Documents\scratch\scratch-fla
sh-master\bin
Created dir: C:\Users\praktikant\Documents\scratch\scratch-flash-mas
ter\bin

test_10.2:
Loading configuration file C:\Users\praktikant\Documents\ApacheFlex\
frameworks\flex-config.xml
C:\Users\praktikant\Documents\scratch\scratch-flash-master\src\scrat
ch\ScratchStage.as(566): col: 18 Warning: Empty statement found where block of c
ode expected. Did you type ‘;’ accidentally?

if(Scratch.app.isIn3D) {
^

C:\Users\praktikant\Documents\scratch\scratch-flash-master\bin\Scrat
chFor10.2.swf (2330679 bytes)

compile:
Loading configuration file C:\Users\praktikant\Documents\ApacheFlex\
frameworks\flex-config.xml
C:\Users\praktikant\Documents\scratch\scratch-flash-master\src\rende
r3d\DisplayObjectContainerIn3D.as(539): col: 50 Error: Access of undefined prope
rty Context3DTextureFilter.

var desiredTextureFilter:String = useNearest ? Context3D
TextureFilter.NEAREST : Context3DTextureFilter.LINEAR;
^

C:\Users\praktikant\Documents\scratch\scratch-flash-master\src\rende
r3d\DisplayObjectContainerIn3D.as(539): col: 83 Error: Access of undefined prope
rty Context3DTextureFilter.

var desiredTextureFilter:String = useNearest ? Context3D
TextureFilter.NEAREST : Context3DTextureFilter.LINEAR;

^

C:\Users\praktikant\Documents\scratch\scratch-flash-master\src\rende
r3d\DisplayObjectContainerIn3D.as(541): col: 14 Error: Call to a possibly undefi
ned method setSamplerStateAt through a reference with static type flash.display3
D:Context3D.

__context.setSamplerStateAt(0, Context3DWrapMode
.CLAMP, desiredTextureFilter, Context3DMipFilter.MIPNONE);
^

C:\Users\praktikant\Documents\scratch\scratch-flash-master\src\rende
r3d\DisplayObjectContainerIn3D.as(541): col: 35 Error: Access of undefined prope
rty Context3DWrapMode.

__context.setSamplerStateAt(0, Context3DWrapMode
.CLAMP, desiredTextureFilter, Context3DMipFilter.MIPNONE);
^

C:\Users\praktikant\Documents\scratch\scratch-flash-master\src\rende
r3d\DisplayObjectContainerIn3D.as(541): col: 82 Error: Access of undefined prope
rty Context3DMipFilter.

__context.setSamplerStateAt(0, Context3DWrapMode
.CLAMP, desiredTextureFilter, Context3DMipFilter.MIPNONE);

^


BUILD FAILED
C:\Users\praktikant\Documents\scratch\scratch-flash-master\build.xml:35: mxmlc t
ask failed

Total time: 22 seconds

C:\Users\praktikant\Documents\scratch\scratch-flash-master>



I am thankful for all information I will get!
dude341
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

ChocolatePi wrote:

dude341 wrote:

Just please tell me how to install Homebrew without Xcode! (You do need Xcode Unnecessary Command Lines !)
Then you can download ant manually. http://ant.apache.org/
Wow… How do you install that mess?

Last edited by dude341 (July 15, 2015 17:04:40)

frozenghost
Scratcher
12 posts

Scratch 2.0 Modding for Newbs

Praktikantin wrote:

I have a problem - it doesn't work! (I have Windows7 on my PC)
I have followed the instructions and wrote this in my command prompt:

C:\Users\praktikant\Documents\scratch\scratch-flash-master>ant


And I got this back:


C:\Users\praktikant\Documents\scratch\scratch-flash-master>ant
Buildfile: C:\Users\praktikant\Documents\scratch\scratch-flash-master\build.xml

init:
Deleting directory C:\Users\praktikant\Documents\scratch\scratch-fla
sh-master\bin
Created dir: C:\Users\praktikant\Documents\scratch\scratch-flash-mas
ter\bin

test_10.2:
Loading configuration file C:\Users\praktikant\Documents\ApacheFlex\
frameworks\flex-config.xml
C:\Users\praktikant\Documents\scratch\scratch-flash-master\src\scrat
ch\ScratchStage.as(566): col: 18 Warning: Empty statement found where block of c
ode expected. Did you type ‘;’ accidentally?

if(Scratch.app.isIn3D) {

Same here, I had my system set up to successfully compile scratch-flash, but the current version yields exactly the same error. Any ideas how to fix this?

Last edited by frozenghost (July 15, 2015 21:18:35)

djdolphin
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

It looks like Scratch has been failing to build on Travis CI since last week. You'll probably have to wait for the Scratch Team to fix it, use an older version of the source code, or fix it yourself.
Praktikantin
New Scratcher
4 posts

Scratch 2.0 Modding for Newbs

djdolphin wrote:

It looks like Scratch has been failing to build on Travis CI since last week. You'll probably have to wait for the Scratch Team to fix it, use an older version of the source code, or fix it yourself.

It's like djdolphin said. I tried it with an older scratch source code version and it worked!
dude341
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

dude341 wrote:

ChocolatePi wrote:

dude341 wrote:

Just please tell me how to install Homebrew without Xcode! (You do need Xcode Unnecessary Command Lines !)
Then you can download ant manually. http://ant.apache.org/
Wow… How do you install that mess?
Tell me!
ChocolatePi
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

dude341 wrote:

dude341 wrote:

ChocolatePi wrote:

dude341 wrote:

Just please tell me how to install Homebrew without Xcode! (You do need Xcode Unnecessary Command Lines !)
Then you can download ant manually. http://ant.apache.org/
Wow… How do you install that mess?
Tell me!
No one's going to cater to your wishes unless you improve your attitude and be less demanding about this stuff. If you don't want Yosemite (for whatever reason) then you're going to have to figure it out yourself.

http://ant.apache.org/bindownload.cgi
djdolphin
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

djdolphin wrote:

It looks like Scratch has been failing to build on Travis CI since last week. You'll probably have to wait for the Scratch Team to fix it, use an older version of the source code, or fix it yourself.
Actually, it looks like the problem is that Scratch now requires playerglobal11_6.swc instead of playerglobal11_4.swc. I've updated my tutorial.

Powered by DjangoBB