1. Post #1
    DeanWinchester's Avatar
    May 2010
    3,679 Posts
    For those of you working on Portal 2 maps using NoFaTe's method (http://www.facepunch.com/threads/108...-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)
    env_portal_laser [I/O]
    env_projected_texture
    env_sprite_clientside
    env_texture_toggle
    env_tonemap_controller
    env_wind
    filter_player_held
    func_breakable
    func_clip_vphysics
    func_door_rotating
    func_instance_io_proxy
    func_monitor
    func_physbox
    info_landmark_entry
    info_landmark_exit
    info_coop_spawn
    info_overlay
    info_overlay_accessor
    info_paint_sprayer
    info_placement_helper
    linked_portal_door
    light_directional
    logic_coop_manager
    logic_relay
    logic_script
    npc_personality_core [I/O]
    npc_portal_turret_floor
    npc_security_camera
    point_changelevel
    point_viewcontrol
    point_viewproxy
    prop_button
    prop_dynamic
    prop_floor_ball_button
    prop_floor_button
    prop_floor_cube_button
    prop_indicator_panel
    prop_laser_catcher
    prop_laser_relay
    prop_monster_box
    prop_testchamber_door
    prop_tractor_beam
    prop_under_button
    prop_under_floor_button
    prop_wall_projector
    prop_weighted_cube [I/O]
    shadow_control
    trigger_catapult [I/O]
    trigger_playerteam
    trigger_portal_cleanser
    worldspawn
    __________________________________________________ ____________________

    Updates:

    21:36 GMT 21/04/2011
    Added: prop_floor_button (All the properties added to Smart Edit, including the OnPressed output, button model is now visible in Hammer)
    Added: prop_tractor_beam (All the properties added to Smart Edit, gave it a nice intuitive icon from the game, now visible in Hammer)
    Added: prop_wall_projector (All the properties added to Smart Edit, gave it the right model to be displayed in Hammer)
    23:17 GMT 21/04/2011
    Updated: npc_portal_turret_floor (Added new properties)
    Updated: prop_dynamic (Added new properties)
    Added: trigger_catapult (All the properties added to Smart Edit, including the OnCatapulted output)
    Updated: func_instance_io_proxy (All the new properties added to Smart Edit, OnProxyRelay outputs added too)
    Updated: logic_relay (It has angles now for some reason)
    Updated: logic_script (Angles and VScripts properties)
    Added: logic_coop_manager (All the properties added to Smart Edit, gave it a nice intuitive manager icon, included outputs)
    00:19 GMT 22/04/2011
    Updated: func_clip_vphysics (Added origin property)
    Added: linked_portal_door (Creates rectangle shaped portals that you can connect to each other, read the help on the entity to be clear. Also gave it a descriptive icon) (requested by icemaz)
    03:27 GMT 22/04/2011:
    Added: prop_under_button (These are the underground buttons that you press to get paint, included OnPressed output and set the right model for it)
    Added: info_paint_sprayer (These are used to spray paint, added all the properties from it as well as a nice self descriptive icon)
    Updated: worldspawn (added "Allow Paint in Map" and "Max Blob Count" properties required for maps that use paint, these show up in the map properties)
    Updated: prop_tractor_beam (Gave it the respective model instead of an icon, dunno why I used an icon to begin with)
    Added: env_portal_laser (added all the properties from it, also gave the ability to change the laser emitter model)
    Updated: prop_wall_projector (you can now change its model if you wish)
    Updated: prop_tractor_beam (same as above)
    Updated: prop_floor_button (same as above)
    Added: info_placement_helper
    Added: prop_button
    Added: prop_testchamber_door
    Added: prop_weighted_cube
    Randdalf Merge Update (19:26 GMT 22/04/2011)
    Updated: prop_testchamber_door
    Updated: prop_weighted_cube
    Updated: trigger_portal_cleanser
    Updated: prop_button
    Updated: prop_floor_button
    Updated: trigger_catapult
    Updated: env_portal_laser
    Added: info_overlay_accessor
    Updated: info_placement_helper
    Added: prop_laser_catcher
    Updated: npc_portal_turret_floor
    Updated: info_paint_sprayer
    Updated: prop_under_button
    Added: prop_under_floor_button
    Added: prop_monster_box
    Updated: prop_wall_projector
    Updated: prop_tractor_beam
    Added: prop_indicator_panel
    Updated: logic_coop_manager
    Added: info_coop_spawn
    Added: prop_laser_relay
    Added: prop_floor_cube_button
    Added: prop_floor_ball_button
    Updated: trigger_catapult
    Updated: npc_portal_turret_floor
    03:39 GMT 23/04/2011:
    Updated: prop_weighted_cube (added Dissolve and SilentDissolve inputs as requested by Zyx)
    Updated: prop_button (added Skin and IsTimer properties as requested by Zyx)
    Updated: prop_portal (added origin)
    Updated: trigger_catapult (spawnflags fixed, added some new properties)
    Updated: prop_tractor_beam (added some missing inheritance - user feedback)
    Updated: prop_wall_projector (added some missing inheritance - user feedback)
    Updated: prop_laser_catcher (had a typo on one of the inputs)
    Updated: prop_tractor_beam (added SetLinearForce input, takes an integer as parameter)
    Updated: prop_testchamber_door (now also inherits from Door, has Open and Close outputs, etc)
    Updated: info_placement_helper (now also inherits from Parent)
    Updated: prop_monster_box (now inherits from prop_physics, added some new properties)
    Updated: info_paint_sprayer (turns out water was type 4 and not 1, type 1 has been changed to "Unknown")
    Updated: All button entities (added OnUnpressed output where it was missing, also added PressIn and PressOut inputs)
    Added: info_overlay (needed some new settings to work properly)
    Updated: trigger_portal_cleanser (added some missing properties)
    Added: npc_security_camera (these are friggin creepy when overused, make sure the Autostart flag is on)
    Updated: info_coop_spawn
    03:23 GMT 25/04/2011
    Added: env_sprite_clientside
    Added: light_directional
    Updated: func_clip_vphysics (This wasn't supposed to have an Origin value, and because it was fixed, was causing a leak error)
    Updated: trigger_catapult (There's an Autostart flag that needs to be on for these to work now besides the other flags, added all inputs/outputs, "Use Threshold Check" off by default because otherwise it won't work)
    Updated: prop_weighted_cube (added all the inputs/outputs)
    Updated: env_portal_laser (added all the inputs/outputs)
    Added: env_projectedtexture
    19:34 GMT 01/05/2011
    Added: npc_personality_core (Personality Cores)
    Added: info_landmark_entry
    Added: info_landmark_exit
    Added: env_tonemap_controller
    Updated: func_breakable (added new properties)
    Updated: func_door_rotating (added new properties)
    Updated: func_monitor (added new properties)
    Updated: func_physbox (added new properties)
    Added: prop_indicator_panel (credit goes to Skotty)
    Added: trigger_playerteam (credit goes to Skotty)
    Updated: env_wind (added windradius property)
    Updated: shadow_control (added enableshadowsfromlocallights property)
    Added: point_changelevel
    Updated: point_viewcontrol (added new properties)
    Added: point_viewproxy
    Added: filter_player_held
    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
    Reply With Quote Edit / Delete Reply United States Show Events Winner Winner x 16Mapping King Mapping King x 9Useful Useful x 2Optimistic Optimistic x 1 (list)

  2. Post #2
    rctfanatic's Avatar
    July 2009
    407 Posts
    Amazing.

  3. Post #3
    DeanWinchester's Avatar
    May 2010
    3,679 Posts
    Thanks :D

    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.

  4. Post #4
    Ex-Least Respected Usergroup
    icemaz's Avatar
    June 2007
    7,113 Posts
    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 , is sizeable world portal.
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Mapping King Mapping King x 6Funny Funny x 1 (list)

  5. Post #5
    DeanWinchester's Avatar
    May 2010
    3,679 Posts
    Oh that's cool, will get on it now

    I take it that's an entity that you tie a brush to? or is it just an entity?
    Reply With Quote Edit / Delete Reply United States Show Events Useful Useful x 1 (list)

  6. Post #6
    Ex-Least Respected Usergroup
    icemaz's Avatar
    June 2007
    7,113 Posts
    It's just an entity. Got an example prefab in here http://horobox.co.uk/u/icemaz_1303477895.zip
    Reply With Quote Edit / Delete Reply United Kingdom Show Events Funny Funny x 1 (list)

  7. Post #7
    DeanWinchester's Avatar
    May 2010
    3,679 Posts
    Alright, I should be done anyways, went with the just an entity to begin with, just gonna test it to be sure.

  8. Post #8
    Gold Member
    Instant Mix's Avatar
    October 2006
    3,858 Posts
    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?

  9. Post #9
    DeanWinchester's Avatar
    May 2010
    3,679 Posts
    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:
    @PointClass base(Targetname, Angles) iconsprite("effects/fakeportalring_blue.vmt") = linked_portal_door : "Portal Door"+"Yellow line should be facing the direction the player or object enters the Portal"
    [
    width(integer) : "Width" : 32 : "Half the width of the Portal (in Hammer units)"
    height(integer) : "Height" : 64 : "Half the height of the Portal (in Hammer units)"
    partnername(string) : "Partner Name" : "" : "Name of the Portal this one is connected to"

    input Open(void)
    input Close(void)
    ]
    Reply With Quote Edit / Delete Reply United States Show Events Informative Informative x 1 (list)

  10. Post #10
    Ex-Least Respected Usergroup
    icemaz's Avatar
    June 2007
    7,113 Posts
    Awesome will save me copy and pasting, thanks.

  11. Post #11
    DeanWinchester's Avatar
    May 2010
    3,679 Posts
    You're welcome, it was lots of fun playing with that thing

  12. Post #12

    November 2006
    3 Posts
    Here are some new ones, omni has the credit on the lasers.

    Code:
    @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"
    ]

  13. Post #13

    February 2009
    133 Posts
    What about prop_weighted_cube ?
    Reply With Quote Edit / Delete Reply United States Show Events Agree Agree x 2 (list)

  14. Post #14

    November 2006
    3 Posts
    What about prop_weighted_cube ?
    Look at the post above you

  15. Post #15
    Sparky-Z's Avatar
    March 2009
    303 Posts
    Here are some new ones, omni has the credit on the lasers.

    code
    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.

  16. Post #16
    lotus006's Avatar
    May 2007
    903 Posts
    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 :(

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

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

  17. Post #17
    DeanWinchester's Avatar
    May 2010
    3,679 Posts
    Update coming soon

  18. Post #18
    Gold Member
    robowurmz's Avatar
    April 2007
    2,245 Posts
    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.

  19. Post #19
    Gold Member
    VaSTinY's Avatar
    May 2009
    4,951 Posts
    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

    Code:
    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?

    Edited:

    Adding halflife2.fgd didn't do anything

    Edited:

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

    Edited:

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

  20. Post #20
    SHADERS
    Legend286's Avatar
    October 2008
    10,024 Posts
    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.
    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".

  21. Post #21
    Zyx
    Guest 3855 is lost and can't find the park exit
    Zyx's Avatar
    February 2005
    2,829 Posts
    Add these inputs to the cube:
    Dissolve
    SilentDissolve

    And prop_button have a skin and IsTimer.

  22. Post #22
    DeanWinchester's Avatar
    May 2010
    3,679 Posts
    Updated :D

    (Zyx, I'll add those they will be in the next update later today)
    Reply With Quote Edit / Delete Reply United States Show Events Friendly Friendly x 1 (list)

  23. Post #23
    Gold Member

    August 2010
    5,708 Posts
    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

    Code:
    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?

    Edited:

    Adding halflife2.fgd didn't do anything

    Edited:

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

    Edited:

    Nope, that didn't help either. Anyone got any idea?
    put halflife2.fgd into C:\program files\steam\steamapps\common\Alien Swarm\swarm\bin

  24. Post #24
    DeanWinchester's Avatar
    May 2010
    3,679 Posts
    For the time being, the next version will use the alienswarm base instead and that won't be necessary (or just change "halflife2.fgd" to "base.fgd")
    Reply With Quote Edit / Delete Reply United States Show Events Friendly Friendly x 1 (list)

  25. Post #25
    Gold Member
    VaSTinY's Avatar
    May 2009
    4,951 Posts
    This isn't really working for me, it keeps giving me random errors. Same errors as I had above including "undefined base classes" and stuff, when having "swarmbase.fgd" and "portal2.fgd" loaded in a setup.

    Edited:

    And no Portal 2 entities are available

    Edited:

    I don't really know what I'm doing wrong here

  26. Post #26
    Paulendy's Avatar
    January 2008
    844 Posts
    Put portal2.fgd in Steam\steamapps\<username>\sourcesdk\bin\orangebox \bin or copy halflife2.fgd from that folder to alien swarm\bin.

  27. Post #27
    DeanWinchester's Avatar
    May 2010
    3,679 Posts
    Actually we tried that and it was causing more errors than fixing them, in the future we'll just include the half life 2 fgd and that should go in the alienswarm bin folder too.

  28. Post #28
    Gold Member
    VaSTinY's Avatar
    May 2009
    4,951 Posts
    Actually we tried that and it was causing more errors than fixing them, in the future we'll just include the half life 2 fgd and that should go in the alienswarm bin folder too.
    oh, I thought the location of the .fgds didn't matter. So I'm meant to put the portal2.fgd into alien swarm/bin then I take it?

    Edited:

    Neat, I put halflife2.fgd into the alien swarm/bin along with portal2.fgd and now it's working properly. Except it still whines about some vscripts and logic_scripts not working properly for some reason. But entities work, thanks!

  29. Post #29
    Silly men accomplish magnificant tasks, the current ammount of womens rear exits that have surrounded my penis makes me confident I will accomplish, shit.
    Joppari's Avatar
    July 2008
    3,430 Posts
    So I've put the Portal2.fgd under the Game Data Files, but nothing changed.

  30. Post #30
    Gold Member
    VaSTinY's Avatar
    May 2009
    4,951 Posts
    Are the Discouragment Beam Redirecting Cubes in the entity list? And those spinning receptor things you can put a laser through?

    Edited:

    Nevermind, figured out what to do with the redirection cube, but the beam receptors should be added!

  31. Post #31
    DeanWinchester's Avatar
    May 2010
    3,679 Posts
    They are there:

    Laser Emitter: env_portal_laser
    Laser Relay: prop_laser_relay
    Laser Receiver: prop_laser_catcher

    Emitter is the one the laser comes out of, Relay are the ones on the floor that turn on when a laser passes by it and Receiver are the ones that receive a laser and turn on when they do.

  32. Post #32
    Gold Member
    VaSTinY's Avatar
    May 2009
    4,951 Posts
    Ooh, didn't see the relay one, thanks

  33. Post #33
    Sparky-Z's Avatar
    March 2009
    303 Posts
    My water was missing its texture, but I fixed it.


    In the fgd change the number for water gel to 4 instead of 1. Or just put in 4 for the type of gel.

  34. Post #34
    DeanWinchester's Avatar
    May 2010
    3,679 Posts
    Thanks for the tip, I was trying to figure that one out

  35. Post #35
    Gold Member
    VaSTinY's Avatar
    May 2009
    4,951 Posts
    My water was missing its texture, but I fixed it.


    In the fgd change the number for water gel to 4 instead of 1. Or just put in 4 for the type of gel.
    How did you get the gel_sprayer to actually work? My game crashed upon firing the "Start" I/O from a switch button, which was set to have it stop spraying after 4 seconds :confused:

  36. Post #36
    Gold Member
    Llamalord's Avatar
    August 2009
    687 Posts
    Everytime I compile a map it says I have a leak, even if I put a box around the map there is still a leak.

  37. Post #37
    Paulendy's Avatar
    January 2008
    844 Posts
    Everytime I compile a map it says I have a leak, even if I put a box around the map there is still a leak.
    You have to use expert compile and change the $bsp_exe parameters to "-game $gamedir $path\$file", without the quotes obviously, because the Alien Swarm compiler makes every brush into a func_detail on compile.
    Reply With Quote Edit / Delete Reply Guernsey Show Events Friendly Friendly x 1Useful Useful x 1 (list)

  38. Post #38
    Sometimes i fall down :(
    green bandit's Avatar
    July 2008
    3,199 Posts
    fixed, thanks icemaz!

  39. Post #39
    Sparky-Z's Avatar
    March 2009
    303 Posts
    How did you get the gel_sprayer to actually work? My game crashed upon firing the "Start" I/O from a switch button, which was set to have it stop spraying after 4 seconds :confused:
    Hmm, that's strange. I have a logic_auto that fire the "Start" input for each of them and it works fine. Maybe try using a info_paint_sprayer from an actual Portal2 map, unless that's what you're already doing, because it might be because of some of the settings you have on it.

  40. Post #40
    Gold Member
    VaSTinY's Avatar
    May 2009
    4,951 Posts
    Hmm, that's strange. I have a logic_auto that fire the "Start" input for each of them and it works fine. Maybe try using a info_paint_sprayer from an actual Portal2 map, unless that's what you're already doing, because it might be because of some of the settings you have on it.
    All I did was create a gel_sprayer entity from this thread's portal2.fgd file, and position it where I wanted it without changing anything else at all, then I created a button that told the gel_sprayer to "Start" when the button was pressed and stop 4 seconds later