Editing Additions to existing entities

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
__NOEDITSECTION__
__NOEDITSECTION__
This page lists a number of additions to existing entities, including inputs, outputs, and keyvalues, as well as changes to the Input/Output system as a whole. Not to be confused with [[Custom Entities]], which are entirely new entities.
== Targeting ==
== Targeting ==


* You can target parent of specified entity by adding @p@. @p@!activator would target parent of the activator entity
* You can target parent of specified entity by adding @p@. @p@!activator would target parent of the activator entity
* You can target children of specified entity by adding @c@ prefix. @c@!activator would target children of the activator entity
* You can target children of specified entity by adding @c@ prefix. @c@!activator would target children of the activator entity
*Target all entities in a box by adding @bbxmin ymin zmin xmax ymax zmax@ prefix. @bb-100 -100 -100 100 100 100@prop_dynamic would target prop_dynamic entities inside -100 -100 -100 100 100 100 world coordinates box
*Target all entities in a box by adding @bbxmin ymin zmin xmax ymax zmax@ prefix. @bb-100 -100 -100 100 100 100@prop_dynamic would target prop_dynamic entities inside -100 -100 -100 100 100 100 box
*Target entities matching the filter by adding @f@ prefix. @f@filtername@entityname would target all entityname that pass the filtername filter
*Target entities matching the filter by adding @f@ prefix. @f@filtername@entityname would target all entityname that pass the filtername filter
*Target entity from datamap/sendprop by adding @e@ prefix. @e@m_hOwnerEntity@!activator would target the owner entity of !activator. You can also target in array with $. @e@m_hMyWeapons$1@!activator would target secondary weapon of !activator.
*Target entity from datamap/sendprop by adding @e@ prefix. @e@m_hOwnerEntity@!activator would target the owner entity of !activator. You can also target in array with $. @e@m_hMyWeapons$1@!activator would target secondary weapon of !activator.
Line 19: Line 16:


==point_viewcontrol==
==point_viewcontrol==
=== Keyvalues ===
* $allowdamage <1/0>
** Should the player/s operating the camera receive damage. 0 by default


===Inputs ===
===Inputs ===
Line 37: Line 29:
===Spawnflags===
===Spawnflags===
*'''[64]''' - Spawn as mini-sentry
*'''[64]''' - Spawn as mini-sentry
=== Keyvalues ===
* $attributeoverride <1/0>
** Ignores player attributes and uses keyvalues below instead
*$fireratemult <float>
**Bullet fire rate multiplier
*$rangemult <float>
**range multiplier
*$damagemult <float>
**Damage multiplier
*$maxlevel <int>
**Maximum level
*$rapidfire <1/0>
**Allow firing every tick, rather than after every 3rd tick
*$ammomult <float>
**Ammo multiplier
*$rocketfireratemult <float>
**Rocket fire rate multiplier
*$bulletweapon <string>
**Use a specific weapon name as bullet attack, can be a custom weapon
*$rocketweapon <string>
**Use a specific weapon name as rocket attack, can be a custom weapon
*$allowplayerattributes <1/0>
**Fix for player dependent attributes not working on custom weapon
*$weaponnosound <1/0>
**Disable fire sounds of custom weapon
*$sentrymodelprefix <string>
**Sentry model prefix
**Example: models/buildables/sentry
*$projspeedmult <float>
**Sentry rocket speed multiplier
*$cannotbesapped <1/0>
**This building cannot be sapped
=== Outputs ===
*$OnShootBullet
**Called when the sentry shoots a bullet, the sentry is  <code>!activator</code>
*$OnShootRocket
**Called when the sentry shoots a rocket, the projectile is  <code>!activator</code>
*$OnShootWeaponBullet
**Called when the sentry shoots a bullet weapon, the projectile is <code>!activator</code>
*$OnShootWeaponRocket
**Called when the sentry shoots a rocket weapon, the projectile is  <code>!activator</code>
== Teleporter (obj_teleporter) ==
===Keyvalues===
*$TeleportWhere <string>
**Teleport bots from specified botspawn name. It is possible to add multiple TeleportWhere keys. "all" name will teleport all bots, "small" will teleport all small bots, "giants" will teleport giants and their squad
*$attributeoverride <1/0>
** Ignores player attributes and uses keyvalues below instead
*$bidirectional <1/0>
**If the teleport can be used in both directions
*$maxlevel <int>
**Maximum level
*$rechargeratemult <float>
**Recharge rate multiplier
*$speedboost <1/0>
**Apply 4s speed boost after exiting teleporter
*$teleportermodelprefix <string>
**Teleporter model prefix
**Example: models/buildables/teleporter
*$cannotbesapped <1/0>
**This building cannot be sapped
=== Outputs ===
*$OnTeleportReceive
**Teleport exit calls this when it receives a player, the player is  <code>!activator</code>
== Dispenser (obj_dispenser) ==
===Keyvalues===
* $attributeoverride <1/0>
** Ignores player attributes and uses keyvalues below instead
*$radiusmult <float>
**Dispenser radius multiplier
*$maxlevel <int>
**Maximum level
*$ratemult <float>
**Dispenser provided health/ammo multiplier
*$dispensermodelprefix<string>
**Dispenser model prefix
**Example: models/buildables/dispenser
*$cannotbesapped <1/0>
**This building cannot be sapped


