Portal 2/portal.fgd

From Source Entities
Jump to navigation Jump to search
Protected.png

This page is protected. Only admins can edit it.
Original file. Should not be edited. -Pinsplash (UTC)

common/Portal 2/bin/portal.fgd

///====== Copyright © 1996-2005, Valve Corporation, All rights reserved. =======
//
// Purpose: Portal game definition file (.fgd) 
//
///=============================================================================

@include "halflife2.fgd"

///=============================================================================
//
// Logical Entities
//
///=============================================================================

@PointClass base(CombineBallSpawners, Parentname, Targetname) = point_energy_ball_launcher :
	"Launches energy balls."
[
	BallLifetime(float) 	: "Ball Lifetime" : 12 : "The time in seconds the ball will live before self-destructing. A negative value will give infinite life."
	MinLifeAfterPortal(float) : "Min life after portal transition" : 6 : "When energy balls created by this launcher pass through a portal and their life is refreshed to be this number at minimum."
	
	// Inputs
	input LaunchBall(void) 	: "Launch a ball from the spawner."
	input BallCaught(void)  : "Ball this launcher created was 'caught'."

	// Outputs
	output OnPostSpawnBall(void) : "Fired after the ball has spawned."
	output OnBallCaught(void) : "Fired when a ball this entity has launched has been 'caught'."
]

@PointClass base(Parentname, Targetname, Angles) studio( "models/props_bts/rocket_sentry.mdl" ) = npc_rocket_turret: "Aims a rocket at a target."
[
	spawnflags(Flags) =
	[
		1:  "Disabled" : 0
	]

	TripwireMode(choices) : "Tripwire Mode" : 0 : "Makes this sentry aim in a fixed direction and not follow the player. Still fires rockets when beam is crossed." =
	[
		0 : "Disabled"
		1 : "Enabled"
	]
	
	TripwireAimTarget(target_destination) : "Tripwire Aim Target" : : "(tripwire mode only) An info target this sentry will aim it's beam at. If not specified, will aim down world angles." 
	RocketSpeed(float) : "Rocket Speed" : 450 : "Speed the rocket will travel at."
	RocketLifetime(float) : "Rocket Lifetime" : 20 : "The rocket will automatically detonate after this number of seconds."
	
	input Toggle(void) : "Toggles activity."
	input Enable(void) : "Enables activity."
	input Disable(void) : "Disables activity."
	input SetTarget(string) : "Sets the target for this turret to attack."
	input Destroy(void) : "Sets this turret to it's destroyed state."

	output OnFoundTarget(void) 	: 	"Fired when the rocket turret finds an unobstructed target."
	output OnLostTarget(void) 	: 	"Fired when turret's target is blocked."
	output OnDeath(void)		:	"Fired after this turret finishes it's destroy think and begins it's death think."
]

@PointClass base(Targetname, Parentname, Angles) cylinder(255 255 255, targetname, target, radius, targetname, targetname, radius) color(255 192 0) size(16 16 16) = env_portal_path_track : 
	"An entity used to build paths for other entities to follow. Each path_track is a node on the path, each holding the name of the next path_track in the path."
