Prefabs

Avatar
zanthal
5 Posts
Posted Apr 29, 2011
Does VHE manage to extract prefabs from a current title?

I'm wondering where everyone gets their prefabs from, otherwise. I see them posted on an individual basis at the resources sites mentioned. Is there a basic Portal 2 prefab library that can be loaded into VHE?

Yes, I'm completely new to this, but I need to a pointer in the right direction so I can educate myself. :wink:

Advertisement
Registered users don’t see ads! Register now!
Avatar
msleeper
4,136 Posts
Admin
Posted Apr 29, 2011
Replied 10 minutes later
Generally there are a set of prefabs that come with the released SDK. Right now I am pretty sure that everyone is still figuring out how to use the game elements and building them by hand. Which, by the way, is a preferable method for someone new to Hammer so that you can actually learn how things work.
Avatar
Nacimota
345 Posts
Posted Apr 29, 2011
Replied 6 minutes later
Yeah I've already put together a few prefabs for recessed lighting and chamber doors
Avatar
zanthal
5 Posts
Posted Apr 29, 2011
Replied 22 minutes later
The new Portal 2 Source SDK isn't due out until this summer, or so I've read, which means that folks have been building these Portal 2 custom maps with the previous Source SDK, I presume
Avatar
msleeper
4,136 Posts
Admin
Posted Apr 29, 2011
Replied 3 minutes later
There has been no official statement on the SDK's exact release. People have been using the Alien Swarm SDK. There are a few threads around, take a look and it will get you started.
Avatar
Hober
1,180 Posts
Posted Apr 29, 2011
Replied 29 minutes later

zanthal wrote:
The new Portal 2 Source SDK isn't due out until this summer,

We should probably edit that thread title to remove the :baseless:

Avatar
msleeper
4,136 Posts
Admin
Posted Apr 29, 2011
Replied 12 minutes later
Yeah good idea. Also I added that as a real emote here.
Avatar
Dewin
43 Posts
Posted Apr 29, 2011
Replied 1 hour later
In many cases, the new instancing system based on func_instance, func_instance_io_proxy and func_instance_param is a superior alternative to prefabs. In fact, it's used extensively in the official Portal 2 maps.

func_instance basically is an editor-only entity that basically says "Insert this VMF here during compilation and apply a couple modifications". You can even have multiple people working on separate parts of the map at the same time using instancing. func_instance_param and func_instance_io_proxy are used in the child VMF to set parameters you can change.

Say you make a box dropper. You've put a couple in your map(s) and then someone finds some sort of logic error. With prefabs, you'd have to go find every place you've inserted it and fix the logic error. With instances, you just open Boxdropper.vmf, fix the error, and all of your maps will get the fixed version next time they're opened/recompiled.

There are a few drawbacks to instances however:
* They aren't as customizable as prefabs. You can't, for instance, retexture one copy of an instance to be different from other copies. (That said, you can have individual control over just about any entity property using func_instance_param)
* There's some Hammer-level weirdness with nesting instances, particularly in regards to func_instance_param. I expect this will be fixed soon enough however, and it may be something that you can work around. Additionally, the path to the inner instance is evaluated from the map's perspective on compilation, but from the instance's perspective in the editor. This is worked around by keeping all your instances in the same directory as your maps.

You can get around the first problem by splitting your instance into two parts. For instance, I have two instances for chamber exit doors: One is the actual door, logic and entities to open and close the door. The second is the door frame. If for some reason I want a new texture on the door frame, I just copy+modify the frame instance.

Avatar
zanthal
5 Posts
Posted Apr 29, 2011
Replied 1 hour later
Thanks for the helpful tips. :smile:

I'm still scratching my head, trying to understand that if you can edit maps for Portal 2 with Alien Swarm's Source SDK, then what other Source SDK's can you use that are compatible?

Avatar
Neoxx
48 Posts
Posted Apr 30, 2011
Replied 3 hours later
I'm almost thinking they used Alien Swarm to run this on because not many people use it, therefore most people wont mind modifying it to make it work with Portal 2. If they used a more popular one, say CS;S, many people wouldn't like it because it would interfere with them making CS:S maps.

But this is just :baseless: so feel free to ignore.

Avatar
msleeper
4,136 Posts
Admin
Posted Apr 30, 2011
Replied 8 minutes later
No that's not why they used Alien Swarm. Long story short, as the engine progresses, each new game is built "on top" of the last game. Alien Swarm's release version of Source was the most up to date verison (last I heard they were calling in Source 2009, AKA "Source 4").
Avatar
Nightgunner5
75 Posts
Posted Apr 30, 2011
Replied 8 hours later
I set up Portal 2 as a new game configuration in the Alien Swarm SDK. No messy extracting needed, and I can keep my Alien Swarm files separate from the Portal 2 files.
Avatar
zanthal
5 Posts
Posted Apr 30, 2011
Replied 3 hours later

Nightgunner5 wrote:
I set up Portal 2 as a new game configuration in the Alien Swarm SDK. No messy extracting needed, and I can keep my Alien Swarm files separate from the Portal 2 files.

Did you edit the Alien Swarm configuration? because there's no options to make a new game config from what I see.

I'm working off of this tutorial in order to get started:

http://www.facepunch.com/threads/108102 ... tal-2-maps

Avatar
Nightgunner5
75 Posts
Posted Apr 30, 2011
Replied 51 minutes later
In the Edit Game Configurations window, there's an Add button.
Advertisement
Registered users don’t see ads! Register now!
Avatar
zanthal
5 Posts
Posted Apr 30, 2011
Replied 3 hours later
Bah >.< obviousness fail