[C#] RPG Maker ScriptEditor Development Thread

Started by ForeverZer0, August 24, 2011, 01:53:27 am

Previous topic - Next topic

ForeverZer0

August 24, 2011, 01:53:27 am Last Edit: August 28, 2011, 08:26:44 pm by ForeverZer0
In case anyone has not seen the Zlib discussion a short bit ago, I mentioned I am making an enhanced script editor for RMXP/RMVX.  I already have, implemented quite a few nice features into it that the default script editor is lacking, and I plan to add some more.  I would say currently I am about 70% done (at least with the hard stuff), and now I more working on design and the extra little goodies that come with any IDE.  This brings me to the point of my thread:  What do scripters out there want out of an IDE built specifically for the RPG Maker community?  I would like some feedback on what is most important to each person.

Working Features So Far (or mostly working)

  • Can directly edit script archives for RMXP and RMVX

  • Ability to run game from the editor, either in DEBUG/TEST mode, or release mode

  • Syntax highlighting, with configuration for tweaking the lexer to how you see fit, including custom colors, fonts, and styles

  • Autocomplete for Ruby constants and classes, same with RMXP (autocomplete for RMVX not quite done yet)

  • Brace matching

  • Multiple tabbed documents open for quick selecting between them

  • Drag and drop game project files for easy loading

  • Drag and drop other files for quick import of scripts

  • Folding code for classes, methods, blocks, etc

  • Guidelines

  • Batch commenting/uncommenting

  • Auto-Indenting

  • Current line highlighting



Planned Features

  • New project creation

  • And more



What I will NOT be Adding

  • Active syntax checking, although I might add a "Click to Test Code" type of feature or something

  • Full blown Intellisense with dynamically adding autocomplete words for your custom classes, variables, etc. will likely not happen anytime soon

  • Support for other game makers

  • I may include a snippet manager, but macros are out of the question



Other than what I listed as "will nots", I'm open for any ideas.  Please keep in my mind that I am not a professional, and I do this as a hobby.  I will not be creating the most bad-ass IDE that ever was made, so please keep your ideas more on the simple side, and design ideas.  

Well without further talk, here's a link to the current build.  Do not mind the all the files inside, they will be merged before final release. For nor, the only one of concern is "ScriptEditor.exe".

RPG Maker Script Editor (2.22 MB)


This application is dependent on Microsoft .NET Framework 2.0 or higher.

P.S.  I sooo used the download pic from DM in case you're wondering. ;)
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

AngryPacman

COOL!
I especially like the hiding feature thing. It'll be great for tracking down incorrect number of 'end' errors.
A suggestion; I've noticed something that you may or may not be aware of. When creating a range, i.e.
for i in 0..2

The first dot is highlighted the color of the number (which makes sense), but the second is highlighted the color of operators (which also makes sense). Just thought it'd be better if the first . was highlighted as an operator also.
G_G's a silly boy.

ForeverZer0

I agree, and I didn't notice that. 

There are a few various bugs to still work out with the Lexer that I have noticed, as well as autocomplete.  One oddity is doing block comments.  The stream comment prefix is set to "=begin", but the second you put a single "=" sign against the left side, it goes into comment mode.  Scintilla is funky in how it doesn't like to perceive any symbol as party of the word.  I ran into a problem with that concerning the autocomplete, and trying to include global variables in it. It would ignore the symbol and drop the word in front of the already placed "$", hence I removed that.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

AngryPacman

August 24, 2011, 02:40:57 am #3 Last Edit: August 24, 2011, 02:51:30 am by AngryPacman
It also doesn't seem to like keywords after 'end'. I'll show you what I mean, this is from my menu script:
        begin
          @gold_window.update
          Graphics.update
        end until @gold_window.openness == 255
The end is highlighted as a keyword as per usual, but the until is treated as normal text.
I also suggest a default command for the styles configuration. XD

As it turns out, it doesn't do any keywords that aren't after an operator or the start of a line.
G_G's a silly boy.

ForeverZer0

Its looking for the "end" to be on its own line.  Multiple keywords work fine on the second line, so long as you are using them in a normal fashion.  The issue is not because they aren't working, its that they are being overridden by anothe configuration for a different data type.

For example,  "def self.method", the "self" wont't be blue, because it is being overridden by the style for coloring method names.  I can fix it so that the keywords will have a higher precedence though.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Spaceman McConaughey

Glad you like my download button. <3

Also, nice program. :3

*lvls up*

G_G

August 24, 2011, 08:26:25 am #6 Last Edit: August 24, 2011, 08:31:10 am by game_guy
This shit better get posted on DM F0 >:U

Nice job though! *steals download button back*

Also you'll have problems merging things. The IronRuby libraries are signed and won't work when merged into one .NET executable. I tried it with my Quick Fix: Item Price and then it kept popping up errors saying "It couldn't find IronRuby.dll". If you can get them merged please let me know how you did it.

EDIT!
Oh! Add an option to "Backup scripts" on run. Just for safety measures you know.

ForeverZer0

I like the back up scripts idea, I was playing with merging last night, and was getting some successful combinations, but couldn't get them all into one dll/exe.  If I figure it out, I'll let you know.  I've been using ILMerge, since {smartassembly} won't even let you try.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

G_G

*moves to Development Tools*

By the way, small bug. Insert usually inserts a new script above the selected, in this case it adds it to the bottom of the list. Tsk tsk.

ForeverZer0

August 24, 2011, 09:14:15 pm #9 Last Edit: August 25, 2011, 02:15:34 am by ForeverZer0
All in good time.  

I actually forgot about that one, though.  I provided basic functionality just for adding a script to the list, then got side-tracked.  I never went back and added the line to tell it what index to insert at.  :P

There are 100 "bugs" in it still, which I am aware of most them.  Its still very incomplete, I only released a build that kinda showed what the whole thing was about. The main functionalities are all in place, now I need to go back and add some details, fix bugs, rearrange, etc., etc....  

EDIT:
I implemented a few more features, which I'll post an updated build tomorrow probably.

  • Auto-Indent

  • Custom Autocomplete list

  • Fixed the "insert" method so it functions properly

  • Status bar now shows line count, character count, and position

I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

AngryPacman

Does the auto-indent move a tab back for 'when' statements? I hate having to manually do that, small as it may be.
G_G's a silly boy.

Blizzard

How about you work on the ARC Editor, F0? D:
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

ForeverZer0

UPDATE:

I worked a bit more on the editor (the ARC one also...), and got an update.  Here's a quick run-down of this build from the last I uploaded:

  • Everything I listed in my last post that I did

  • Increased efficiency and memory usage by restructuring some classes around, will also load the scripts slightly faster

  • Added a config for a current line highlighter

  • Implemented Find/Replace functions for the scripts

  • Implemented a "Goto Line" function

  • Added hotkeys for pretty much everything

  • Improved the auto-complete so its a little more intelligent, same with auto-indent

  • Implemented a "Recently Opened" function for quickly re-opening projects

  • Implemented the saving of configurations


I added the link to the original post, but here it is as well:

RGSS Editor (2.21 MB)
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

G_G

*remembers list of scripts to finish* I am so fucking using this!

ForeverZer0

There are still bugs too fix.  These are ones I know of and just haven't got to yet

  • The few inconsistencies with syntax coloring that AngryPacman found

  • If the Find/Replace is called with Ctrl + f or Ctrl + H, it will create multiple windows for each script that it is used in instead of re-using the already opened one

  • I may tweak the auto-complete as well, I'm still not entirely satisfied with it.

I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

G_G

Could you make it so the control key does the auto complete? I'll be typing up comments and be typing similar words, go to hit enter at the end of a line and it puts "Window_Base" out of nowhere. Or at least make the key somewhat configurable.

ForeverZer0

Yeah, that's no problem, I can do that.  I have an array for "no pop-up" characters for it, so that will be easy. Do you think it is a little too persistent?  I thought of making it so that it doesn't pop up until at least two characters are input, but wasn't sure who would want that or not.  I'll likely end up just adding another setting to be determined by the user for that. Anyways, the auto-complete is far from perfect. Before its done, I also planned to disable it for comments so it wouldn't always be popping up.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

G_G

I think it should be a user defined setting. 2-3 characters usually suffices though. Having it disabled for comments would be awesome. :3 I really like the feel of the program. ARC better have this as the script editor.

ForeverZer0

Sadly, it uses .NET, which we can't have the editor rely on for ARC.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

G_G

One more suggestion that I've always liked from Notepad++. Alpha bars on the bottom of the pop up windows. That was always nice.