Add Source Engine formats (.vcd, .cfg, .fgd, .vmf, .vmt, .qc) #5413
Conversation
|
A 114K line file is too much for a sample (mapbase_demo01) |
Replaced with instance_tutorial_button from maplabstemplate content (325 lines) 18dafeb |
|
I feel like these should all just be added as new extensions to the VDF entry since they're not a different language. Though, Linguist does sometimes differentiate between different uses of the same language, but not sure if that's the best option here as there are quite a few. |
This reverts commit b939aa7.
|
I don't think the Valve CFG file should be added as .cfg is an already generic format used for many things. |
| extensions: | ||
| - ".vdf" | ||
| - ".cfg" |
Nixinova
Jun 9, 2021
Contributor
Is .cfg actually VDF? From the sample it looks like it is just a list of commands and not actually VDF.
Is .cfg actually VDF? From the sample it looks like it is just a list of commands and not actually VDF.
moofemp
Jun 9, 2021
•
Author
Just made the last couple commits when I saw the suggestion to... without seeing the edits, or thoroughly considering it myself, oops.
I don't believe CFG is the same as VDF, as it doesn't use the same sort of object/keyvalues structure that's seen in the other VDF style formats. CFG is essentially a batchfile for the Source Engine's console; in my experience it's usually used for custom keybindings and optimisation settings.
Just made the last couple commits when I saw the suggestion to... without seeing the edits, or thoroughly considering it myself, oops.
I don't believe CFG is the same as VDF, as it doesn't use the same sort of object/keyvalues structure that's seen in the other VDF style formats. CFG is essentially a batchfile for the Source Engine's console; in my experience it's usually used for custom keybindings and optimisation settings.
lildude
Jun 9, 2021
Member
This is a very generic extension that will clash and cause a lot of misidentification. To prevent this, you will need to identify a lot more users of it and add support for all the most popular users of this extension as part of this PR.
This is a very generic extension that will clash and cause a lot of misidentification. To prevent this, you will need to identify a lot more users of it and add support for all the most popular users of this extension as part of this PR.
moofemp
Jun 12, 2021
Author
This sounds like far more work than it's worth to include a relatively unimportant extension among the other Source Engine languages, so I've reverted this commit a965690
This sounds like far more work than it's worth to include a relatively unimportant extension among the other Source Engine languages, so I've reverted this commit a965690
It seems to me that's what the These formats aren't interchangeable though; a VMT and QC file for example are distinguishable at a glance due to the differing structure and keywords. |
Group is for variants of a language, like JSX for JavaScript. So if there are indeed differences in the language format then it may be warranted but if it's just a different extension for VDF it should go under it. |
I'm not quite sure what quantifies being "a different extension for VDF" - the syntax for each is the same, but the use case, structure, and library of keywords differ. It's worth mentioning that the Notepad++ VDF plugins I linked have separate languages for CFG, FGD, VMT, QC, and "misc VDF" (likely because VCD and VMF aren't usually edited in a plaintext editor). I would consider each one a distinct child of VDF. |
I think if that's the case having child languages would fit. |
I'm not going to even try reviewing this whilst we have samples under this licence. We can not accept any files covered by such a licence. |
Oh wait. NM, I forgot we don’t ship the full samples. Ignore this.
…ata Format" This reverts commit 6d9290d.


Add six Source Engine formats which are part of Valve Data Format (.vdf):
Valve Choreography Data (.vcd), Valve Configuration File (.cfg), Valve Hammer Definition File (.fgd), Valve Map Format (.vmf), Valve Material Type (.vmt), Valve Model Source (.qc)
Description
Relevant about Valve/Source Engine data types: https://developer.valvesoftware.com/wiki/Notepad%2B%2B_VDF_languages
which links to grammars for Notepad++: https://github.com/ReverendV92/NotepadPP-VDF-Languages
Out of these formats:
VCD files are usually made with FacePoser and VMF files are usually made with Hammer, though both are plaintext and can be written with a text editor
CFG, FGD, VMT, and QC files are usually written with a text editor
I used the official Source Engine branding colour for Valve Map File and created my own colour scheme for the rest: https://moofemp.com/image/source-colour-scheme.png
Checklist: