PyVMF

Avatar
wrathofmobius
216 Posts
Posted Jan 03, 2013
PyVMF is a Python library for creating and editing VMF files. Features include:
-Writing to VMF files that can be opened by Hammer and compiled normally
-Creation of rectangular brushes, as well as certain entities
-Editing of keyvalues and spawnflags
-Entity I/O via a simple addOutput command
-Full documentation
-PyPI integration

Currently (as of v1.0.0) you can create these entities:
-func_instance
-light
-logic_auto
-logic_relay
-prop_floor_button
-trigger_multiple

Entities to be added soon:
-info_player_start (Done and in v1.1.0)
-weapon_portalgun (Done and in v1.1.0)
-prop_weighted_cube (Done and in v1.1.0)
-prop_testchamber_door

Suggest others that you would like to see in the next release!

PyVMF is NOT a replacement for Hammer, nor a fully-fledged editing program. PyVMF is a framework for other programmers to work on to create generators (like the Wall Tile Randomizer) or much, much more.

Also, as this is a first release, there may be some bugs. Please let me know of any issues or suggestions you may have.

Installation and usage instructions are on the download page.

Click here to download PyVMF

Advertisement
Registered users don't see ads! Register now!
Avatar
Gemarakup
1,183 Posts
Posted Jan 04, 2013
Replied 4 hours later
Is it basically an additional vmf editor with a different GUI or different way of using it?
Avatar
FelixGriffin
2,680 Posts
Posted Jan 04, 2013
Replied 7 hours later
No, it's a library for Python programs to use. It's sort of like a small program to read and write to VMF files that requires another program to tell it what to write, since it's hard to teach a computer to use Hammer.
Avatar
wrathofmobius
216 Posts
Posted Jan 04, 2013
Replied 18 minutes later

Quote:
PyVMF is NOT a replacement for Hammer, nor a fully-fledged editing program.

Avatar
BenVlodgi
633 Posts
Posted Mar 29, 2013
Replied 2 months later
very interesting, I should try out python, however I litterally just wrote a C# program which parses vmfs into trees for manipulation, and then collapses is back down.. its purpse is for doing more things with the PTI.

I see you only have a few classes implemented, couldn't you generate types based off of the FGDs?

Advertisement
Registered users don't see ads! Register now!
Avatar
wrathofmobius
216 Posts
Posted Apr 26, 2013
Replied 28 days later
Sorry to bump the > 1 month thread, but I was away for about that long and figured I should get the answer down for the record.

Yes, I totally could generate from the FGD, that thought never crossed my mind. When I get a spare moment I will almost definitely look into this. However, I may still want to "manually" implement a few classes so it can sanitize inputs, etc. That would also be nice for future versions of the SDK: instead of waiting on me to rerelease you could just use the new FGD. I'll see how it goes. Hopefully in the next version there'll be that plus the ability to parse existing maps (no promises though)

Edit: Progress time! FGD parsing might be a bit advanced for the next version but I think I've got a simpler idea that will work just as well. I'll give it a go and see how it works. VMF parsing is still in the running though, I'll see if I can find a simple-ish way to do it. There is also now a compiler (well, a compile tool runner) and a room generator. Any other features?