[
	spawnflags(Flags) =
	[
		1:  "Disabled" : 0
		2:  "Fire once" : 0
		4:  "Branch Reverse" : 0
		8:  "Disable train" : 0
		16: "Teleport to THIS path track" : 0
	]
	
	Track_beam_scale(float):"Scale Track FX": 0 :"The amount to scale the track FX size"
	End_point_scale(float) : "Scale Endpoint FX" : 0 : "The amount to scale the endpoint FX size."
	End_point_fadeout(float):"Fade Out Endpoint": 0 :"Amount of time to fade out the endpoint FX"
	End_point_fadein(float):"Fade In Endpoint": 0 :"Amount of time to fade in the endpoint FX"
	target(target_destination) : "Next Stop Target" :  : "The next path_track in the path."
	altpath(target_destination) : "Branch Path" : : "An alternative path_track to be the next node in the path. Useful for making branching paths. Use the ToggleAlternatePath / EnableAlternatePath inputs to make the alternative path active."
	speed(float) : "New Train Speed" : 0 : "When the train reaches this path_track, it will set its speed to this speed. "+
		"This speed must be a positive value that is less than the train's max speed. A value of 0 will cause no change in the train's speed."
	radius(float) : "Path radius" : 0 : "Used by NPCs who follow track paths (attack chopper/gunship). This tells them the maximum distance they're allowed to be from the path at this node."

	orientationtype(choices) : "Orientation Type" : 1 : "The way that the path follower faces as it moves through this path track." =
	[
		0 : "No change"
		1 : "Face direction of motion"
		2 : "Face this path_track's angles"
	]

	// Inputs
	input ToggleAlternatePath(void) : "Cause the track to toggle to/from its alternate path."
	input EnableAlternatePath(void) : "Enable the alternate path of the track."
	input DisableAlternatePath(void) : "Disable the alternate path of the track."

	input TogglePath(void) : "Cause the track to toggle on/off/"
	input EnablePath(void) : "Enable the track."
	input DisablePath(void) : "Disable the track."

	input ActivateTrackFX(void) : "Turn on the track's fx beam"
	input ActivateEndPointFX(void) : "Turn on the endpoint's fx"
	input DeactivateTrackFX(void) : "Turn off the track's fx beam"
	input DeactivateEndPointFX(void) : "Turn off the endpoint's fx"

	// Outputs
	output OnPass(void) : "Fired when any entity following this path passes this path_track node."
]

///=============================================================================
//
// Brush Entities
//
///=============================================================================

@SolidClass base(Reflection, Trigger, Targetname) = trigger_portal_cleanser : 
	"A trigger volume that disolves any entities that touch it and fizzles active portals when the player touches it."
[
	input FizzleTouchingPortals(void) : "Cause any portals in our volume to immediately fizzle."
	
	Visible(boolean) : "Visible" : "0" : "If the fizzler is visible."
	UseScanline(boolean) : "Use Scanline" : "1" : "If the field uses a scanline."	

	// Outputs
	output OnDissolve(void) : "Fired whenever an entity is dissolved."
	output OnFizzle(void) : "Fired whenever an portals are fizzled."
	output OnDissolveBox(void) : "This cleanser disolved an entity with targetname=Box."
]

@SolidClass base(Targetname, Parentname, EnableDisable ) = func_portal_orientation : 
	"Adjusts a portal's rotation to match a specified angle. The 'Bottom' of the portal points in the specified diretion."
[
	AnglesToFace(angle) : "Angles to face" : "0 0 0" : "The 'floor' of the portal pair linkage will be in this direction."
	MatchLinkedAngles(choices) : "Match linked angles." : 0 : "If set, portals placed in this volume will have their angles match their linked portals. This only works for floor or ceiling portals with a currently linked partner."=
	[
		0 : "False"
		1 : "True"
	]
]

@SolidClass base(Targetname) = func_weight_button : "A button which activates after a specified amount of weight is applied"
[
	WeightToActivate(float) 	: "Amount of weight required before this button activates."

	//Outputs
	output OnPressed(void)		: "Fired when the button is touching enough weight."
	output OnReleased(void)		: "Fired when the button was pressed, but weight was removed."
]

@SolidClass base(Targetname, Parentname) = func_noportal_volume : "A region in which no portal can be placed"
[	
	//Inputs
	input Deactivate(void)		: "Turn off blocking functionality"
	input Activate(void)		: "Turn on blocking functionality"
	input Toggle(void)		: "Toggle blocking functionality"

	spawnflags(Flags) = 
	[
		1: "Start inactive" : 0
	]
]

@SolidClass base(Targetname, Parentname) = func_portal_bumper : "A region that portals trace to fit outside of but can be place on"
[	
	//Inputs
	input Deactivate(void)		: "Turn off bumping functionality"
	input Activate(void)		: "Turn on bumping functionality"
	input Toggle(void)		: "Toggle bumping functionality"

	spawnflags(Flags) = 
	[
		1: "Start inactive" : 0
	]
]


