PDA

View Full Version : Arty-fishL scripter


arty-fishL
11-18-2010, 06:28 PM
This is a nice little tool for those of you who wish to use jython scripting in Alice, but havent enabled it either because you dont know how, dont want to risk corrupting stuff, or cant be bothered. It also allows you to view the scripts in worlds that other people have added scripting to.

This will also be useful for all existing scripters once I get it fully finished as it is a scripting window with many formatting functions, import scripts, export scripts, shortcuts, useful codes etc.

All you need to do is download this object and import it into any world you want to script in. Then play the world its in, a confirmation message should appear in the Alice title bar. Stop the world, then you should hear a beep and a nice scripting frame will appear.
You can open the scripting window at any time by pressing CTRL+ENTER or from the Alice Tools menu, there should now be a Scripter sub-menu in it, just go to this and click Show Scripter.
If you want to disable the tool for publishing just use the Enable Scripter tickbox in the Scripter sub-menu in the Alice Tools menu.

You can delete this tool from the world and the scripting will still be there and still work fine, you can import it again and continue using it. The file is very small, so it wont really affect your world.

After its been run a scripter sub-menu will appear in the tools menu in the Alice menu bar at the top of the main Alice editor window. It has all the functions of the optional mini-menu. The mini-menu can be enabled from the Tools>Scripter menu. Now you can open the Scripter with CTRL+ENTER.

Changes in post below (http://www.alice.org/community/showthread.php?p=41042#post41042)

2010
ORIGINAL 19 Nov
UPDATED 21 Nov
UPDATED 25 Nov
UPDATED 30 Nov
UPDATED 4 Dec
UPDATED 6 Dec
2011
UPDATED 25 Aug

:D:D:D:D

hope that isnt too much to read, its hopefully worth it though

arty-fishL
11-21-2010, 12:31 PM
BUMP! 5 views, no replies? ive got good reviews from X, but in PMs only.

shaydon
11-21-2010, 01:37 PM
BUMP! 5 views, no replies? ive got good reviews from X, but in PMs only.

trying it out now! =]

arty-fishL
11-21-2010, 05:36 PM
Ive got a lot more done on the scripter now. Ive added the ability to re-open (unhide) it by pressing ALT and SHIFT together or by moving the mouse to the top left corner of the screen. Ive also added a mini menu which appears in a small frame at the side when the main scripter is closed. Ive made stuff easier to use and access. Ive got the fileand help menus fully functioning and the edit mostly done and some of the tools, plus ive added some other menu stuff. Also ive fixed some bugs.

Ive updated it with the latest version.

arty-fishL
11-24-2010, 06:29 PM
Updated again - finished format menu and favourites is almost working, just need to get it to repaint itself when an item is added, for now just hide and show the scripter after you've added a favourite.

Also I understand this only appeals to a very small audience who can jython script, but Im going to continue development for this anyway because I want to please that minority and because its leading up to something much better that I need this to make. :D

arty-fishL
11-30-2010, 05:22 PM
Updated it again, ive got all you really need finished, just a lot of wonderfulness still to add. Mainly - ive added a right click menu (was very hard to work out the java to jython translations for this) with some quick tools and ive added almost all the options to the code menu, just got to make them work now.

Please dont think this is easy for me. Not only am I writing in jython, which some of you may find hard enough, but I have to thread, manage and sort lots of code. I also have to work out java to jython translations.

I have written 1780 lines of code in this so far!!! Thats a lot.

zonedabone
12-01-2010, 03:31 PM
Looking great! I'm actually trying to work on an IDE that can manipulate alice methods and python scripts, as well as modify variables. I figued out how the alice xml files work, so it shouldn't be too hard.

arty-fishL
12-02-2010, 10:15 AM
Thanks.
I hope my idea isnt too much like yours, as I said above, I am making this so that I can produce something bigger and better. I was planning on making a nice visual scripter that looks very similar to Alice, but turns its produce into jython code and has much more functions, to allow the average Alice user to make a much more advanced world that runs smoothly. It is to be made in the same format as the scripter; on an object that produces a nice java frame. It is to be called Visual Élancé (Which just equates to Visual Slender, slender because it is lite [which is somehow different to light] and will produce lite code).
I have been researching the Alice jar in Netbeans and have found many usable functions. I also now know how to use java events in jython and im working out how to use Abstract Classes, after I have achieved this hopefully I can mix all my knowledge together with the scripter and produce a nice, noob proof, finished product

arty-fishL
12-04-2010, 04:09 PM
Ive updated it yet again. Now after its been initialised (world run then stop) a scripter sub-menu will appear in the tools menu in the Alice menu bar at the top of the main Alice editor window!!! It has all the functions of the mini-menu. This is not only very useful, but the ability to manipulate the main Alice frames is a mega-advancement.

Ive also made the mini-menu look much nicer, ive changed its look and feel to a smooth-bordered green frame that is always on top.

Another update, now you can open the Scripter with ALT+S, plus ive added other shortcut keys (look in the scripter sub-menu for them).

Now I need to change most of the code to fit the new features and make the whole thing easier to access. I'm going to try and slim the code down as well.

zonedabone
12-05-2010, 10:54 PM
Arty, you might want to consider making this an alice addon. To explain this, I must explain a project I'm thinking of.

When alice starts, it loads that alice package from the jython library. These are loaded during the splash screen. Anyway, you could spawn threads during that time that would be effective during the remainder of the alice session. I am thinking of a system that would keep records of code modules called addons, and then update these and import them.

jediaction
12-06-2010, 10:07 AM
How do you run it?

arty-fishL
12-06-2010, 11:13 AM
Addon, sounds interesting, tell me when youve got the code done, then I could try that.

To run it:


Import the scripter a2c object into whatever world you want it in
Play the world
Stop the world
It should come up then, plus a scripter submenu to open it should be added to the Alice Tools menu

hope that helps :)

arty-fishL
12-06-2010, 12:32 PM
Right, ive made the Scripter much less annoying and more practical. Big changes, so please read:


Ive streamlined the code, removed stuff thats not needed anymore.
Ive removed the ALT+SHIFT opener, there are other key combos now.
Ive changed the ALT+S opener to CTRL+ENTER, this is now always enabled, its no longer an optional feature, so you can always open the Scripter with this key combo.
Ive made the mini-menu an optional feature (can be enabled in the Tools>Scripter menu) as the Scripter menu is there.
Ive made the Scripter open automatically after the first play of the world only, after that it will not open by default anymore (but it can be enabled again), just use CTRL+ENTER or the Scripter menu to open it after this.
It no longer will print out an initialisation message at startup, as this was printed before it actually initialised and was therefore misleading, now you should see a message in the title bar of Alice and hear a beep when you stop the world.
Ive seperated the enable scripter open after world play option and enable scripter option. Disable the Scripter when publishing the world so it doesnt open on other people.
Ive updated the quick-menu help and mini-menu due to all changes.
Ive added a pale green hue to the Scripter text area, to go with my Arty-fishL style. Ive highlighted the Show Scripter menu option green just to make it stand out.
Although its still preferable that you manually deactivate the scripter with the deactivate option in the Tools>Scripter menu before opening a different world, I have added automatic deactivation when you use the File>New World or File>Open World... options. Deactivation just stops currently running Scripter proccesses and removes the Scripter menu, so it doesn't cause errors in the next world.
And I might have done some other things I dont remember.

There :D

x2495iiii
12-08-2010, 01:53 AM
I'm waiting for the pre-set code options to be done. Especially the robot stuff.

Course, I could always learn it myself I suppose.

Maybe I'll go do that instead.

Anyway, great stuff arty.

arty-fishL
12-08-2010, 11:03 AM
Ive finished the preset basic menu, just the rest to do ...

zonedabone
12-08-2010, 03:07 PM
I like this. It will be the first addon for addice! =)

arty-fishL
12-08-2010, 06:23 PM
lol, addice. Do I have to do anything for it yet, or is addice just in development.

kst3268
12-09-2010, 10:41 AM
Everytime i click a square the previous clicked squares change into the new letter. can someone please help me?

arty-fishL
12-09-2010, 02:43 PM
Im not going to reply to that on this thread, please post this on a new thread in the "how do I" bit

Click this link to do it (http://www.alice.org/community/newthread.php?do=newthread&f=16)

arty-fishL
08-25-2011, 10:27 AM
Arty, you might want to consider making this an alice addon. To explain this, I must explain a project I'm thinking of.

When alice starts, it loads that alice package from the jython library. These are loaded during the splash screen. Anyway, you could spawn threads during that time that would be effective during the remainder of the alice session. I am thinking of a system that would keep records of code modules called addons, and then update these and import them.I re-read this post and I've just realised - this is almost exactly the way my addons work, although I didn't realise at the time; that being said though, I still did basically copy Zone's idea because he seemed to have given up on it, I acknowledged that and credited him and will do when I'm finished.


NEW UPDATE v0.6

I've updated the Scripter again, this time in a massive way.
The surface (visible) changes include:
- Undo/Redo now works
- added undo and redo to right-click menu
- go to line now works
- reduced tab size
- added option to set custom tab size in font editor
- Alice Scripter menu help has changed

But the really big changes are inside the code. I have now made it so that the code can be used for both the object it currently is and an addon! All it takes is the change of one variable, so now both the addon and the object should be able to get updates together.
Yay :D, so Scripter is my latest addon for Arty-fishL Addons.

To distinguish between the object and the addon they have the following full official names:
- Object - Arty-fishL Scripter (as it was)
- Addon - Super Scripter

jediaction
08-25-2011, 10:49 AM
Arty, sorry for the topic change. But you have to respond and read my message that I sent you. It's about halo 2. I don't need to send another one. Please check!

Zack Strife
09-04-2011, 10:07 PM
I'm just curious, is there a way to apply a, sort of distorted invisibility effect (like MGS's stealth camouflage) through direct programming?

arty-fishL
09-05-2011, 11:33 AM
I'm just curious, is there a way to apply a, sort of distorted invisibility effect (like MGS's stealth camouflage) through direct programming?As far as I know - no. Although I'm no expert on renderers. You can do similar effects in Alice if you work out how though.

Zack Strife
09-05-2011, 03:06 PM
The closest I can get to what I want is basically to make them almost invisible (like .1 opacity) but the background doesn't bend with the character. I guess Ill just have to live with that, ps is there an easy and free way that I can learn how to program in Java/Jython?

arty-fishL
12-17-2011, 08:24 PM
I know to most people this project is a load of :confused::confused:, I don't care really, I still want to make it.

I've taken huge steps towards making this an eligible scripting tool lately.
I've utilised listeners and taken control of key, mouse, focus and value change events on the text area. This has allowed me to to make it so much better.

It now always holds focus, except when menus are up. Automatic indentation is enabled.There is a status bar. It has syntax highlighting. I'm very proud of the syntax highlighting, it doesn't look sleek, but its still very useful. It works almost flawlessly, but with a few exceptions I am trying to solve. It can't yet highlight comments and it doesn't yet support proper highlighting when "s are nested in 's, but it does work the other way around. I also made other changes.

The only issues arising due to my changes right now are problems with speed when the code gets too large, but I'm thinking of introducing a line-sync instead of whole-document-sync option for when it gets above a certain length.

http://img585.imageshack.us/img585/9775/superscripter.png
PS- that's not supposed to be valid code, its just showcasing the syntax highlighting.

Mr Kidnapper
12-17-2011, 09:27 PM
Now all you need to do is make it eclipse-like by changing the font to Verdana and change the font color rather than the highlight color.

arty-fishL
12-18-2011, 11:15 AM
Now all you need to do is make it eclipse-like by changing the font to Verdana and change the font color rather than the highlight color.Verdana, maybe, I will decide what font is best in a minute. You can change the font from the format > font menu option if you want to any font on your system. Right now the font is just the default, which would be Dialog.plain (Arial I think) as it is supported by all.

As with the font colour, there lies the issue, I'm using a JTextArea, which only supports changing highlight colour or font colour for the entire object, I need to be using a JTextPane, but that requires quite a lot of changes in the code.

mvene
04-04-2012, 10:06 PM
I recently downloaded the objet arty_fish_Scripter.a2c and when i attempt to run the world the follow message appears.

Alice version: 2.2 03/01/2012

os.name: Windows 7

os.version: 6.1

os.arch: x86

java.vm.name: Java HotSpot(TM) Client VM

java.vm.version: 20.0-b11

user.dir: C:\Users\Mvene\Desktop\Required



*****Running World*****

Exception in thread Thread-1:

Traceback (most recent call last):

File "<string>", line 53, in run

File "<string>", line 2700, in getWorld

NameError: getAuthoringTool


Is there some machine requirements to run the object or previous files that I must run before this one?

Thanks in advice.

Martin.

RavenOfCode
02-04-2015, 05:49 AM
This is awesome! How did I not see this! :)