[discussion] Cs Script Editor Wish List

Post » Mon Mar 14, 2011 7:22 pm

The script editor that's packaged with the TES4 Construction Set falls behind greatly when it comes to offering intuitive features. What features would you folks like to see in it ?

In case you were wondering why I've brought this up, let me explain - I'm working on a replacement to the vanilla script editor and would like to know what features the scripting community would be interested in. Here's the POC video - http://www.youtube.com/watch?v=s3uGs6Nhmpc .

Implemented features:
  • Auto indentation
  • Search and Replace
  • Improved error detection and script validation
  • Better integration with the CS wiki
  • Comment toggling
  • Batch Indenting
  • Persistent fonts
  • Dump to/load from text files
  • Counter-intuitive shortcut keys
  • Preprocessor directives
  • IntelliSense
  • Bookmarks
  • Plugin interop
  • Code offset viewer
And some minor features.

Planned features:
  • RegEx support

User avatar
Jenna Fields
 
Posts: 3396
Joined: Mon Dec 11, 2006 11:36 am

Post » Mon Mar 14, 2011 6:49 pm

A way to testrun the script or multiple scripts that displays output variables if input variables are defined... But mostly just to work on/streamline scripts that make use of multi-level menu blocks without having to bounce back and forth between the game and the CS... Knowing detailed outputs or results would also be neat though.

You said it was a wish list afterall.
User avatar
Damian Parsons
 
Posts: 3375
Joined: Wed Nov 07, 2007 6:48 am

Post » Mon Mar 14, 2011 6:48 pm

A way to testrun the script or multiple scripts that displays output variables if input variables are defined... But mostly just to work on/streamline scripts that make use of multi-level menu blocks without having to bounce back and forth between the game and the CS... Knowing detailed outputs or results would also be neat though.

You said it was a wish list afterall.
Heh, my mistake. What you ask for isn't possible as the script processing procedures are only found in the game code; the CS only comes with script compiler.
User avatar
QuinDINGDONGcey
 
Posts: 3369
Joined: Mon Jul 23, 2007 4:11 pm

Post » Mon Mar 14, 2011 11:10 pm

Great news :)
I wonder if this will work with my scripts - I am preparing an update to my CS_Hotkeys adding shortcuts for the "Select Form" window (Enter basically lol) and a couple of easy ones, like next/previous script etc - based on the class of controls these windows are.
Btw - I am lately at a script writing phase - and I work exclusively on notepad++ using http://tesnexus.com/downloads/file.php?id=23057 (which are also the most recent AFAIK). Try them out, nice looking, may give you ideas - for the moment I am using the CS only to compile my scripts - if you could make it into a npp clone - that would be admirable.
Cheerio :1146:
User avatar
STEVI INQUE
 
Posts: 3441
Joined: Thu Nov 02, 2006 8:19 pm

Post » Tue Mar 15, 2011 3:15 am

Great news :)
I wonder if this will work with my scripts - I am preparing an update to my CS_Hotkeys adding shortcuts for the "Select Form" window (Enter basically lol) and a couple of easy ones, like next/previous script etc - based on the class of controls these windows are.
Technically, I'm not replacing anything - The vanilla editor actually runs in the background. The new editor is instantiated through my hooks in the editor's window procedure. I'm not sure how AutoScript works, but your shortcuts will be incompatible with my hooks if they aren't processed by the editor's procedure.
User avatar
Julia Schwalbe
 
Posts: 3557
Joined: Wed Apr 11, 2007 3:02 pm

Post » Mon Mar 14, 2011 6:01 pm

A database of script commands that can be searched by function would be nice, espescially for newer modders not well versed in the scripting language yet. (me included lol).

Is there one already?
User avatar
Lucky Girl
 
Posts: 3486
Joined: Wed Jun 06, 2007 4:14 pm

Post » Tue Mar 15, 2011 12:08 am

A database of script commands that can be searched by function would be nice, espescially for newer modders not well versed in the scripting language yet. (me included lol).

Is there one already?
The context menu will let you search the CS wiki for any keyword you'd like. For instance, you can right click on a function and look up on the CS wiki through the menu that pops up.
User avatar
Courtney Foren
 
Posts: 3418
Joined: Sun Mar 11, 2007 6:49 am

Post » Mon Mar 14, 2011 3:52 pm

Technically, I'm not replacing anything - The vanilla editor actually runs in the background. The new editor is instantiated through my hooks in the editor's window procedure. I'm not sure how AutoScript works, but your shortcuts will be incompatible with my hooks if they aren't processed by the editor's procedure.
Great - I think it will be fine
I think - I don't know much about hooks - and that's why my scripts are still in beta. Still Autohotkey - a very powerful language, despite its name :D - works via windows classes in my implementation - I guess if the classes are the same (#32770 basically) - all is fine.
I am getting impatient to test this one, I know.
User avatar
^_^
 
Posts: 3394
Joined: Thu May 31, 2007 12:01 am

Post » Mon Mar 14, 2011 9:55 pm

Great - I think it will be fine
I think - I don't know much about hooks - and that's why my scripts are still in beta. Still Autohotkey - a very powerful language, despite its name :D - works via windows classes in my implementation - I guess if the classes are the same (#32770 basically) - all is fine.
I am getting impatient to test this one, I know.
#32770 seems to point to the standard Win32 dialog class - Not sure if that will suffice for the new editor. You can see if it works with forms - Try your method on OBMM. If it works there, it should work here too.
User avatar
Michelle Smith
 
Posts: 3417
Joined: Wed Nov 15, 2006 2:03 am

Post » Tue Mar 15, 2011 5:13 am

The context menu will let you search the CS wiki for any keyword you'd like. For instance, you can right click on a function and look up on the CS wiki through the menu that pops up.


Cool
User avatar
Sammykins
 
Posts: 3330
Joined: Fri Jun 23, 2006 10:48 am

Post » Mon Mar 14, 2011 4:26 pm

#32770 seems to point to the standard Win32 dialog class - Not sure if that will suffice for the new editor. You can see if it works with forms - Try your method on OBMM. If it works there, it should work here too.
Hmmm - OBMM looks like WindowsForms10.Window.8.app.0.33c0d9d class.
Script edit wins are #32770.
Have to check this out.
User avatar
Hussnein Amin
 
Posts: 3557
Joined: Sun Aug 05, 2007 2:15 am

Post » Mon Mar 14, 2011 8:33 pm

Heh, my mistake. What you ask for isn't possible as the script processing procedures are only found in the game code; the CS only comes with script compiler.

What I meant was something more like just replicating it according to what the reported effects of the function are. The main purposes would be for things like menubox scripts, or scripts which contain a fairly excessive amount of math functions so that you can do a quick test run to make sure you didn't make a mistake somewhere.
User avatar
Shelby Huffman
 
Posts: 3454
Joined: Wed Aug 08, 2007 11:06 am

Post » Mon Mar 14, 2011 8:12 pm

Do you think you could add an auto-completion feature similar to http://i124.photobucket.com/albums/p10/Squirdle/AutoCompletion.jpg (can't find link to download). Its saved me from a lot of typing before.

Really looking forward to this being released :D
User avatar
barbara belmonte
 
Posts: 3528
Joined: Fri Apr 06, 2007 6:12 pm

Post » Mon Mar 14, 2011 7:03 pm

Do you think you could add an auto-completion feature similar to http://i124.photobucket.com/albums/p10/Squirdle/AutoCompletion.jpg (can't find link to download). Its saved me from a lot of typing before.

Really looking forward to this being released :D
Ah, auto-completion! Possible to add. Thanks for the suggestion.
User avatar
Lauren Dale
 
Posts: 3491
Joined: Tue Jul 04, 2006 8:57 am

Post » Tue Mar 15, 2011 5:03 am

ErgoEmacs shortcuts? :D
User avatar
Lexy Dick
 
Posts: 3459
Joined: Mon Feb 12, 2007 12:15 pm

Post » Mon Mar 14, 2011 8:33 pm

That's.....pretty cool. I'd love to see all the things in the OP in one single editor, instead of having to copy-paste all the time between Notepad++ and the cs. :glare: Just be sure to make the syntax highlighting configurable, I'm sure there are alot of different styles people would like to see.
User avatar
Amie Mccubbing
 
Posts: 3497
Joined: Thu Aug 31, 2006 11:33 pm

Post » Mon Mar 14, 2011 10:09 pm

ErgoEmacs shortcuts? :D
http://xahlee.org/emacs/ergonomic_emacs_keybinding.html ? :P


[snip]Just be sure to make the syntax highlighting configurable, I'm sure there are alot of different styles people would like to see.
In what way ? I'm not particularly feeling imaginative today.
User avatar
Laura Wilson
 
Posts: 3445
Joined: Thu Oct 05, 2006 3:57 pm

Post » Mon Mar 14, 2011 8:52 pm

http://xahlee.org/emacs/ergonomic_emacs_keybinding.html ? :P

Like those. :)


In what way ? I'm not particularly feeling imaginative today.

An xml file with the color values?
User avatar
Maya Maya
 
Posts: 3511
Joined: Wed Jul 05, 2006 7:35 pm

Post » Tue Mar 15, 2011 4:40 am

Like those. :)
Waityouwerentjoking ... :o

