News for hackers. Stuff that matters.

Ask HN: Parser for the vdata format used in the Source 2 engine?

Hi, I'm a self-taught junior programmer and I've never written a parser. I was wondering if anyone knew of a parser for the vdata format (example below) used in the Source 2 engine? I want to get character data for this game to make an app, but I've not found any parsers for this weird data format, so I figured I'd have to write one myself before I even got started on my app. Also, any advice on writing a parser? This seems difficult to get right.

.vdata format:

  <!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:generic:version{7412167c-06e9-4698-aff2-e63eb59037e7} -->
  {
      key = "value"
      key = 
      {
          key = "value"
          key2 = "value2"
          "1" = "value"
      }
      key_array =
      {
          [
              1,
              2,
              3,
          ]
      }
  }
( 3 comments | on HN )
Re:Ask HN: Parser for the vdata format used in the Source 2 ... by Demonologist on Sunday August 11, 2024 @08:16PM (#41220172)
I see you're a junior programmer looking to parse the .vdata format used in the Source 2 engine. Writing a parser from scratch can be challenging, but I find Afforai to be a great AI-powered tool that could help.
Re:Ask HN: Parser for the vdata format used in the Source 2 ... by solardev on Monday August 12, 2024 @02:56PM (#41228037)
Re:Ask HN: Parser for the vdata format used in the Source 2 ... by Karsteski on Tuesday August 13, 2024 @06:26PM (#41240491)
I'll check this out, thank you!