• Portal 2 FGD Thread
    225 replies, posted
  • For those of you working on Portal 2 maps using NoFaTe's method ([url]http://www.facepunch.com/threads/1081022-How-to-create-Portal-2-maps[/url]), 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... [b]I am now working with Randdalf now, we have finally merged our FGDs.[/b] [b]INSTRUCTIONS HAVE CHANGED ON V7, READ THIS[/b] [b]1.[/b] Copy "portal2.fgd", "halflife2.fgd" and "base.fgd" to any folder you want. [b]2.[/b] 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. [b]3.[/b] There you go, new juicy stuff to play with. [b]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.[/b] 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. [b]Entity List (the ones with I/O are the ones to which I have added all Inputs/Outputs)[/b] [quote] 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 [/quote] [b]______________________________________________________________________[/b] [b]Updates:[/b] [b]21:36 GMT 21/04/2011[/b] [quote] [b]Added:[/b] prop_floor_button (All the properties added to Smart Edit, including the OnPressed output, button model is now visible in Hammer) [b]Added:[/b] prop_tractor_beam (All the properties added to Smart Edit, gave it a nice intuitive icon from the game, now visible in Hammer) [b]Added:[/b] prop_wall_projector (All the properties added to Smart Edit, gave it the right model to be displayed in Hammer) [/quote] [b]23:17 GMT 21/04/2011[/b] [quote] [b]Updated:[/b] npc_portal_turret_floor (Added new properties) [b]Updated:[/b] prop_dynamic (Added new properties) [b]Added:[/b] trigger_catapult (All the properties added to Smart Edit, including the OnCatapulted output) [b]Updated:[/b] func_instance_io_proxy (All the new properties added to Smart Edit, OnProxyRelay outputs added too) [b]Updated:[/b] logic_relay (It has angles now for some reason) [b]Updated:[/b] logic_script (Angles and VScripts properties) [b]Added:[/b] logic_coop_manager (All the properties added to Smart Edit, gave it a nice intuitive manager icon, included outputs) [/quote] [b]00:19 GMT 22/04/2011[/b] [quote] [b]Updated:[/b] func_clip_vphysics (Added origin property) [b]Added:[/b] 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) [b](requested by icemaz)[/b] [/quote] [b]03:27 GMT 22/04/2011:[/b] [quote] [b]Added:[/b] prop_under_button (These are the underground buttons that you press to get paint, included OnPressed output and set the right model for it) [b]Added:[/b] info_paint_sprayer (These are used to spray paint, added all the properties from it as well as a nice self descriptive icon) [b]Updated:[/b] worldspawn (added "Allow Paint in Map" and "Max Blob Count" properties required for maps that use paint, these show up in the map properties) [b]Updated:[/b] prop_tractor_beam (Gave it the respective model instead of an icon, dunno why I used an icon to begin with) [b]Added:[/b] env_portal_laser (added all the properties from it, also gave the ability to change the laser emitter model) [b]Updated:[/b] prop_wall_projector (you can now change its model if you wish) [b]Updated:[/b] prop_tractor_beam (same as above) [b]Updated:[/b] prop_floor_button (same as above) [b]Added:[/b] info_placement_helper [b]Added:[/b] prop_button [b]Added:[/b] prop_testchamber_door [b]Added:[/b] prop_weighted_cube [/quote] [b]Randdalf Merge Update (19:26 GMT 22/04/2011)[/b] [quote] [b]Updated:[/b] prop_testchamber_door [b]Updated:[/b] prop_weighted_cube [b]Updated:[/b] trigger_portal_cleanser [b]Updated:[/b] prop_button [b]Updated:[/b] prop_floor_button [b]Updated:[/b] trigger_catapult [b]Updated:[/b] env_portal_laser [b]Added:[/b] info_overlay_accessor [b]Updated:[/b] info_placement_helper [b]Added:[/b] prop_laser_catcher [b]Updated:[/b] npc_portal_turret_floor [b]Updated:[/b] info_paint_sprayer [b]Updated:[/b] prop_under_button [b]Added:[/b] prop_under_floor_button [b]Added:[/b] prop_monster_box [b]Updated:[/b] prop_wall_projector [b]Updated:[/b] prop_tractor_beam [b]Added:[/b] prop_indicator_panel [b]Updated:[/b] logic_coop_manager [b]Added:[/b] info_coop_spawn [b]Added:[/b] prop_laser_relay [b]Added:[/b] prop_floor_cube_button [b]Added:[/b] prop_floor_ball_button [b]Updated:[/b] trigger_catapult [b]Updated:[/b] npc_portal_turret_floor [/quote] [b]03:39 GMT 23/04/2011:[/b] [quote] [b]Updated:[/b] prop_weighted_cube (added Dissolve and SilentDissolve inputs as requested by Zyx) [b]Updated:[/b] prop_button (added Skin and IsTimer properties as requested by Zyx) [b]Updated:[/b] prop_portal (added origin) [b]Updated:[/b] trigger_catapult (spawnflags fixed, added some new properties) [b]Updated:[/b] prop_tractor_beam (added some missing inheritance - user feedback) [b]Updated:[/b] prop_wall_projector (added some missing inheritance - user feedback) [b]Updated:[/b] prop_laser_catcher (had a typo on one of the inputs) [b]Updated:[/b] prop_tractor_beam (added SetLinearForce input, takes an integer as parameter) [b]Updated:[/b] prop_testchamber_door (now also inherits from Door, has Open and Close outputs, etc) [b]Updated:[/b] info_placement_helper (now also inherits from Parent) [b]Updated:[/b] prop_monster_box (now inherits from prop_physics, added some new properties) [b]Updated:[/b] info_paint_sprayer (turns out water was type 4 and not 1, type 1 has been changed to "Unknown") [b]Updated:[/b] All button entities (added OnUnpressed output where it was missing, also added PressIn and PressOut inputs) [b]Added:[/b] info_overlay (needed some new settings to work properly) [b]Updated:[/b] trigger_portal_cleanser (added some missing properties) [b]Added:[/b] npc_security_camera (these are friggin creepy when overused, make sure the Autostart flag is on) [b]Updated:[/b] info_coop_spawn [/quote] [b]03:23 GMT 25/04/2011[/b] [quote] [b]Added:[/b] env_sprite_clientside [b]Added:[/b] light_directional [b]Updated:[/b] func_clip_vphysics (This wasn't supposed to have an Origin value, and because it was fixed, was causing a leak error) [b]Updated:[/b] 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) [b]Updated:[/b] prop_weighted_cube (added all the inputs/outputs) [b]Updated:[/b] env_portal_laser (added all the inputs/outputs) [b]Added:[/b] env_projectedtexture [/quote] [b]19:34 GMT 01/05/2011[/b] [quote] [b]Added:[/b] npc_personality_core (Personality Cores) [b]Added:[/b] info_landmark_entry [b]Added:[/b] info_landmark_exit [b]Added:[/b] env_tonemap_controller [b]Updated:[/b] func_breakable (added new properties) [b]Updated:[/b] func_door_rotating (added new properties) [b]Updated:[/b] func_monitor (added new properties) [b]Updated:[/b] func_physbox (added new properties) [b]Added:[/b] prop_indicator_panel (credit goes to Skotty) [b]Added:[/b] trigger_playerteam (credit goes to Skotty) [b]Updated:[/b] env_wind (added windradius property) [b]Updated:[/b] shadow_control (added enableshadowsfromlocallights property) [b]Added:[/b] point_changelevel [b]Updated:[/b] point_viewcontrol (added new properties) [b]Added:[/b] point_viewproxy [b]Added:[/b] filter_player_held [/quote] Latest Stable Release (v7) (I've included an example bsp and a vmf with all the relevant entities, now with Personality Cores): [url=http://dl.dropbox.com/u/9133125/FGD/fgdV7.zip]Download Portal 2 FGD Version 7[/url]
  • 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.
  • 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 [URL]http://horobox.co.uk/u/icemaz_1303477895.zip[/URL]
  • 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: [quote]@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) ][/quote]
  • 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" ][/CODE]
  • [QUOTE=makkalakka2k;29348413]Here are some new ones, omni has the credit on the lasers. code[/QUOTE] 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 :( 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 :)
  • 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 [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.[/code] 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?
  • [QUOTE=robowurmz;29355296]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.[/QUOTE] 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".
  • Add these inputs to the cube: Dissolve SilentDissolve And prop_button have a skin and IsTimer.
  • [QUOTE=VaSTinY;29355355]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.[/code] 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?[/QUOTE] put halflife2.fgd into C:\program files\steam\steamapps\common\Alien Swarm\swarm\bin
  • 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")
  • 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. [editline]22nd April 2011[/editline] And no Portal 2 entities are available [editline]22nd April 2011[/editline] I don't really know what I'm doing wrong here
  • Put portal2.fgd in Steam\steamapps\<username>\sourcesdk\bin\orangebox\bin or copy halflife2.fgd from that folder to alien swarm\bin.
  • 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.
  • [QUOTE=DeanWinchester;29359957]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.[/QUOTE] 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? [editline]22nd April 2011[/editline] 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!
  • So I've put the Portal2.fgd under the Game Data Files, but nothing changed.
  • Are the Discouragment Beam Redirecting Cubes in the entity list? And those spinning receptor things you can put a laser through? [editline]22nd April 2011[/editline] Nevermind, figured out what to do with the redirection cube, but the beam receptors should be added!