Will do.

An xml file with the color values?
The plugin's already setup to use an INI - That should be usable enough.
User avatar
Ben sutton
 
Posts: 3427
Joined: Sun Jun 10, 2007 4:01 am

Post » Mon Mar 14, 2011 3:51 pm

Wasntjokingbutwasntexpectingthiseither:

Will do.


Don't make it a priority, I haven't modded in ages.
User avatar
sam
 
Posts: 3386
Joined: Sat Jan 27, 2007 2:44 pm

Post » Tue Mar 15, 2011 3:45 am

[1] A way to persist the chosen font to the next load of the CS.


[2] A save/load scripts to/from text files. Useful not only as a backup, but also as an easy way to replicate scripts from one esp to another.

With the increasing use of User Functions, a modder tends to create his/her own 'library' of generic functions used in several of his/her mods (at least, I do). It is becoming kind of hard to keep track of which mod uses which function. Sometimes I need a function I know I have somewhere and I have to open 2-3 other esps in order to find it. Other times I find a bug or improve a function and need to update it in other mods.

With save and load functions, I could just save the code whenever I create/update it and, later, while working on a different mod. I could load/refresh the last version of the function from the file.

Which leads to the next suggestion: a way to batch-load scripts from text files, either by selecting a folder or multiple files at once. Each file in that folder or selection would become a new/updated script in the esp.
Batch-save could be useful also.


[3] Some kind of cross-reference for scripts/variables/objects. Actually 'Find Text' covers this pretty well (finding which scripts use which scripts/variables/objects). I am only raising the subject so, maybe, somebody could think of a good suggestion for you in this area.

The only function in this area I can think about is a 'Find Orphans' kind of functions that would point out unused scripts/objects/etc. Good for the mod clean up phase.


Just ignore any of the above if it is not within the scope of your project.
User avatar
Alisha Clarke
 
Posts: 3461
Joined: Tue Jan 16, 2007 2:53 am

Post » Mon Mar 14, 2011 6:00 pm

[1] A way to persist the chosen font to the next load of the CS.
Already present.

[2] A save/load scripts to/from text files. Useful not only as a backup, but also as an easy way to replicate scripts from one esp to another.

With the increasing use of User Functions, a modder tends to create his/her own 'library' of generic functions used in several of his/her mods (at least, I do). It is becoming kind of hard to keep track of which mod uses which function. Sometimes I need a function I know I have somewhere and I have to open 2-3 other esps in order to find it. Other times I find a bug or improve a function and need to update it in other mods.

With save and load functions, I could just save the code whenever I create/update it and, later, while working on a different mod. I could load/refresh the last version of the function from the file.
Sounds like a good idea. Will add.

