ScriptEditor - Vmt, QC, FGD, etc

Grab your favourite IDE and tinker with the innards of game engines

ScriptEditor - Vmt, QC, FGD, etc

Postby Garrador on Mon Feb 18, 2013 12:09 am

Hi!

I'm currently writing a WPF application that I thought I'd share with you all. It's still in early development, but I'm sure anyone else than just me can get some use for it. I will be publishing updates regularly, so expect it to extend fast :)

Page: http://www.oyvindandersson.net/ScriptEditor/


A short overview:

ScriptEditor is a Windows Presentation Foundation .NET application (WPF) using AvalonEdit .NET, which means that it will only run on the Windows platform. As much as I'd love to have it working on Linux and MacOS, that is sadly not an option at this point.

At this time of writing (17.02.2013), the ScriptEditor has working syntax highlighting for these types:


    -VMT Files (Valve Material Type)
    -QC Files (QuakeC Files - Valve model/smd intermediate script)
    -FGD Files (Forge Game Data File - Valve entity definitions for Hammer Editor)
    -XML Formatted files (Most XML formatted filetypes; .xml, .xaml, .html etc)
    -Generic files (.txt, etc)

However, the ScriptEditor app was made with specific scripts in mind, included but not limited to Valve's Source Engine type scripts.

For now, only VMT has a strong implementation of datacompletion (semi-intellisense) (See fig.2) and other supported features to ease development, and to correct as many errors as possible. The implementation is highly WIP at the moment, but as you will notice if you try it out, VMT is the language I'm implementing first.

Thus, I have only implemented very simple handling of XML documents, using AvalonEdit's as a base, but added auto-insertion for end-elements.

Interface
Image

Interface - collapsed toolbars
Image

Interface - code completion/hinting
Image


Anyways, it's there if need be!
Read the TODO's at the bottom of the homepage to read some near-future implementations.
Last edited by Garrador on Mon Feb 18, 2013 11:05 pm, edited 1 time in total.
You click on Build or type
make (or some equivalent), and you are astonished, then mortified, as you realize that the whole world is being
recompiled and relinked!
- Scott Meyers
User avatar
Garrador
Veteran
Veteran
 
Joined: Fri May 12, 2006 10:39 pm
Location: Norway

Re: ScriptEditor - Vmt, QC, FGD, etc

Postby zombie@computer on Mon Feb 18, 2013 6:15 pm

Though i in know way not appreciate a well coded tool, why would one use this over notepad++ with valve file syntax?
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: ScriptEditor - Vmt, QC, FGD, etc

Postby Garrador on Mon Feb 18, 2013 6:34 pm

I'm very aware of the notepad++ w/syntax, as I google it before ever starting =P But I wanted my own tool as a way of practice, plus I wanted some custom features that is not available in notepad++:

    -code completion,
    -cleaner interface,
    -project browser on the right hand side for quick-access to several files (I always hated browsing in WIN and opening the files I needed to change/fix)
    -and not yet but; syntax validator (error checking)

I also forgot to put this on the webpage and OP, but I want more integration with sourcemods/source, like enabling the user to select the project their working with (as is enabled now), but also to get codecompletion for paths to textures.

So when you start writing inside the quotes after a "path" type keyword (basetexture, bumpmap etc); the completion window pops up with available VTF files in the directory.

Of course, not in the WHOLE mod directory, but first folders show up, then when a folder is matched (or the user hits enter to autocomplete an entry), then the files will show up in the completion box instead.
That way, one can avoid typical spelling mistakes, and always get the name of the file, in case you forgot it while writing the VMT (I often do that when I write VMT's for WorldVertexTransition's)

The main reason for starting the project was to practice on C#/WPF and MVVM paradigm.

Anyways, thank you for the comment, and although I'm aware that most people would most likely use Notepad++, I thought I'd share it anyways. :P

Edit: Thank you though for pointing that out, as that reminded me to open the Notepad++ definition to find some shaders and keywords I know exist, but could not find them :P
You click on Build or type
make (or some equivalent), and you are astonished, then mortified, as you realize that the whole world is being
recompiled and relinked!
- Scott Meyers
User avatar
Garrador
Veteran
Veteran
 
Joined: Fri May 12, 2006 10:39 pm
Location: Norway

