Source Filmmaker

Source Filmmaker

Not enough ratings
A Neat Add-on For NotePad ++ (Working with Valve Text Formatted Files)
By Pte Jack
This is a neat Add-on for Notepad ++ that will format Valve text formatted files, such as QCs, QCIs, VMTs, VDFs, SMDs and VTAs, etc giving them a more Program Language like look and make them much easier read when opened in Notepad ++.

The formatting breaks apart functions between opening and closing curly brackets and indents statements show they have what looks steps between functions.
   
Award
Favorite
Favorited
Unfavorite
What'chu talkin' bout Private?
When we want to edit a Valve Text type document for a model, when we open it in Notepad++ it opens like a normal Text file; everything is jumbled together line by line and the coding in the document can get pretty confusing as you follow it along.

For example If I open the Sniper_Red.VMT file in Notepad++, this format will look like this
Everything is mono-toned, looks the same and hard to distinguish different functions from command statements from variables and input values. It looks pretty bland and it's hard to track down what is what if you're trying to find an error you've made in your code.

However after installing the NotepadPP-VDF-Languages add-on written by ReverendV92, whenever I open one of the Valve files that are covered by the add-on, I'll get something like this.

Things like functions, command statements, variables and values are distinguishable. It's easier to tell just what is what and things look a lot clearer. Function names are one color, command statements another, input values yet another and may have different fonts or formatting as well.

When the add-on is installed properly, the following User Defined Languages will become available in the Language Menu option, each of these file loaded will be automatically be formatted in Notepad++ and the formatting will be based on particular type by filename extension that is opened.


It doesn't stop there, We can also apply these formats to other files we open. For example, this is a file we have all come to love to hate.
It's the SFM_DefaultAnimationGroups.txt file.
Many of us that pick up custom models find that all the bones and flexes for these models end up in the Unknown Control group in SFM and if we want to get them up into the known groups we have to edit this file.
Problem is with this file is it is a HUGE files, it is hierarchy based, we don't know what already exists in the file and a lot of the stuff we try to add doesn't go where we think it should end up when we start adding new control groups and controls to it.
With this add-on, we can apply one of the VDF Language formats to the TXT file that was opened.
Here I've applied the VDF: Material language to the SFM_DefaultAnimationGroups.txt.
  • We can now minimize the groups to see what the main groups are (to determine if we should use existing groups or where i should add the new controls),
  • We can expand main groups to see if sub groups already exist (like I expanded the face and fingers groups and found there are subgroups in the Face group (Full, Upper, Mid, Lower Face and Tongue), and the Fingers have left and right finger subgroups).
  • We can now expand them further and determine if we want to add the new controls to existing groups or create new ones or see if we are duplicating ones that already exists.
  • It is easier to see how new groups and commands are created and formatted, and
  • By expanding the "IGNORE" group we can quickly see what we should not be calling a group/control or why it is not showing up in SFM as a control.

For those of us that model, we can change the QC we're working on to the VDF: QC type and as we add the code, it is automatically formatted, making it easier to inspect and follow what it is we're writing.
Same for VMTs, Change the file we're working on to VDF:Material and away we go.
Everything is much clearer and easier to follow.
Obtaining and Installing the Add-on
If you want the add-on, all you have to do is go https://github.com/ReverendV92/NotepadPP-VDF-Languages, Click the Green Code Button and download the ZIP to somewhere you'll remember on your computer.

The file that comes down will be called NotepadPP-VDF-Languages-master.zip and before you start asking "IS IT SAFE?", here's my Virus Scan result of the download

Installing the Add-on

First you'll need a program that will open the ZIP file and I believe Windows does that natively now, if not you require a program like WinZip or WinRar. (I use WinRar)

Open the ZIP file and drill into the folders until you see the .MD and .XML files.

If you view the .MD file, it tells you where you have to extract the XML files to.

But for those of you who don't know where %appdata is, the path is usually

C:\users\<your_user_name>\AppData.

From there you need to go into the Roaming Folder and find NotePad++ and get into that folder.

Inside the Notepad++ folder there may or not be another folder called userDefineLangs in it, if it doesn't exist, create it and drill into it.

Extract the ZIP content into it.

Close Notepad++ (if it is opened) and relaunch it. Select the Language menu option and the User Defined languages should be available to you now.


That's it and Happy Formatting!!


Thanks, Credits and Kudos go out to Reverend Jesse Vanover (aka ReverendV92)
for providing this nifty and extremely handy little add-on!!!
and to Steam User
Hank Hill
for pointing it out to me!!
5 Comments
E7ajamy 31 Dec, 2020 @ 7:34am 
this is interesting. i am looking forward to use this while i am making a blender and source engine modding tutorial. i have been sticking with window's default notepad. now, it is the time to experience and use a different workflow, and imagine how it feels to use notepad++ as if you are coding. thank you Pte Jack :)
ghost of delete key 13 Nov, 2020 @ 8:08pm 
@Pte Jack: there's a very simple way to get to the folder to install user defined languages, it's right in menu Language > User Defined Language > Open User Defined Language folder...
https://prnt.sc/viy93u
It will open an Explorer window right there, for you to just drop the XML defs in, and bam! Done.:steamhappy:
Astral 25 Oct, 2020 @ 7:12pm 
This is actually very cool!
ave, true to kaiser 25 Oct, 2020 @ 5:08am 
This will make a nice addition to my work, thanks for letting me know about it!
Hank Hill 24 Oct, 2020 @ 1:26pm 
You're welcome. Keep up the good work!