[discussion] Cs Script Editor Wish List

Post » Tue Mar 15, 2011 3:06 am

Bad news - The syntax highlighter has hit a wall. Apparently, its operations are parsed by the RichTextBox control's undo/redo manager, meaning the highlighting can be undone with Ctrl+Z. Looks like its going to get dumped for the moment. I'll release the beta without the feature. It'll probably stay that way until I switch to a custom text editor.
User avatar
Ownie Zuliana
 
Posts: 3375
Joined: Thu Jun 15, 2006 4:31 am

Post » Mon Mar 14, 2011 10:08 pm

Bad news - The syntax highlighter has hit a wall. Apparently, its operations are parsed by the RichTextBox control's undo/redo manager, meaning the highlighting can be undone with Ctrl+Z. Looks like its going to get dumped for the moment. I'll release the beta without the feature. It'll probably stay that way until I switch to a custom text editor.

It's a shame the syntax highlighter isn't working as expected. But it still looks awesome! :celebration:
User avatar
Stephani Silva
 
Posts: 3372
Joined: Wed Jan 17, 2007 10:11 pm

Post » Tue Mar 15, 2011 1:44 am

Would it be possible to have something that marks mis-matched paranthesis? Not a major thing, obviously, but when you're doing a lot of them it's easy to miss one, and then annoying to go back and look through 600+ lines of Script for the one that's wrong...
User avatar
Trevor Bostwick
 
Posts: 3393
Joined: Tue Sep 25, 2007 10:51 am

Post » Mon Mar 14, 2011 4:32 pm

It's a shame the syntax highlighter isn't working as expected. But it still looks awesome! :celebration:
I even added a few shortcut keys :

Ctrl+Space - Focuses the common edit textbox ( the one you see at the top )
Ctrl+F (when focusing the said textbox) - Find
Ctrl+H ( " ) - Replace
Ctrl+G ( " ) - Goto Line

I don't think it can get more counter-intuitive than this!
User avatar
Genevieve
 
Posts: 3424
Joined: Sun Aug 13, 2006 4:22 pm

Post » Mon Mar 14, 2011 2:51 pm

Would it be possible to have something that marks mis-matched paranthesis? Not a major thing, obviously, but when you're doing a lot of them it's easy to miss one, and then annoying to go back and look through 600+ lines of Script for the one that's wrong...
OBSE catches those as it is.
User avatar
Lil'.KiiDD
 
Posts: 3566
Joined: Mon Nov 26, 2007 11:41 am

Post » Mon Mar 14, 2011 4:00 pm

I was thinking about perhaps adding an imports/include feature that'd let the script writer to easily add common or frequently used blocks of code. Something that would work like this:
The user adds an import/include command that follows the working of the #include directive in C/C++ :
scn test#include "CommonQuestVariables"begin gameMode   let fQuestDelayTime := 0.001   let sWorking := 1end
whose parameter is the name of a text file present in a fixed directory (Data\Scripts or Data\Imports) :
float fQuestDelayTimeshort sWorkingfloat fEndianess
When compiling, the line gets replaced by the contents of the parameter:
scn testfloat fQuestDelayTimeshort sWorkingfloat fEndianessbegin gameMode   let fQuestDelayTime := 0.001   let sWorking := 1end


Would such a feature be useful ?
User avatar
Izzy Coleman
 
Posts: 3336
Joined: Tue Jun 20, 2006 3:34 am

Post » Mon Mar 14, 2011 11:38 pm

I was thinking about perhaps adding an imports/include feature that'd let the script writer to easily add common or frequently used blocks of code. Something that would work like this:
The user adds an import/include command that follows the working of the #include directive in C/C++ :
scn test#include "CommonQuestVariables"begin gameMode   let fQuestDelayTime := 0.001   let sWorking := 1end
whose parameter is the name of a text file present in a fixed directory (Data\Scripts or Data\Imports) :
float fQuestDelayTimeshort sWorkingfloat fEndianess
When compiling, the line gets replaced by the contents of the parameter:
scn testfloat fQuestDelayTimeshort sWorkingfloat fEndianessbegin gameMode   let fQuestDelayTime := 0.001   let sWorking := 1end


Would such a feature be useful ?
OMG, YES! :D

[edit]
Too bad indeed of the syntax highlighter, it has always been a valuable asset to me. Hope you'll find a way to make it work in the future. :)
[/edit]
User avatar
Kat Ives
 
Posts: 3408
Joined: Tue Aug 28, 2007 2:11 pm

Post » Mon Mar 14, 2011 4:24 pm

OMG, YES! :D
Come now, that counts as spam!

[edit]
Too bad indeed of the syntax highlighter, it has always been a valuable asset to me. Hope you'll find a way to make it work in the future. :)
[/edit]
I should have picked up an existing text editor control instead of writing one from scratch - That way I'd have save me a lot of work. For some strange reason, it only occurred to me after having coded most of the editor. But then again, had I used a preexisting editor, I wouldn't have gained any experience with C++\CLI.
User avatar
Dean Ashcroft
 
Posts: 3566
Joined: Wed Jul 25, 2007 1:20 am

Post » Mon Mar 14, 2011 2:35 pm

OBSE catches those as it is.


Really? I never knew... (I'm sure I've had issues even with it...) but no problem :)
User avatar
i grind hard
 
Posts: 3463
Joined: Sat Aug 18, 2007 2:58 am

Post » Mon Mar 14, 2011 1:31 pm

Wow, this looks really neat - particularly the function auto-completion. Nice job shadeMe!

What do you think about implementing simple use of the #define command as well as #include? Sometimes it's useful to reuse the same value throughout a script, but there isn't really any point in storing it in a variable.

Translating shorthand assignment operators could be pretty useful to, so things like this could be used:
fTimer += GetSecondsPassed

Cipscis
User avatar
Noely Ulloa
 
Posts: 3596
Joined: Tue Jul 04, 2006 1:33 am

Post » Mon Mar 14, 2011 4:51 pm

  • Search and Replace

RegEx?
User avatar
Chris Johnston
 
Posts: 3392
Joined: Fri Jul 07, 2006 12:40 pm

Post » Mon Mar 14, 2011 7:54 pm

What do you think about implementing simple use of the #define command as well as #include? Sometimes it's useful to reuse the same value throughout a script, but there isn't really any point in storing it in a variable.
I was thinking about the same. Will do.

Translating shorthand assignment operators could be pretty useful to, so things like this could be used:
fTimer += GetSecondsPassed

OBSE's let command already supports such compound operators.


RegEx?
Not at the moment. But it shouldn't be hard to add support for RegEx.
User avatar
Jason Rice
 
Posts: 3445
Joined: Thu Aug 16, 2007 3:42 pm

Post » Tue Mar 15, 2011 2:18 am

OBSE's let command already supports such compound operators.
Oh ok, I guess I'm really not up to date with what OBSE is capable of.

Cipscis
User avatar
Wayne Cole
 
Posts: 3369
Joined: Sat May 26, 2007 5:22 am

Post » Mon Mar 14, 2011 2:41 pm

You know what I thought - an auto completion feature like when writing an if statement and pressing enter an endif is added and the cursor appears, indented by a tab (ini set), between if and endif lines -same with begin - the way braces autocomplete in some editors
Dunno if possible but it would be rather handy :)
User avatar
Jordan Moreno
 
Posts: 3462
Joined: Thu May 10, 2007 4:47 pm

Post » Mon Mar 14, 2011 10:04 pm

You know what I thought - an auto completion feature like when writing an if statement and pressing enter an endif is added and the cursor appears, indented by a tab (ini set), between if and endif lines -same with begin - the way braces autocomplete in some editors
Dunno if possible but it would be rather handy :)
Well, auto-indenting does some of what you've suggested. With it turned on, all you have to do is hit enter - The indentation is taken care of by the editor. The workflow goes like this:
  • begin gameMode

  • if (1)

  • Add more code
  • endIf/else/elseIf


  • end
While it might not add the closing statements automatically, it doesn't interrupt your pace by requiring you to scroll past those line. Personally, I feel that this is a better option.
User avatar
Tammie Flint
 
Posts: 3336
Joined: Mon Aug 14, 2006 12:12 am

Post » Tue Mar 15, 2011 3:03 am

While it might not add the closing statements automatically, it doesn't interrupt your pace by requiring you to scroll past those line. Personally, I feel that this is a better option.

Have to try it out - never worked with such an editor
:tops:
User avatar
Micah Judaeah
 
Posts: 3443
Joined: Tue Oct 24, 2006 6:22 pm

Post » Mon Mar 14, 2011 4:39 pm

Well, auto-indenting does some of what you've suggested. With it turned on, all you have to do is hit enter - The indentation is taken care of by the editor. The workflow goes like this:
  • begin gameMode

  • if (1)

  • Add more code
  • endIf/else/elseIf


  • end
While it might not add the closing statements automatically, it doesn't interrupt your pace by requiring you to scroll past those line. Personally, I feel that this is a better option.

This all sounds good, but one thing I really like about VC++'s auto-indentation is that if you return twice (i.e. leave a line blank), it removes the tabs from the empty line. It really irks me to have the empty tabbed lines in there for some reason. I actually go and remove them when I'm working with auto-indentation that doesn't do that... yeah, that's kind of OCD, I agree...
User avatar
Lakyn Ellery
 
Posts: 3447
Joined: Sat Jan 27, 2007 1:02 pm

Post » Mon Mar 14, 2011 7:21 pm

This all sounds good, but one thing I really like about VC++'s auto-indentation is that if you return twice (i.e. leave a line blank), it removes the tabs from the empty line. It really irks me to have the empty tabbed lines in there for some reason. I actually go and remove them when I'm working with auto-indentation that doesn't do that... yeah, that's kind of OCD, I agree...
Easily done, but then again, since when did you start using the CS ? :P
User avatar
Andrew
 