@SolidClass base(Targetname, Parentname) = func_portal_detector : "A region that fires an output if a portal is placed in it"
[	
	//Inputs
	input Disable(void)		: "Turn off detecting functionality"
	input Enable(void)		: "Turn on detecting functionality"
	input Toggle(void)		: "Toggle detecting functionality"

	output OnStartTouchPortal(void) 			: "Fired when any portal touches the detector."	
	output OnEndTouchPortal(void) 				: "Fired when any portal leaves the detector bounds."
	output OnStartTouchPortal1(void)			: "Fired when portal 1 is placed intersecting the portal detector."
	output OnStartTouchPortal2(void)			: "Fired when portal 2 is placed intersecting the portal detector."
	output OnStartTouchLinkedPortal(void)		: "Fired when linked portal is placed intersecting the portal detector."
	output OnStartTouchBothLinkedPortals(void)	: "Fired when both of a pair of portals is placed intersecting the portal detector."
	output OnEndTouchPortal1(void)				: "Fired when portal 1 has left the volume of the detector"
	output OnEndTouchPortal2(void)				: "Fired when portal 2 has left the volume of the detector"
	output OnEndTouchLinkedPortal(void)			: "Fired when a portal with a linked partner has left the volume of the detector"
	output OnEndTouchBothLinkedPortals(void)	: "Fired when both portals have left the volume of the detector"

	spawnflags(Flags) = 
	[
		1: "Start inactive" : 0
	]
	LinkageGroupID(integer) : "Portal pair ID that it detects" : 0
	CheckAllIDs(boolean) : "Check all portals" : 0 : "Ignore the Group ID and check for all portals."
]


///=============================================================================
//
// Model Entities
//
///=============================================================================

@BaseClass = PortalBase
[ 
	output OnPlacedSuccessfully(void)	: "When a portal is placed without failure, this output is fired."
	output OnEntityTeleportFromMe(void)		: "When any entity is teleported from this portal to the linked partner."
	output OnPlayerTeleportFromMe(void)		: "When the player is teleported from this portal to the linked partner."
	output OnEntityTeleportToMe(void)		: "When any entity is teleported from this linked partner to the portal."
	output OnPlayerTeleportToMe(void)		: "When the player is teleported from this linked partner to the portal."
	
	Activated(choices)			: "Start Activated" : 1 : "An inactive portal will not be drawn and will not teleport entites"	=
	[
		0 : "Inactive"
		1 : "Active"
	]
	PortalTwo(choices)			: "Portal Number" : 0 : "A portal has to logically be either portal 1 or portal 2" =
	[
		0 : "Portal 1"
		1 : "Portal 2"
	]
	
	HalfWidth(float)			: "Half-Width of the Portal." : 0
	HalfHeight(float)			: "Half-Height of the Portal." : 0
]


@PointClass base(Targetname, Angles, PortalBase) studio("models/editor/axis_helper_thick.mdl") = prop_portal : "A portal"
[
	LinkageGroupID(integer)		: "Portal pair ID that it belongs to" : 0

	input SetName(string)			: "Naming your portals is fun"
	input SetActivatedState(bool)	: "An inactive portal will not be drawn and will not teleport entites"
	input Fizzle(void)				: "Makes a cool visual fizzle and properly shuts down the portal"
	input NewLocation(string)		: "Sets this portals location and angles. This expects 6 floats with space delimiters, the format is 'x y z pitch yaw roll'"
	input Resize(string)			: "Resizes the portal. Format is 'halfwidth halfheight'"
	input SetLinkageGroupId(integer): "Sets the portal linkage ID.  If portal is open it will close and reopen with new portal linked."	
]

