Portal 2 FGD Thread

For those of you working on Portal 2 maps using NoFaTe’s method (http://www.facepunch.com/threads/1081022-How-to-create-Portal-2-maps), here’s something that might help you out. Just like you, I started by opening up NoFaTe’s example map, what I noticed immediately were missing models, icons, etc for all the new entities, having some past experience creating part of the L4D2 fgd back when we were waiting for the SDK, I got my hands dirty…

I am now working with Randdalf now, we have finally merged our FGDs.

INSTRUCTIONS HAVE CHANGED ON V7, READ THIS
1. Copy “portal2.fgd”, “halflife2.fgd” and “base.fgd” to any folder you want.
2. In Hammer, go to “Tools” -> “Options” on the menu, under the “Game Configurations” tab, go to “Game Data Files”, delete any fgds in there (you should be using the alien swarm SDK, so probably the alien swarm fgd will be there) then add JUST the “portal2.fgd” you just copied.
3. There you go, new juicy stuff to play with.

If there’s a particular entity that you’d like to see added that I haven’t gotten around to do yet, tell me which map and where on the map it is (or it’s name if you can) and I’ll add it to the request queue.

Our top priority is adding the essential gameplay elements, including prefabs (tractor beams, bridge emitters, lasers, turrets, floor buttons, normal buttons, etc, etc), after that we’ll see. We’ll now always release a file that you can download with all the stable stuff.

Entity List (the ones with I/O are the ones to which I have added all Inputs/Outputs)

______________________________________________________________________

Updates:

21:36 GMT 21/04/2011

23:17 GMT 21/04/2011

00:19 GMT 22/04/2011

03:27 GMT 22/04/2011:

Randdalf Merge Update (19:26 GMT 22/04/2011)

03:39 GMT 23/04/2011:

03:23 GMT 25/04/2011

19:34 GMT 01/05/2011

Latest Stable Release (v7) (I’ve included an example bsp and a vmf with all the relevant entities, now with Personality Cores):
Download Portal 2 FGD Version 7

Amazing.

Thanks :smiley:

I’m now adding the new turret properties.

EDIT:

Updated it, log is on the OP. This might be the last update I do today (in the next 12 hours or so) but I might do one more, not sure yet.

linked_portal_door;

Width - Half the width of the portal (hammer units)
Height - Halfthe height of the portal (hammer units)
Angles - The angle you want the portal to be facing (in 0 0 0 format)
Targetname - Name of the portal you are editing
partnername - Name of the portal you want your dick to come out of if you put it in there.

Would be nice thanks :v:, is sizeable world portal.

Oh that’s cool, will get on it now :v:

I take it that’s an entity that you tie a brush to? or is it just an entity?

It’s just an entity. Got an example prefab in here http://horobox.co.uk/u/icemaz_1303477895.zip

Alright, I should be done anyways, went with the just an entity to begin with, just gonna test it to be sure.

I’m getting alot of errors , doesn’t work for me. It’s having trouble mounting halflife2.fgd. Is there any specific folder I should put the new fgd?

You shouldn’t be mounting halflife2.fgd, you should be using the Alien Swarm SDK and only use the fgd I’m providing on the OP, I put mine in the source_sdk/bin/orangebox/bin/ folder but that shouldn’t matter (although you can always try)

icemaz, here’s what you requested, I’ll add it to the OP:

Awesome will save me copy and pasting, thanks.

You’re welcome, it was lots of fun playing with that thing :v:

Here are some new ones, omni has the credit on the lasers.


@PointClass base(Parentname, Targetname, Angles) studio( "models/props/reflection_cube.mdl" ) = prop_weighted_cube: "Cube that reflects lasers."
[
    allowfunnel(boolean) : "Allow Funneling" : 1 : "Allow Funneling"
    skin(integer) : "Skin types" : 3 : "Skin types."
    PaintPower(integer) : "Paint Power" : 4 : "Paint Power."    
]

@PointClass base(Parentname, Targetname, Angles) studio( "models/props/laser_emitter_center.mdl" ) = env_portal_laser: "Portal laser emitter."
[
    drawinfastreflection(boolean) : "Draw in fast reflection" : 1 : "Draw in fast reflection."
    autoaimenabled(boolean) : "Auto aim enabled." : 1 : "Auto aim enabled."

    input Enable(void) : "Enables activity." //tenative, untested
    input Disable(void) : "Disables activity." //;
]

@PointClass base(Parentname, Targetname, Angles) studio( "models/props/laser_catcher_center.mdl" ) = prop_laser_catcher: "Portal laser catcher."
[
    drawinfastreflection(boolean) : "Draw in fast reflection" : 1 : "Draw in fast reflection."
    autoaimenabled(boolean) : "Auto aim enabled" : 1 : "Auto aim enabled."
    skin(integer) : "Skin types" : 1 : "Skin types." 
    vscripts(string) : "vscripts" : "laser_target/musical_laser_catcher.nut" : "vscripts"
    noshadow(boolean) : "Disable Shadows" : 1 : "Disable Shadows?"
        
    input Enable(void) : "Enables activity." //tenative, untested
    input Disable(void) : "Disables activity." //;
    
    output OnPowered(void) : "Powered"
    output OnUnPowered(void) : "Unpowered"
]

What about prop_weighted_cube ?

Look at the post above you

Before I had that bit of code in the fgd the "prop_weighted_cube"s looked like the regular cubes (in hammer) and then after I put it in they changed to the reflector cube model (in hammer). Yet in game they were still the regular cubes. I don’t know if I’m doing something wrong or if it’s the code.

Edit: Nvm, you have to use skin 0 for normal cubes and skin 3 for reflector cubes. The skin won’t change in hammer though.

I have a problem with your fgd I placed your one in my “alien swarm/bin” with the other one original and I dont see anything of your stuff :frowning:

But the one p2_draft.fgd work well :frowning:
I really need your one to play around portal linked :slight_smile:

I copied all in the text in box with notepad++ and nothing :slight_smile:

Update coming soon

EDIT: Ughhh, nevermind. I’m dumber than a sack of bricks who can’t read a thread. Durp.

In any case, “info_paint_sprayer” sounds somewhat interesting.

I followed the steps and created the .fgd, and made a Portal 2 config in the Alien Swarm SDK Hammer, however it doesn’t seem to be working and spits out


File d:\games\steam\steamapps\common\alien swarm\swarm\portal2.fgd, line 15: error including file: halflife2.fgd
File d:\games\steam\steamapps\common\alien swarm\swarm\portal2.fgd, line 245: logic_script: Variable 'vscripts' is multiply defined with different types.

What do

Should I add the halflife2.fgd to the Portal 2 setup?

[editline]22nd April 2011[/editline]

Adding halflife2.fgd didn’t do anything

[editline]22nd April 2011[/editline]

After reading up above, should I remove the alienswarm.fgd and only keep the portapotty2.fgd in the setup?

[editline]22nd April 2011[/editline]

Nope, that didn’t help either. Anyone got any idea?

No, it’s a map setting which was added so that the (very expensive) paint shader only has to load when it’s being used in a map, and not all the time. Using paint also doubles lightmap memory usage. If you want to enable it, disable smart edit on the map properties window and add the key “paintinmap” and value “1”.