Re: ScriptEditor - Vmt, QC, FGD, etc

Postby zombie@computer on Mon Feb 18, 2013 10:30 pm

Fair enough. Practice and wasting time has most often been my biggest motivation for coding stuff, heh.

WPF looks very nice compared to winforms. It has many things i could've used in previous projects. Now i want to learn it as well. :)
When you are up to your neck in shit, keep your head up high
zombie@computer
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 31, 2004 5:58 pm
Location: Lent, Netherlands

Re: ScriptEditor - Vmt, QC, FGD, etc

Postby Garrador on Mon Feb 18, 2013 11:10 pm

Yeah, hehe ;)

Yeah compared to winforms it's a huge improvement. I have control over every visual aspect of the controls, which is quite nice, and neatly set up as XAML formatted templates.

I.e:

<Style x:Key="ToolbarToggleButton" TargetType="{x:Type ToggleButton}">
// Define all properties I want, that ToggleButton has, and give i.e Background a LinearGradientBrush instead of a solid color..

So yeah, you can do quite a lot, and bind properties to dependency properties in a code-behind class, preferably using the MVVM paradigm. So if you decide to get up and running with WPF, I strongly recommend getting used to MVVM at kickoff =P

Anyways, working on VMT syntax error handling atm. Getting a long quite nicely.
Also, if any decides to download it, I'd love some feedback and suggestions. They come in handy!
You click on Build or type
make (or some equivalent), and you are astonished, then mortified, as you realize that the whole world is being
recompiled and relinked!
- Scott Meyers
User avatar
Garrador
Veteran
Veteran
 
Joined: Fri May 12, 2006 10:39 pm
Location: Norway

Re: ScriptEditor - Vmt, QC, FGD, etc

Postby Garrador on Thu Feb 21, 2013 3:36 pm

Update:

Published a new update. Added support for a wide variety of VMT parameters, and shaders. Also added descriptions for parameters that pop up while selecting items from the completion window.
Currently working on context code validation.

Edit: Found a bug when entering VMT parameters. Fixing it
You click on Build or type
make (or some equivalent), and you are astonished, then mortified, as you realize that the whole world is being
recompiled and relinked!
- Scott Meyers
User avatar
Garrador
Veteran
Veteran
 
Joined: Fri May 12, 2006 10:39 pm
Location: Norway

Re: ScriptEditor - Vmt, QC, FGD, etc

Postby Garrador on Fri Feb 22, 2013 8:38 am

Update again:

Ok, for anyone using this, there was a problem with local resource files, so the definitions would not load on startup, causing it to crash.. heh, but it has been fixed now, and the newest version: v.1.0.17229.
To be sure the files save correctly, uninstall the previous version and redownload from http://www.oyvindandersson.net/ScriptEditor/about/

Edit: UPDATE

Now supports drag/drop files to open.
You click on Build or type
make (or some equivalent), and you are astonished, then mortified, as you realize that the whole world is being
recompiled and relinked!
- Scott Meyers
User avatar
Garrador
Veteran
Veteran
 
Joined: Fri May 12, 2006 10:39 pm
Location: Norway

Re: ScriptEditor - Vmt, QC, FGD, etc

Postby Garrador on Fri Feb 22, 2013 8:23 pm

Tad bigger update:

    Languages menu - New menu for changing language type (like Notepad++) Note: If the language has a specific syntax validator (i.e: VMT), then the validation will still persist, but the highlighting defintion is changed to whatever you choose in the menu

    Auto language recognition - Trying out a new feature, that tries to recognize the language in generic filetypes, and set the appropriate highliting accordingly (i.e: Open a source-engine weapon script)

    Search VDC context menu - In source engine related languages (Vmt, qc, fgd), a new menuitem in the context menu can be clicked to search the VDC wiki for the selected text in the editor. Example: Select a parameter you have written in, then right-click to open the context-menu, and select "Search VDC". That will do a search on the wiki, as long as you are connected to the internet, obviously.
You click on Build or type
make (or some equivalent), and you are astonished, then mortified, as you realize that the whole world is being
recompiled and relinked!
- Scott Meyers
User avatar
Garrador
Veteran
Veteran
 
Joined: Fri May 12, 2006 10:39 pm
Location: Norway

Return to Programming

Who is online

Users browsing this forum: No registered users