@PointClass base(Weapon,Targetname, Parentname) studio("models/weapons/w_portalgun.mdl") = weapon_portalgun : "Portalgun"
[
	CanFirePortal1(boolean)			: "Can Fire Portal 1" : 1 : "Can this portalgun create blue portals?"
	CanFirePortal2(boolean)			: "Can Fire Portal 2" : 1 : "Can this portalgun create red portals?"
	ShowingPotatos(boolean)			: "Show Potatos" : 0 : "Show potatos."

	StartingTeamNum(choices) : "Starting Team" : 0 : "Which team this gun originally belongs to.  Will decide which portals it fires before being picked up." =
	[
		0 : "Single Player"
		2 : "Orange"
		3 : "Blue"
	]

	input ChargePortal1(void)		: "Does charge up effect for mounted portalgun."
	input ChargePortal2(void)		: "Does charge up effect for mounted portalgun."

	input FirePortal1(void)			: "Projects portal 1 onto a wall in the facing direction of the gun."
	input FirePortal2(void)			: "Projects portal 2 onto a wall in the facing direction of the gun."

	input FirePortalDirection1(vector)	: "Fires portal 1 in the specified direction."
	input FirePortalDirection2(vector)	: "Fires portal 1 in the specified direction."

	output OnFiredPortal1(void)		: "Fires when the first (blue) portal is fired."
	output OnFiredPortal2(void)		: "Fires when the second (red) portal is fired."
]

@PointClass base(npc_turret_ground) studio( "models/combine_turrets/ground_turret.mdl" ) = npc_portal_turret_ground : "Combine (Portal) ground turret"
[
	ConeOfFire(float) 	: "Cone of Fire" : 60 : "Cone of fire in degrees."
]

// Cores of GlaDOS computer. Resemble little eyeballs with handles. These play lines and look around when near the player.
@PointClass base(BasePropPhysics) studioprop() studio( "models/npcs/personality_sphere/personality_sphere.mdl" ) = prop_glados_core : "Core of GlaDOS computer."
[
	CoreType(choices) : "Core Personality" : 1 : "Which personality VO set the core is set to." =
	[
		0 : "Curious"
		1 : "Aggressive"
		2 : "Crazy"
		3 : "None"
	]
	
	DelayBetweenLines(float) : "Pause (in secs) between VO Lines." : "0.4" : "When the core is talking, this is the number of seconds delay between it's spoken lines."

	input Panic(void)	: "Core is near death, panic."
	input StartTalking(void)	: "Start playing lines, play looking animations."
	
	output OnPlayerPickup(void)		: "Player picked up core."
]

@PointClass base(npc_turret_floor) studio( "models/props/turret_01.mdl" ) = npc_portal_turret_floor : "Combine (Portal) Floor Turret"
[
	Gagged(boolean) : "Turret is Gagged" : 0 : "Turret will not speak any lines."
	UsedAsActor(boolean) : "Used As Actor" : 0 : "Turret will not run the standard floor turret code so it can be used as an actor."
	PickupEnabled(boolean) : "Turret can be picked up by player" : 1 : "Disables pickup by player."
	DisableMotion(boolean) : "Disable Motion" : 0 : "Set for turrets that can't move in the world."
	AllowShootThroughPortals(boolean) : "Allow Shooting through portals" : 0 : "Turrets will not try to shoot through portals unless this is set."
	TurretRange(float) : "Maximum Range" : 1024 : "How far the turret will be able to see targets."
	LoadAlternativeModels(boolean) : "Load Defective Models" : 0 : "Should this turret precache the defective models? Needed for late switching."
	UseSuperDamageScale(boolean) : "Use Super Damage" : 0 : "Setting this to true will scale the turret's damage by a very large amount."
	
	CollisionType(choices) : "Collision Type" : 0 : "Allow collision with the player to be turned off for very special cases." =
	[
		0 : "Normal"
		1 : "Debris"
	]

	ModelIndex(choices) : "Model" : 0 : "Which model the turret uses. The skeleton turret is still functional." =
	[
		0 : "Normal"
		1 : "Unused"
		2 : "Box"
		3 : "Backwards"
		4 : "Skeleton"
	]

	DamageForce(boolean) : "Damage pushes player" : 0 : "Being hit by this turret will push the player back."

	input FireBullet(string)	: "Causes the turret to instantly fire at the specified entity."

	input EnableGagging(string)	: "Prevents the turret from speaking any lines."
	input DisableGagging(string): "Allows the turret to speak again."
	input EnablePickup(string)	: "Enables player pickup of the turret."
	input DisablePickup(string): "Disables player pickup of the turret."
	input SelfDestructImmediately(void) : "Cause the turret to explode immediately."
	input SetAsBouncePainted(void) : "Force this turret to be painted with bounce paint."
	
	output OnPainted(void)		: "Fires when the turret is first painted or if repainted by a different type."
]

