TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

2 pointsby Karsteski9 months ago
Hi, I&#x27;m a self-taught junior programmer and I&#x27;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&#x27;ve not found any parsers for this weird data format, so I figured I&#x27;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.<p>.vdata format:<p><pre><code> &lt;!-- kv3 encoding:text:version{e21c7f3c-8a33-41c5-9977-a76d3a32aa0d} format:generic:version{7412167c-06e9-4698-aff2-e63eb59037e7} --&gt; { key = &quot;value&quot; key = { key = &quot;value&quot; key2 = &quot;value2&quot; &quot;1&quot; = &quot;value&quot; } key_array = { [ 1, 2, 3, ] } }</code></pre>

1 comment

solardev9 months ago
Maybe <a href="https:&#x2F;&#x2F;github.com&#x2F;ValveResourceFormat&#x2F;ValveResourceFormat?tab=readme-ov-file">https:&#x2F;&#x2F;github.com&#x2F;ValveResourceFormat&#x2F;ValveResourceFormat?t...</a> ?<p>Maybe it&#x27;s the &quot;keyvalues3&quot; format. The test for it seems to be here: <a href="https:&#x2F;&#x2F;github.com&#x2F;ValveResourceFormat&#x2F;ValveResourceFormat&#x2F;blob&#x2F;master&#x2F;Tests&#x2F;KeyValuesTest.cs">https:&#x2F;&#x2F;github.com&#x2F;ValveResourceFormat&#x2F;ValveResourceFormat&#x2F;b...</a>
评论 #41240491 未加载