Undocumented Keypairs and Entities
Quote from sicklebrick on November 11, 2013, 1:08 pmJust for fun I was tracing through Portal2's keypair parser and found a bunch of interesting undocumented functions you can play with. Some like rendercolor have been around since the early days, and other seem to be specific to Portal 2. I can't guarantee their usefulness or how dependable they are, but it's just a bit of fun.
Addoutputs:
Use from console like: ent_fire !player addoutput "rendercolor 255 0 0"
Or in hammer like: OnWhatever, !player, addoutput , rendercolor 255 0 0
//Don't use quotes in hammer."RenderColor"
-Changes the colour (yes colour!) of most entities during play
-Format: Red (0-255) Green (0-255) Blue (0-255)
-ent_fire !picker addoutput "rendercolor 0 255 0" is blue for example"MoveType"
-Changes the player's movement type, not all values are valid, but it's good fun.
-Format: MoveType (0 - ~14)
- 0= stuck
- 1= normal
- 2= normal
- 3= stuck
- 4= floating like ExFu glitch (no speed limit)
- 5= can move backwards, and that's about it
- 6= normalish
- 7= stuck
- 8= noclip (without noclip console command)
- 9= normalish
- 10= stuck
- ..."BaseVelocity"
-Sets the player's movement speed to these values:
-Format x,y,z (positive Z is up)
-ent_fire !player addoutput "basevelocity 0 100 2000""View_Ofs"
-Offsets your player model and camera from the physical player object
-I.e. player can be against a wall, and cam/gun can be through it or elsewhere
-Format x,y,z"gravity"
-Changes the player's gravity scale - player only
-Format: 1 is normal scale, 0.1 is a tenth, 100 is 100 times, etc."solid"
-Changes the player or an object's solidity, alllowing you to clip through.
-Objects will fall through the ground and die.
-Format: 0=nonsolid, 1=solid"modelscale" (old)
-Changes the scale of any given model, i.e. a companion cube.
-Does not affect physmodel, and often requires weird triggers before you can see
-changes (e.g. picking it up)
-Format: x,y,z (1,1,1 is default)"spawnflags" (old)
-Changes the bimask of the flags you see in the hammer editor
-(last tab with checkboxes)
-Format: Different for most things
-Example: ent_fire !picker addoutput "spawnflags 256" will make most things carryable"modelindex" (old)
-Changes the model of an object to a given index.
-It'll pick from the list of currently loaded objects, i.e. 1 is usually your ASHPD.
-Format: ent_fire !picker addoutput "modelindex 1"Other unknowns, or ones I didnt check:
"texframeindex"
-Probably changes the frame of the texture on a given object."target"
-likely a generic entity for NPC's, faith plates, etc"waterlevel"
-seems to make no odds in Portal 2"ltime"
-beats me"avelocity"
I assume it's angular velocity, but doesn't seem to make any difference.Missing and incomplete entities:
(Warning -can be crashy)Use with "ent_create mortarshell" for example
mortarshell
- Crashes game. Seems to be a throwback from HL2.
- Message = Debug string: Unable to load sprite material materials/sprites/physbeam.vmt!
- Message = Debug string: PrecacheScriptSound 'Weapon_Mortar.Impact' failed, no such sound script entryspraycan
-You can 'spawn' it, but there's no model and it vanishes instantly
-i.e. you can't find or rename it afterwardsenv_ragdoll_boogie
-Right?! I want this, seems to be an old one, but I want it.weapon_paintgun
-Not spawnable, but it's referenced in the game binay maybe a dozen times.
-Also in the FGD (hammer) IIRC.NPC_hoverturret
-Not spawnableYou can find a few more via dumpentityfactories for yourself.
I was going to end this with a few undocumented vscript functions, but none of them seem to do a damn thing, so lemme know if you find any
Just for fun I was tracing through Portal2's keypair parser and found a bunch of interesting undocumented functions you can play with. Some like rendercolor have been around since the early days, and other seem to be specific to Portal 2. I can't guarantee their usefulness or how dependable they are, but it's just a bit of fun.
Addoutputs:
Use from console like: ent_fire !player addoutput "rendercolor 255 0 0"
Or in hammer like: OnWhatever, !player, addoutput , rendercolor 255 0 0
//Don't use quotes in hammer.
"RenderColor"
-Changes the colour (yes colour!) of most entities during play
-Format: Red (0-255) Green (0-255) Blue (0-255)
-ent_fire !picker addoutput "rendercolor 0 255 0" is blue for example
"MoveType"
-Changes the player's movement type, not all values are valid, but it's good fun.
-Format: MoveType (0 - ~14)
- 0= stuck
- 1= normal
- 2= normal
- 3= stuck
- 4= floating like ExFu glitch (no speed limit)
- 5= can move backwards, and that's about it
- 6= normalish
- 7= stuck
- 8= noclip (without noclip console command)
- 9= normalish
- 10= stuck
- ...
"BaseVelocity"
-Sets the player's movement speed to these values:
-Format x,y,z (positive Z is up)
-ent_fire !player addoutput "basevelocity 0 100 2000"
"View_Ofs"
-Offsets your player model and camera from the physical player object
-I.e. player can be against a wall, and cam/gun can be through it or elsewhere
-Format x,y,z
"gravity"
-Changes the player's gravity scale - player only
-Format: 1 is normal scale, 0.1 is a tenth, 100 is 100 times, etc.
"solid"
-Changes the player or an object's solidity, alllowing you to clip through.
-Objects will fall through the ground and die.
-Format: 0=nonsolid, 1=solid
"modelscale" (old)
-Changes the scale of any given model, i.e. a companion cube.
-Does not affect physmodel, and often requires weird triggers before you can see
-changes (e.g. picking it up)
-Format: x,y,z (1,1,1 is default)
"spawnflags" (old)
-Changes the bimask of the flags you see in the hammer editor
-(last tab with checkboxes)
-Format: Different for most things
-Example: ent_fire !picker addoutput "spawnflags 256" will make most things carryable
"modelindex" (old)
-Changes the model of an object to a given index.
-It'll pick from the list of currently loaded objects, i.e. 1 is usually your ASHPD.
-Format: ent_fire !picker addoutput "modelindex 1"
Other unknowns, or ones I didnt check:
"texframeindex"
-Probably changes the frame of the texture on a given object.
"target"
-likely a generic entity for NPC's, faith plates, etc
"waterlevel"
-seems to make no odds in Portal 2
"ltime"
-beats me
"avelocity"
I assume it's angular velocity, but doesn't seem to make any difference.
Missing and incomplete entities:
(Warning -can be crashy)
Use with "ent_create mortarshell" for example
mortarshell
- Crashes game. Seems to be a throwback from HL2.
- Message = Debug string: Unable to load sprite material materials/sprites/physbeam.vmt!
- Message = Debug string: PrecacheScriptSound 'Weapon_Mortar.Impact' failed, no such sound script entry
spraycan
-You can 'spawn' it, but there's no model and it vanishes instantly
-i.e. you can't find or rename it afterwards
env_ragdoll_boogie
-Right?! I want this, seems to be an old one, but I want it.
weapon_paintgun
-Not spawnable, but it's referenced in the game binay maybe a dozen times.
-Also in the FGD (hammer) IIRC.
NPC_hoverturret
-Not spawnable
You can find a few more via dumpentityfactories for yourself.
I was going to end this with a few undocumented vscript functions, but none of them seem to do a damn thing, so lemme know if you find any
Quote from ChickenMobile on November 12, 2013, 1:20 amInteresting. I wonder what ltime is?
Interesting. I wonder what ltime is?
Quote from XANADryden on March 18, 2021, 3:09 pmThe SprayCan (according to the source engine code leak) was a entity used for applying decals in the early days of the Source Engine. When I say early days, I mean it was made as a temporary entity to be used for a pre-alpha CD for Source itself.
The file (line 5569)
UPDATE: After searching more, I found that the PaintCan is actually still used for player sprays. It is the entity for the sprays themselves, and functions similarly to the flashlight entity in HL2. line 5917 defines the spray command.
The SprayCan (according to the source engine code leak) was a entity used for applying decals in the early days of the Source Engine. When I say early days, I mean it was made as a temporary entity to be used for a pre-alpha CD for Source itself.
The file (line 5569)
UPDATE: After searching more, I found that the PaintCan is actually still used for player sprays. It is the entity for the sprays themselves, and functions similarly to the flashlight entity in HL2. line 5917 defines the spray command.