Posts: 3521
Joined: Tue May 08, 2007 1:44 am

Post » Mon Mar 14, 2011 10:34 pm

I have to test my functions, you know.

Plus ARES is about 40% CS work anyway. So you really want me in the CS.
User avatar
Life long Observer
 
Posts: 3476
Joined: Fri Sep 08, 2006 7:07 pm

Post » Mon Mar 14, 2011 9:11 pm

Plus ARES is about 40% CS work anyway. So you really want me in the CS.
Your wish has been granted. Any other features you'd like to request ?
User avatar
Helen Quill
 
Posts: 3334
Joined: Fri Oct 13, 2006 1:12 pm

Post » Mon Mar 14, 2011 6:59 pm

RegEx, auto-indentation, and a persistent font? It's all I could have ever wanted!

Out of curiosity, how are you doing the auto-complete? Does it use the CS's function list (i.e. the one that OBSE adds functions to, and therefore guaranteed to include all relevant functions), or is it a hard-coded list? It'd be pretty neat to have it automatically include all functions from the CS, OBSE, and loaded plug-ins. No idea if that's possible.

Hmm, what about setting up inter-plugin messaging (the OBSE messaging API supports this) that allows plugin authors the ability to specify some kind of generic URL to which the function name could be appended to produce a link to the documentation? Like for OBSE commands, you could use http://obse.silverlock.org/obse_command_doc.html#, and then any function name appended to that will be the URL for the exact command in the Command Document? Or say, if I have NifScript's functions listed at http://cs.elderscrolls.com/constwiki/index.php/NifScript/ plus the function name, I could have a Message set up in NifScript to give that URL to your thing so that people could look up the documentation on NifScript functions. Could even work on people's personal web sites, provided they use a naming scheme that works as described...

EDIT: Haha auto-parser, haha. You win this time.
User avatar
Megan Stabler
 
Posts: 3420
Joined: Mon Sep 18, 2006 2:03 pm

Post » Tue Mar 15, 2011 3:57 am

Out of curiosity, how are you doing the auto-complete? Does it use the CS's function list (i.e. the one that OBSE adds functions to, and therefore guaranteed to include all relevant functions), or is it a hard-coded list? It'd be pretty neat to have it automatically include all functions from the CS, OBSE, and loaded plug-ins. No idea if that's possible.
I'm currently using a custom list that was created using OBSE's DumpDocs command (slightly modified to strip out the stuff I don't need). I did consider the possibility of parsing loaded CommandInfo objects but was unsure how to (not even sure if the struct is used by the engine or if its just glue). I've popped the question to scruggsy and am awaiting a reply.

Hmm, what about setting up inter-plugin messaging (the OBSE messaging API supports this) that allows plugin authors the ability to specify some kind of generic URL to which the function name could be appended to produce a link to the documentation? Like for OBSE commands, you could use http://obse.silverlock.org/obse_command_doc.html#, and then any function name appended to that will be the URL for the exact command in the Command Document? Or say, if I have NifScript's functions listed at http://cs.elderscrolls.com/constwiki/index.php/NifScript/ plus the function name, I could have a Message set up in NifScript to give that URL to your thing so that people could look up the documentation on NifScript functions. Could even work on people's personal web sites, provided they use a naming scheme that works as described...

EDIT: Haha auto-parser, haha. You win this time.
Already present (kind of - You can right click on any token in the script text and directly look it up on either the wiki or the OBSE command doc through the context menu. Command doc linkage is the same as your suggestion. Wiki look up uses the search function).
User avatar
Marie
 
Posts: 3405
Joined: Thu Jun 29, 2006 12:05 am

Post » Mon Mar 14, 2011 6:24 pm

Search function is a good idea, but uh. The Search function's kind of notoriously bad. So I think it would be nice if plugin authors could 'cut out the middle man', so to speak, and just tell your tool where to find the information.
User avatar
Rhiannon Jones
 
Posts: 3423
Joined: Thu Sep 21, 2006 3:18 pm

Post » Mon Mar 14, 2011 6:58 pm

Search function is a good idea, but uh. The Search function's kind of notoriously bad. So I think it would be nice if plugin authors could 'cut out the middle man', so to speak, and just tell your tool where to find the information.
That's true. I guess I'll experiment with the messaging API then. But before I start, what do you think if using Google instead ? A simple site:cs.elderscrolls.com identifier in the search string can get us to use its prowess instead.
User avatar
Nick Pryce
 
Posts: 3386
Joined: Sat Jul 14, 2007 8:36 pm

Post » Mon Mar 14, 2011 4:38 pm

But then that just leaves you with a Search page, which is sort of less-than-helpful. Unless you can somehow trigger the I'm Feeling Lucky button that way? Of course, the chances of getting the wrong thing might be pretty high...
User avatar
Sweets Sweets
 
Posts: 3339
Joined: Tue Jun 13, 2006 3:26 am

PreviousNext

Return to IV - Oblivion