Instancing - Hammer style

Recently Valve added the instancing feature set to hammer. What it basically allows you to do is have a vmf inside your map. This can be used in many ways: Easy copying of doors. Changing all instances of some copied brush. Distributed mapping. Etc…

What I wonder is the bugs of the instancing system. vbsp seems to ignore func_instances and hammer’s collapse even warns that it might be buggy.
Is it just me or this whole thing doesn’t really want to work?

Here’s what I do when I want to compile my map:
1. load map.
(1.1) Select random objects to generate undo history (handy when you have modified the map and got lots of instances)
1.5 Texture lock on (otherwise the textures get displaced in instances)
2. instancing->collapse all
3. Save
4. undo changes (this is where the random object selection comes in handy. You can just hold the undo button until all instance collapses have been undoed and still not undo your changes that you might have made)
5. Start compiling
6. Wait for vbsp to finish (I’m using vbct for compiling so hammer doesn’t freeze)
7. Save (vbsp is the only thing that reads the vmf)
**8. **Keep “enjoying” the benefits of instancing

As you can see the way I do it is very prone to errors and generally just dumb. Is there some magic switch that I have to flip to get vbsp process my func_instance entities or do I really have to keep doing this until valve notices the SDK is flawed?

I don’t think instances are fully implemented into the main branch of the Orange Box, only in L4D2.

Isn’t it only used in Alien Swarm?

Oh yeah I forgot about AS, it’s used in both games.

Both use the newer bsp version and vbsp. I wonder why did they then introduce that feature on orangebox hammer.

They were updating hammer to their most recent build, this is also why the version check appeared briefly until they removed that.

This is so late.

Python, you cannot compile func_instance with the orangebox vbsp. You just can’t. It doesn’t know what to do with it and just doesn’t compile. I’ve tried it with about 6 other people all at once just making random things.

Random people have insisted that it all worked for them but I have never seen anyone proving me that it did. Was just wondering if I was missing something obvious…

Hopefully they do add the instancing support though. It’s too damn handy.

What I did for the hell of it;
I set up a folder on dropbox where people would make .vmf files and every time they saved, it would be sent to me, and saved. So in my .vmf I added the func_instances into hammer. I would save, close, and open the .vmf again and the changes were there. It was pretty cool to watch. And it is a shame it doesn’t compile without you manually dragging and dropping stuff into the .vmf

I remember that only too well, you were telling us to do random things and half the time I didn’t know what I was doing. :confused:

Can someone explain to me what instancing even is?

It’s best not to bother with new features on anything valve makes due to their generally horribly buggy nature, and complete lack of internal idiot checks to disable the feature on games that don’t support them properly or at all.

I also personally think instancing is mostly useless because it increases the amount of work you have to do. If you make a structure and instance it in another map and have to change something, you can’t edit it directly and have to open up the VMF of the instanced structure and switch back and forth between maps to do the editing.

The only thing I can really see it being used for is for small creations like lights that you have a bunch of, but then again it’s redundant because you already have groups and prefabs. The same issue also arises as above, like if you have several instances of light types, you have to open them all up separately to edit them, resulting in massive wasted time switching between different maps.