==Weapon Mimic (tf_point_weapon_mimic)==
==Weapon Mimic (tf_point_weapon_mimic)==
Line 133: Line 35:
* Fired stickybombs are automatically removed if the mimic is removed
* Fired stickybombs are automatically removed if the mimic is removed
*Added projectile type 4 - Bullet.  SpeedMax keyvalue determines max distance (infinite if not specified). SplashRadius determines knockback force
*Added projectile type 4 - Bullet.  SpeedMax keyvalue determines max distance (infinite if not specified). SplashRadius determines knockback force
*It is possible to mimic a specific weapon. Setting owner might be required for the weapon to function properly. Setting a mimic weapon disables all other mimic properties except crits


=== Keyvalues===
=== Keyvalues===
Line 143: Line 44:
*$killicon <string>  
*$killicon <string>  
**Set custom kill icon
**Set custom kill icon
*$weaponname <string>
**Set mimic weapon name, custom weapon names are allowed.
**Example: The Righteous Bison
**Some weapons (flamethrowers) will not work.
**If the mimic owner is not set, some weapons (The Dragon's Fury) will crash the game, or break in other ways
*$firetime <float>
**Delay between shots for $StartFiring input
*$weaponnosound <1/0>
**If set, disables weapon fire sound
=== Inputs ===
* $AddWeaponAttribute <string>
** Adds attribute to the mimic weapon, example: projectile speed increased|2
*$RemoveWeaponAttribute <string>
** Remove attribute from the mimic weapon, example: projectile speed increased
*$StartFiring <int>
**Starts firing automatically specified number of projectiles, 1 minimum, with $firetime delay between shots
*$StopFiring
**Stops firing automatically


===Outputs===
===Outputs===
Line 175: Line 56:


*When tank starts deploying, and there is at least one PointTemplate assigned to it, "OnUser4" output is activated
*When tank starts deploying, and there is at least one PointTemplate assigned to it, "OnUser4" output is activated
=== Inputs ===
*$SetGravity <float>
**Set tank gravity. Only for wave spawned tanks
*$SetImmobile <1/0>
**Set if the tank is immobile. Only for wave spawned tanks
*$SetOffsetZ <1/0>
**Set tank offset Z. Only for wave spawned tanks
*$SetTurnRate <1/0>
**Set tank turn rate. Only for wave spawned tanks


=== Outputs===
=== Outputs===
Line 278: Line 149:
*$HideMenu <entity>
*$HideMenu <entity>
**Hide menu at player
**Hide menu at player
*$BitTest <number>
**Fires all cases where after the bitwise AND operation between the parameter and the case value, the result is not 0
* $BitTestAll <number>
** Fires all cases where after the bitwise AND operation between the parameter and the case value, the result is same as the parameter


==tf_gamerules ==
==tf_gamerules ==
Line 302: Line 168:
*$AddCurrencyGlobal <int>
*$AddCurrencyGlobal <int>
**Add currency to all players
**Add currency to all players
*$ChangeLevel <string>
**Changes level. To set a specific mission, type the mission name after | . Example: mvm_bigrock|advanced1


== player ==
== player ==
Line 402: Line 266:
*$BotCommand <string>
*$BotCommand <string>
**Forces the bot to perform an action. Examples:
**Forces the bot to perform an action. Examples:
***interrupt_action -posent targetmove -lookposent targetlook -duration 10 -waituntildone -ondoneattributes AfterDone -name myname
***interrupt_action -posent targetmove -lookposent targetlook -duration 10 -waituntildone -ondoneattributes AfterDone
****Move to entity targetmove, while looking at entity targetlook. Wait 10 seconds after moving to the target entity, then ChangeAttributes to AfterDone, and fire $onactiondone output with myname as parameter
****Move to entity targetmove, while looking at entity targetlook. Wait 10 seconds after moving to the target entity, then ChangeAttributes to AfterDone
***interrupt_action -posent targetkill -lookposent targetkill -killlook -waituntildone -alwayslook -distance 500
***interrupt_action -posent targetkill -lookposent targetkill -killlook
****Move to entity targetkill and try to destroy it. Always look at the target even if not in sight. Only move up to 500 units away from the target
****Move to entity targetkill and try to destroy it
***interrupt_action -pos 0 0 0 -lookpos 100 100 100 -duration 10
***interrupt_action -pos 0 0 0 -lookpos 100 100 100
****Move to position 0 0 0 while looking at position 100 100 100 for the next 10 seconds
****Move to position 0 0 0 while looking at position 100 100 100
***interrupt_action_queue -pos 0 0 0 -lookpos 100 100 100 -duration 10
****Same as above, but add the action to the queue so it is only done when the previous interrupt action finishes
***clear_interrupt_action_queue
****Clears interrupt action queue added by above command
***remove_interrupt_action_queue_name name
****Delete from interrupt action queue if name matches
***stop interrupt action
****Stops current interrupt action
***switch_action action
****switch to different action. Sometimes this may fail (such as when the bot is carrying the bomb):
*****Default
*****FetchFlag
*****EscortFlag
*****PushToCapturePoint
*****Mobber
*****Spy
*****Sniper
*****SuicideBomber
*****Idle
*****Passive
*****Medic
***despawn
***despawn
****Forces to bot to despawn
****Forces to bot to despawn
Line 440: Line 283:
****Forces the spy bot to disguise as something
****Forces the spy bot to disguise as something
***build sentry at nearest sentry hint
***build sentry at nearest sentry hint
*$Taunt
**Forces the player to taunt
*$TauntFromItem <string>
**Forces the player to taunt with specified item name. Also allows to insert attributes separated by |. Example: Conga Taunt|taunt move speed|1000
*$TauntIndexConcept <string>
**Forces the player to taunt with specified index and concept. Example: 0|0
*$TauntFromItem2 <string>
**Forces the player to taunt with specified item index. Also allows to modify attack time for "taunt attack". Example: 1179|-0.5
*$AwardExtraItem <string>
**Awards extra loadout item with specified name to the player
*$AwardAndGiveExtraItem <string>
**Awards extra loadout item with specified name to the player, and equips it
*$StripExtraItem <string>
**Strips extra loadout item with specified name from the player
*$ResetExtraItems
**Strips all extra loadout items from the player
*$Stun <float>
**Stun player for specified duration in seconds
*$Slowdown <string>
**Slowdowns player by specified amount for specified duration
**Parameter format: slowdown|duration
*$SetFOV <int>
**Sets player FOV to specified amount. 0 FOV restores original fov
*$SetFOVDuration <string>
**Sets player FOV with zoom in duration and starting FOV
**Parameter format: fov|duration|start fov
=== Outputs ===
* $OnActionDone <string>
** Called when interrupt action finishes, the string parameter is a name of the interrupt action


==trigger_hurt==
==trigger_hurt==
Line 495: Line 307:
==game_ui==
==game_ui==
The server will no longer crash if the player using the entity disconnected from the server
The server will no longer crash if the player using the entity disconnected from the server
== env_entity_maker ==
=== Keyvalues ===
* $autoparent <1/0>
** When the PointTemplate template is spawned via ForceSpawnAtEntityOrigin, the template entities will be automatically parented
* $Param(name) <string>
** Sets PointTemplate template param to a specified value
== item_teamflag ==
=== Keyvalues ===
* $filter <entity>
** Targetname of a filter that defines if player can pick up the flag
*$disablebuffs <1/0>
**If bomb buffs should be disabled
=== Outputs ===
*$OnPickup
**OnPickup but with player as activator
*$OnDrop
**OnDrop but with player as activator
*$OnBombUpgradeLevel1
**Called when the bomb is upgraded to level 1
*$OnBombUpgradeLevel2
**Called when the bomb is upgraded to level 2
*$OnBombUpgradeLevel3
**Called when the bomb is upgraded to level 3
== func_flagdetectionzone ==
=== Keyvalues ===
* $filter <entity>
** Targetname of a filter that defines if flag triggers the zone
*$filterplayer <entity>
** Targetname of a filter that defines if player with flag triggers the zone
== point_push ==
=== Keyvalues ===
* $filter <entity>
** Targetname of a filter that defines if entity should be pushed
== Health kits / ammo packs ==
=== Keyvalues ===
* $ratio <float>
** Custom health/ammo restore ratio, instead of default 0.2/0.5/1
== point_populator_interface ==
=== Inputs ===
* $CollectCash
** Collects all dropped cash
*$FinishWave
**Finishes current wave immediately
*$FinishWaveNoUnspawnedMoney
**Finishes current wave and does not give money for unspawned bots
*$JumpToWave <int>
**Jumps to specified wave
*$JumpToWaveCalculateMoney <int>
**Jumps to specified wave and calculates wave money, without giving bonuses
*$PauseWavespawn <string>
**Pauses WaveSpawns with given name. Paused wave spawns don't consume bot slots
*$ResumeWavespawn <string>
**Resumes WaveSpawns with given name.
*$ReduceFromWavespawn$(wavespawn name) <int>
**Reduces specified amount of unspawned bots from given WaveSpawns and distributes its money
*$FinishWavespawn <string>
**Removes all unspawned bots from given WaveSpawns and distributes money
*$KillWavespawn <string>
**Removes all entities spawned by given WaveSpawns


==All entities ==
==All entities ==
Line 600: Line 333:
*$SetOwner <entity>
*$SetOwner <entity>
** Set entity owner
** Set entity owner
*$ClearOwner
** Remove entity owner
*$InheritOwner <entity>  
*$InheritOwner <entity>  
**Set entity owner to the passed entity owner
**Set entity owner to the passed entity owner
Line 627: Line 358:
**Rotate relative to parent (world)
**Rotate relative to parent (world)
*$GetEntIndex <string>
*$GetEntIndex <string>
**Triggers the input of an entity, with entity index as parameter
**parameter format: entity|input
**parameter format: entity|input
**example: !activator|$DisplayTextCenter
**example: !activator|$DisplayTextCenter
**Triggers the input of an entity, with entity index as parameter
*$RemoveOutput <string>
*$RemoveOutput <string>
**remove outputs with given name
**remove outputs with given name
Line 641: Line 372:
**Set keyvalue to specified value
**Set keyvalue to specified value
*$GetKey$(keyvalue name) <string>
*$GetKey$(keyvalue name) <string>
**Trigger the input of an entity, with keyvalue as a parameter (default value if not found)
**example: $GetKey$startdisabled
**parameter format: entity|input|default value
**parameter format: entity|input|default value
**example: !activator|$DisplayTextCenter|def
**example: !activator|$DisplayTextCenter|def
** Trigger the input of an entity, with keyvalue as a paramer (default value if not found)
*$SetVar$(variable name) <string>  
*$SetVar$(variable name) <string>  
**Set custom entity variable
**Set custom entity variable
*$GetVar$(variable name) <string>
*$GetVar$(variable name) <string>
**Trigger the input of an entity, with custom variable as set with $SetVar as a parameter (default value if not found)
**example: $GetVar$customvar
**parameter format: entity|input|default value
**parameter format: entity|input|default value
**parameter example: !activator|$DisplayTextCenter|def
**example: !activator|$DisplayTextCenter|def
**Trigger the input of an entity, with variable as a paramer (default value if not found)
*$SetData$([https://raw.githubusercontent.com/powerlord/tf2-data/master/datamaps.txt datamap] prop name) <string>
*$SetData$([https://raw.githubusercontent.com/powerlord/tf2-data/master/datamaps.txt datamap] prop name) <string>
**Set datamap property to specified value
**Set datamap property to specified value
*$GetData$([https://raw.githubusercontent.com/powerlord/tf2-data/master/datamaps.txt datamap] prop name) <string>
*$GetData$([https://raw.githubusercontent.com/powerlord/tf2-data/master/datamaps.txt datamap] prop name) <string>
**Trigger the input of an entity, with datamap prop as a parameter (default value if not found)
**example: $GetData$m_szNetname
***Unlike send props, datamaps do not have arrays.
**parameter format: entity|input|default value
**parameter format: entity|input|default value
**parameter example: !activator|$DisplayTextCenter|def
**example: !activator|$DisplayTextCenter|def
***Default value is not required to be defined, but can be useful for debugging.
**Trigger the input of an entity, with datamap prop as a paramer (default value if not found)
*$SetProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name)[$(array)] <string>
*$SetProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name)[$(array)] <string>
**Set send property to specified value. Can also set arrays.
**Set send property to specified value. Can also set arrays.
Line 668: Line 394:
***sets player ammo type array to 3, which is metal carried
***sets player ammo type array to 3, which is metal carried
*$GetProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name)[$(array)] <string>
*$GetProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name)[$(array)] <string>
**Trigger the input of an entity, with the specified send prop's value as a parameter (default value if not found)
**example without array: $GetProp$m_bInUpgradeZone
**example with an array: $GetProp$m_iAmmo$3
**parameter format: entity|input|default value
**parameter format: entity|input|default value
**parameter example: !activator|$DisplayTextCenter|def
**example: !activator|$DisplayTextCenter|def
***Default value is not required to be defined, but can be useful for debugging.
**Trigger the input of an entity, with send prop as a paramer (default value if not found)
*$SetClientProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name)[$(array)] <string>
*$SetClientProp$([https://raw.githubusercontent.com/powerlord/tf2-data/master/netprops.txt send prop] name)[$(array)] <string>
**Set fake send prop value only seen by players. Can also set arrays. Useful for setting fake mission name or wave number, as $SetProp would trigger unwanted behavior  
**Set fake send prop value only seen by players. Can also set arrays. Useful for setting fake mission name or wave number, as $SetProp would trigger unwanted behavior  
Line 695: Line 418:
**Hides this entity to all players by default
**Hides this entity to all players by default
*$ShowToAll
*$ShowToAll
**Shows previously hidden entity to all players
**Shows previo<u>usly hidden entity to all players</u>
*$VScriptFunc$function <string>
**Executes a VScript function with a single parameter, equivalent to <code>runscriptcode function(param)</code> input
*$StopParticleEffects
**Stops attached particle effects, some effects are not stoppable
*$SetSolidFlags <int>
**Set solid flags
*$SetSolid <int>
**Set solid type


===Outputs===
===Outputs===
Please note that all contributions to SigMod are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see SigMod:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)