Skip to content

Add the Valve Map Format (VMF)#7985

Open
meowcat767 wants to merge 8 commits into
github-linguist:mainfrom
meowcat767:main
Open

Add the Valve Map Format (VMF)#7985
meowcat767 wants to merge 8 commits into
github-linguist:mainfrom
meowcat767:main

Conversation

@meowcat767
Copy link
Copy Markdown

@meowcat767 meowcat767 commented May 27, 2026

Description

The Valve Map Format (VMF) is a data language used for Valve Source engine maps created in the Hammer Editor. It stores map geometry, brush data, and entity properties.

Checklist:

  • I am adding a new language.
    • The extension of the new language is used in hundreds of repositories on GitHub.com.
    • I have included a real-world usage sample for all extensions added in this PR:
      • Sample source(s):
        • Internal sample created from standard Valve SDK map layout.
      • Sample license(s):
        • MIT / Public Domain
    • I have included a syntax highlighting grammar: https://github.com/meowcat767/vmf-grammar
    • I have added a color
      • Hex value: #f79a10
      • Rationale: This is the iconic orange brand color globally associated with the Source engine.

@meowcat767 meowcat767 requested a review from a team as a code owner May 27, 2026 18:56
Copy link
Copy Markdown
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is incomplete. You have not followed all of the instructions in the CONTRIBUTING.md file.

We also can not accept this grammar either as it doesn't have a licence. We can only accept grammars with one of the licenses linked in the CONTRIBUTING.md file.

@meowcat767
Copy link
Copy Markdown
Author

I have added a license (MIT) to the grammar, but please let me know what I have not followed in the CONTRIBUTING.MD as I am confused on that!

Copy link
Copy Markdown
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've also just noticed your samples a huge! If they suppressed in the diff, they're too big. Please replace them with smaller, real world samples.

Comment thread grammars.yml
vendor/grammars/verilog.tmbundle:
- source.verilog
vendor/grammars/vmf-grammar:
- source.keyvalues
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your grammar is very new. You should make this more specific as this is very generic and very likely to conflict with a grammar that really deals with legitimate key/value data which your samples don't seem to do.

@lildude
Copy link
Copy Markdown
Member

lildude commented May 27, 2026

I have added a license (MIT) to the grammar, but please let me know what I have not followed in the CONTRIBUTING.MD as I am confused on that!

You've not generated the language ID as per step 4. You will also need to re-add your grammar to pull in the licence (see the instructions for replacing a grammar and replace your grammar with the same URL).

@meowcat767
Copy link
Copy Markdown
Author

I've also just noticed your samples a huge

Yeah, VMF files are reasonably large. I can make smaller ones, but they won't reflect real maps in real projects.

I'm currently fixing the problems with the grammar and will also re-gen the IDs.

@lildude
Copy link
Copy Markdown
Member

lildude commented May 27, 2026

I've just noticed we've already got a "Valve Data Format". How does this differ from a syntax perspective? Would this be better suited as adding this extension to the existing language? It's a data format so won't appear in the stats by default and if it's identical syntax, it saves you having to maintain a grammar.

@meowcat767
Copy link
Copy Markdown
Author

meowcat767 commented May 27, 2026

Valve Data Format is used to store game related metadata. Valve Data Format files store information data for resources, installation scripts, configuration scripts, and visualization elements.

Valve Map Format files are the actual map source code used by Valve Hammer and VBSP, VVIS, and VRAD to turn the map into a BSP.

They have very different grammar, so using the VDF grammar would not be suitable for VMF.

@meowcat767
Copy link
Copy Markdown
Author

I have updated the IDs for VMF.

@meowcat767 meowcat767 requested a review from lildude May 28, 2026 14:51
Copy link
Copy Markdown
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've still not replaced the massive samples with smaller files nor re-added your grammar so that the license file can be cached.

@meowcat767
Copy link
Copy Markdown
Author

I have removed the large VMF and kept the small one (this still has the basics of a VMF).

I have cached my grammar license as well.

@meowcat767 meowcat767 requested a review from lildude May 28, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants