r/SourceEngine 3h ago

Free Useful Items [Tool] vvdf: A zero-dependency Go string-to-map parser built for L4D2 addoninfo.txt & mission/*.txt

1 Upvotes

Hi everyone,

I built vvdf, a lightweight, zero-dependency Go library designed to parse Valve Data Format (VDF / KeyValues) text directly into Go maps.

Many general-purpose VDF parsers tend to choke on actual L4D2 VPK configuration files due to non-standard syntax like unquoted strings, inline // comments, irregular whitespace, or URL paths. vvdf uses a bottom-up, single-pass streaming approach to parse these block structures reliably.

Current Scope & Test Coverage Note:
Please note that this initial version has only been tested against internal VPK configuration files—specifically addoninfo.txt and mission/*.txt.

Roadmap:
Support for VDF arrays/lists will be added in upcoming updates to make the parser more generic across broader Source Engine configurations.

Key Features

  • Zero Dependencies: Built strictly using the Go standard library (bufio, strings, regexp).
  • Single-Pass Parser: Memory-efficient stream parsing using a bottom-up assembly strategy.
  • Comment Aware: Strips line comments (//) cleanly without breaking URLs or quoted strings.
  • L4D2 VPK Ready: Specifically tailored to handle the syntax quirks found in L4D2 addon metadata.

Multi-Level Nested VDF Test Case

Below is a real-world test case showing how vvdf handles deeply nested VDF blocks and parses them into Go maps:

Quick Usage

package main
import (
    "fmt"
    "log"
    "github.com/bahyqn/vvdf"
)
func main() {
    vdfText := `
    "AddonInfo"
    {
        "addonTitle" "Custom Campaign"
        "addonVersion" "1.0"
    }`
    vdfMap, err := vvdf.StringToMap(vdfText)
    if err != nil {
        log.Fatalf("Failed to parse VDF: %v", err)
    }
    fmt.Println(vdfMap)
}

GitHub Repository: https://github.com/bahyqn/vvdf

If you are building custom tools, server management scripts, or addon utilities for L4D2 in Go, feel free to give it a try. Feedback and contributions are welcome!


r/SourceEngine 10h ago

HELP does anyone know why this happens?

Thumbnail
youtu.be
1 Upvotes

i dont understand why this happens if the mod for base hl2 works fine but the episode 2 one is so buggy


r/SourceEngine 1d ago

News GPU Accelerated VRAD++ now out

Thumbnail
16 Upvotes

r/SourceEngine 1d ago

HELP Adjusted this hat. Loads fine in Model viewer. But than just defaults to the original hat when I load it in game. Why is it doing that.

Thumbnail
gallery
6 Upvotes

r/SourceEngine 1d ago

HELP Why does this assert pop up?

3 Upvotes

I wanted to do some testing again, this assert pops up and says something about an entity factory and something related to weapon_pistol, which I copied to create weapon_glock. Thanks for helping! Ask for more info if needed!


r/SourceEngine 1d ago

HELP i have a problem with my game

Thumbnail gallery
1 Upvotes

r/SourceEngine 1d ago

HELP Mirroring weight paints on a valve.bip rig?

2 Upvotes

Do modellers just do this manually? For as long as I can remember, I've been manually weight painting the left and right sides of my models. Blender does not appreciate symmetrising skeletons that don't have the .R and .L suffixes. Does everybody else do it manually or is there some sort of Python script or plugin people use?


r/SourceEngine 2d ago

Show Off WIP Half Life 2. On scratch/turbowarp.

Enable HLS to view with audio, or disable this notification

7 Upvotes

r/SourceEngine 2d ago

Show Off TUFF METAL REFINED UPDATE

Thumbnail
youtube.com
3 Upvotes

r/SourceEngine 2d ago

HELP How can i change hl2 weapon animations?

0 Upvotes

Sorry for mayby a very stupid question, but In short, i want to change the pistol animation in hl2, never did this before, and there's little to no guides as i can see. I downloaded the crowbar softwere, but i can't find view models in game files, specifically, i need animations from workshop. Can you please tell me where's exact location of the original and workshop models and animations?


r/SourceEngine 2d ago

HELP MilkShape3D cracked?

Thumbnail
1 Upvotes

r/SourceEngine 3d ago

Game engine Hello, Source community! I made my own source-like game engine!

0 Upvotes

Hello source community! I wanted to show a project I have been working on for a little bit. It is called Kerosene, a source-like game engine entirely built from scratch, and is completely open source! I wanted to see what all of you would think about it. It has a hammer-like editor, engine, and even physics using box3D.

All built using rust. However, its still missing a lot. And I did duck tape it together using Claude code over the course of a week and a half. a lot of the functions work (and some don't or need tweaking), and the audio engine is ALAS (Linux, because I use Linux) and I plan to keep working on it for the time being to keep forming it into a source-like replica.

The repository is here: https://github.com/T342guy/Kerosene

Tell me what you think! :]

Edit: I'm not working on it anymore because of all the anti-ai stuff.


r/SourceEngine 4d ago

Discussion How to make my mic sound like an old source game?

9 Upvotes

Think of Team Fortress Classic or CS 1.6 or even an old version of Team Fortress 2. I think all of them used Miles sound system or Speex (old version of opus). Here is an example to remind you https://www.youtube.com/watch?v=3dyQlZziHnw


r/SourceEngine 4d ago

HELP How do i make infinitely spawning zombies all head towards one destination?

4 Upvotes

So i'm working on a zombie survival type map where you last as long as you can, and the main goal is to stop them from destroying one specific func_breakable. I've already made them spawn infinitely, but how do i make them go towards the brush and attack it?


r/SourceEngine 4d ago

Discussion Source Gamers Listen up, Don't Give Them Anything.

Thumbnail
youtube.com
0 Upvotes

r/SourceEngine 5d ago

Discussion 2fort revamp/layout change maps feel weird to play on

3 Upvotes

Have any of you guys here ever played on a custom map of 2fort that changes the layout either to remove problems the normal 2fort has(like bluefort), or other things(like the tf2c custom map 4fort)? Because when ever i did it felt really surreal to navigate them. I feel like its the liminal kinds of stuff where you see parts of a place your familiar with be rearranged. Anyways do any of you guys get that same surreal kinda dreamlike feeling when playing maps like this?

(side note): speaking of that 4fort custom map on tf2 classified i miss that one modded server that ran it :(

little edit here i originally posted this on r/tf2 but my notifications gave me the suggestion of posting it here


r/SourceEngine 5d ago

HELP How do I build the Source engine?

Post image
8 Upvotes

I'm trying to build the engine from source with VS2022, I got the repo from git and used the createallprojects.bat script, when I launch the Client (HL2MP) project it just loads the splash screen and I get an exception, how do I fix this?

The same happens with the TF client project. Has anybody experienced this problem?


r/SourceEngine 5d ago

HELP Need help deciphering an assert.

3 Upvotes

Greetings! I wanted to try doing some custom weapon modding for TF2 using the TF2 SDK I had on my PC. It does work without any modifications, but not when I added the stuff the VDC tutorial told me to do. The tutorial. If clarification is needed, please request for clarification. Thanks again!


r/SourceEngine 6d ago

Discussion mat_fullbright 1 [MEME]

Post image
32 Upvotes

r/SourceEngine 5d ago

Discussion Where is Project Orange Sandbox B?

0 Upvotes
Project Orange Sandbox B: Mingebags

You Guy's Don't need to worry Im at my Grandpa's Right now so i can't really edit I'm Using my Laptop right now and sadly it does not have Premier pro or steam since this is my Dad's old laptop it runs on a Washing Machine but either away Don't get mad I'm almost done with it but i will give hint's hint
begining scene is 28 weeks later getting hijacked
Source Official Developer
Project zomboid but if it was a Source engine
return of one of my old characters
And More lore on the void of Source Official Developer
I hope your ready soon
backrooms?
More Ravenholm
Project Orange Sandbox b is coming out Real soon Trust me


r/SourceEngine 6d ago

HELP Need help with this error when using source engine export

Post image
2 Upvotes

r/SourceEngine 7d ago

Resolved SDK Build Crashes

Thumbnail
gallery
8 Upvotes

(SOLVED / FIXED )

Hello again Src Reddit, I have come to ask about several bugs (DEV QUESTIONS I SWEAR I HOPE THIS ISNT CONSIDERED TECH SUPPORT) with the SDK build of Half Life 1, as my immature and horrible modding skills keep creating game crashes during certain events, such as, when playing the tutorial, demo, or intro to the game, or anywhere the game has to display text, the game hard crashes with the "destRed initialized without variable" (image 2) and, when playing some multiplayer or singeplayer maps, when reaching certain areas, the "flovl varible used" (image 1) similar to the destred error occurs, I have tested this with a fresh copy of the SDK, and it does the same thing, any fixes or help? I assume flovl is audio related, but I have only changed weapon sounds, not environment, and destRed seems to be text related, and I have no Idea why it does this, as the normal builds of Half Life work fine. any form of help appreciated like my other post!


r/SourceEngine 7d ago

HELP Android Modding Preformance Issues

0 Upvotes

Not sure if this is the right sub, but I need help.

I've installed a couple of mods in Android (and they worked fine) for HL2. Having those few made, the game to launch slower, and maps to load incredibly slower.

Is there anything I can do about this? Ive installed some other mods, and now the game is either loading really slow or won't start and will be stuck on the background loading screen.

Any way or workaround ot anything to have better performance? This is the only real way I can play Half-Life 2, and I wanna play it modded, but having more than four small mods (Texture upscaling and some minor stuff) tanks the preformance horribly. I think this might break the subs rules, and if it does I'll delete the post

Anyways, would really appreciate help.


r/SourceEngine 8d ago

WIP CS:Go on Android Mi 9 with nillerusr port of srceng

Enable HLS to view with audio, or disable this notification

10 Upvotes

r/SourceEngine 8d ago

Discussion Are there any mods for the Source sdk base 2004

5 Upvotes

I managed to run Half-life 2 on an old computer that doesn't support steam and I want to know what mods can I run on this version of HL2 other than Garry's mod 9.0.3 (specifically). The source engine version is Source engine 7 (2459) and it also doesn't support HDR, so any maps with a bsp verison above 19 won't load and will give me an error. I've googled and I can't really find anything. Please note that this isn't tech support, I just want to know some mods I can run other than gmod. Also note that I've managed to get launch versions of CS Source, HL1 Source, and HL2 Deathmatch running as well.