@PointClass base(Targetname, Angles, Studiomodel) studio( "models/props/security_camera.mdl" ) = npc_security_camera : "Security Camera"
[
	spawnflags(Flags) = 
	[
		32 : "Autostart" : 1
	]	
	
	LookAtPlayerPings(boolean) : "Look at co-op player's pings instead" : "0" : "Instead of tracking the player, looks at the location of where a playing in co-op mode has placed his look marker. (co-op mode only)"
	TeamToLookAt(choices) : "Team Pings to Observe" : 2 : "Which team's pings to look at." =
	[
		1 : "Both"
		2 : "Orange"
		3 : "Blue"
	]
	
	TeamPlayerToLookAt(choices) : "Which team to follow" : 0 : "Which team the camera should follow." =
	[
		0 : "Both"
		2 : "Orange"
		3 : "Blue"
	]
	
	// Inputs
	input Enable(void) : "If closed, open."
	input Disable(void) : "If open, close."
	input Toggle(void) : "Toggle - If open, close. If closed, open."
	input Ragdoll(void) : "Disable and fall off the wall."
	
	input LookAtBlue(void) : "Make the camera only follow players on the blue team."
	input LookAtOrange(void) : "Make the camera only follow players on the orange team."
	input LookAllTeams(void) : "Make the camera follow all players."

	// Outputs
	output OnDeploy(void) : "Camera is becoming active and dangerous."
	output OnRetire(void) : "Camera is becoming inactive and harmless."
	output OnTaunted(void) : "This output will fire when any co-op player STARTS taunting the camera."
	output OnTauntedBlue(void) : "This output will fire when a co-op player on the BLUE team STARTS taunting the camera."
	output OnTauntedOrange(void) : "This output will fire when a co-op player on the ORANGE team STARTS taunting the camera."
	output OnTauntedFinished(void) : "This output will fire when any co-op player FINISHES taunting the camera."
	output OnTauntedBlueFinished(void) : "This output will fire when a co-op player on the BLUE team FINISHES taunting the camera."
	output OnTauntedOrangeFinished(void) : "This output will fire when a co-op player on the ORANGE team FINISHES taunting the camera."
]

@PointClass base(Targetname, Angles, Studiomodel) studio( "models/props/telescopic_arm.mdl" ) = prop_telescopic_arm : "Telescopic Arm"
[
	input Enable(void) : "Enable Thumper"
	input Disable(void) : "Disable Thumper"

	input SetTarget(string) : "Set the entity to target."
	input TargetPlayer(void) : "Set the player as the entity to target."

	output OnFoundTarget(void)  : "Arm has direct LOS to target entity."
	output OnLostTarget(void)   : "Arm has lost direct LOS to target entity."
]

@PointClass base(Targetname, Angles, Parentname, Global) studio( "models/props/Round_elevator_body.mdl" ) = prop_portal_stats_display : "Portal Stats Display"
[
	input Enable(void) : "Turn on and display the current stats"
	input Disable(void) : "Turn off stats display"

	input UpdateStats(void) : "Updates the stats to the player's current level stats"
	input ResetPlayerStats(void) : "Resets the curret level stats of the player"

	output OnMetPortalObjective(void)  : "Fired when enabled and player met the number of portal placements."
	output OnMetStepsObjective(void)  : "Fired when enabled and player met the number of foot steps."
	output OnMetSecondsObjective(void)  : "Fired when enabled and player met the number of seconds."
	output OnFailedAllObjectives(void)  : "Fired when enabled and player met no objectives."
]