Which leads to the next suggestion: a way to batch-load scripts from text files, either by selecting a folder or multiple files at once. Each file in that folder or selection would become a new/updated script in the esp.
Batch-save could be useful also.
I currently don't have any access to the scripts in the loaded plugin, so I can't really look up the script table. But it might be possible once I've decoded the appropriate classes and procedures. Batch load is mostly possible at the moment, but will require some more work. I'll think about it.

[3] Some kind of cross-reference for scripts/variables/objects. Actually 'Find Text' covers this pretty well (finding which scripts use which scripts/variables/objects). I am only raising the subject so, maybe, somebody could think of a good suggestion for you in this area.

The only function in this area I can think about is a 'Find Orphans' kind of functions that would point out unused scripts/objects/etc. Good for the mod clean up phase.
The script validator mentions unreferenced/unused variables in the script as it is. When you say objects, what exactly do you mean ?

On the same vein, here are the errors that the validator currently handles:
  • Script already has a ScriptName declaration
  • ondition not allowed (applied to lines starting with "Return", "End", "else" and "endif"
  • Multiple editorIDs (applied to ScriptName declarations)
  • EditorID starts with a number
  • EditorID contains invalid character (applied to ScriptName declarations. The compiler will truncate the editorID just before the invalid character)
  • EditorID starts with a number (applied to "set" commands with remote variables. The compiler will say that it can't find the variable, whereas the error is due to the editorID starting with a number)
  • Variable declaration invalid within Begin/End block
  • Variable "varName" has already been declared
  • The validator will also give a warning if a variable is declared but not used, and if a condition appears on its own line (therefore having no use). All other warnings and errors should be caught by the compiler already.
  • Blocktype invalid for this type of script (CS catches this when reference-specific blocktypes are used for quest scripts, but not when effect-only blocktypes are used in non-effect scripts)
This list was procured from Cipsic's ScriptValidator; the CS isn't any different from the GECK in that regard. Are there any other (unhandled) errors you guys what handled ?
User avatar
Rachie Stout
 
Posts: 3480
Joined: Sun Jun 25, 2006 2:19 pm

Post » Mon Mar 14, 2011 3:14 pm

Script save/load would be the most useful from the things I suggested.

Batch save and load are not as important, more like a convenience for when starting a new esp (batch-load) or when
closing the CS for the day (batch-save).

The 'Orphan' part was just a brainstorm from the batch-load idea. Like batch-loading everything you've got when starting a new project and, at the end of the project, use the orphan tool to identify/remove the functions you have not used. An even less important convenience. Can accomplish the same thing using the Find Text tool for 5 minutes. Better invest your time and efforts in other things.

I was thinking about Identifying objects created but not used. Which is clearly out-of-scope here. I am afraid I left my mind wander too far.


I will keep an eye for error checkings to suggest.
User avatar
STEVI INQUE
 
Posts: 3441
Joined: Thu Nov 02, 2006 8:19 pm

Post » Mon Mar 14, 2011 11:08 pm

Thanks. Just an off-note, the script editor can be accessed through Windows' window manager, i.e., you can Alt+Tab switch b'ween editors.

[offtopic]I just had a near death experience a few minutes ago, when I accidentally a source file that contained over 1300 lines of code. Thankfully, VS "permanently" deletes files by moving them to the recycle bin. But the five minutes I spent looking for it were the most harrowing yet.[/offtopic]
User avatar
Lew.p
 
Posts: 3430
Joined: Thu Jun 07, 2007 5:31 pm

Post » Mon Mar 14, 2011 8:19 pm

Thought I'd post a progress screenshot. As you can probably tell, the syntax highlighter is http://i659.photobucket.com/albums/uu320/shademe/Untitled-45.jpg. The editor now has every one of the features listed in the OP and then a few. I'll hopefully be able to release a beta build once I fix the color parser and integrate scruggsy's code offset viewer.
User avatar
Betsy Humpledink
 
Posts: 3443
Joined: Wed Jun 28, 2006 11:56 am

Next

Return to IV - Oblivion