@PointClass base(Targetname, Angles, Parentname) studio("models/editor/axis_helper_thick.mdl") = vgui_neurotoxin_countdown : "Neurotoxin Countdown"
[
	width(integer) : "Panel width" : 256 : "Width of the panel in units."
	height(integer) : "Panel height" : 128 : "Height of the panel in units."
	countdown(integer) : "Countdown time" : 60 : "Countdown time in seconds."

	input Enable(void) : "Make slideshow visible."
	input Disable(void) : "Make slideshow invisible."
]


///=============================================================================
//
// Special Effects
//
///=============================================================================

@PointClass base(Angles,Targetname,Parentname) = env_lightrail_endpoint : "Special effects for the endpoints of the lightrail."
[
	spawnflags(Flags) = 
	[
		1 : "Start On (w/ Small FX)" : 0
		//2 : "Start With Large FX" : 0
	]

	small_fx_scale(float) : "Scale Small FX" : 1 : "Scale of the small effect.  1 is the default size, 2 is twice that, etc."

	large_fx_scale(float) : "Scale Large FX" : 1 : "Scale of the large effect.  1 is the default size, 2 is twice that, etc."

	// Inputs
	input StartCharge(float) : "Start charging the endpoint from the small to large state over a specified amount of seconds."
	input StartSmallFX(void) : "Start discharging particles at the small effects state over specified number of seconds."
	input StartLargeFX(void) : "Start discharging particles at the large effects state over specified number of seconds."	
	input Stop(float) : "Stops the effect at any point."
]


///=============================================================================
//
// Credits
//
///=============================================================================

@PointClass base(Targetname) size(-8 -8 -8, 8 8 8) = env_portal_credits : 
	"An entity to control the rolling credits for portal."
[
	// Inputs
	input RollCredits(void) : "Start the intro credits rolling."
	input RollOutroCredits(void) : "Start the outro credits rolling."
	input ShowLogo(void) : "Show the HL2 logo."
	input RollPortalOutroCredits(void) : "Start the Portal greenscreen outro credits."
	
	// Outputs
	output OnCreditsDone(void)  : "Fired when the credits having finished rolling."
]



///=============================================================================
//
// Normally Obsolete..
//
///=============================================================================

@PointClass base(Targetname, Parentname) iconsprite("editor/info_lighting.vmt") = info_lighting_relative
[
	LightingLandmark(target_destination) : "Lighting Landmark" :  : "Entity at which the reference origin is contained. " +
									" If empty, the info_lighting_relative's origin will" +
									" be used."
]



@PointClass base(Targetname, Parentname, Studiomodel, Angles) studioprop() = prop_mirror : "A basic mirror model"
[
	Width(float) : "Width" : "64.0" : "The width of the mirror when there's no model"
	Height(float) : "Height" : "108.0" : "The height of the mirror when there's no model"
	PhysicsEnabled(boolean) : "Physics" : 0 : "Move physically"
] 

@NPCClass base(Parentname, BaseNPC) iconsprite("editor/bullseye.vmt") color(255 0 0) = npc_bullseye : "Bullseye"
[
	// Unlike other NPCs level designers are allowed to set the health on bullseyes
	health(Integer) : "Health" : 35

	minangle(string) : "Minimum Angle" : "360" : "Angle from the bullseye required for bullseye to be a valid enemy"
	mindist(string) : "Minimum Distance" : "0" : "Distance from the bullseye required for bullseye to be a valid enemy"

	autoaimradius(float) : "Autoaim Radius" : "0" : "Radius of autoaim influence. Use ent_autoaim <picker> to visualize."

	spawnflags(Flags) = 
	[
		65536   : "Not Solid" : 0
		131072  : "Take No Damage" : 0
		262144  : "Enemy Damage Only" : 0
		524288  : "Bleed" : 0
		1048576 : "Perfect Accuracy" : 0
		2097152 : "Collide against physics objects (Creates VPhysics Shadow)" : 0
	]
	output OnTargeted(void) : "Fires when targeted"
	output OnReleased(void) : "Fires when no longer targeted"
]