Difference between revisions of "Health and Damage"

From P2SR Wiki

(→‎Bombs: Updated info on Finale 4 bombs, some minor phrasing revisions)
m (→‎Goo: Typo fix and phrasing revision)
 
(2 intermediate revisions by the same user not shown)
Line 15: Line 15:
  
 
==Goo==
 
==Goo==
Goo (also known by other names, e.g. acid, toxic water) is first encountered in the Chapter 1 map [[Cube Momentum]] in single player / the Course 0 map [[Calibration]] in cooperative. Goo itself does not inflict damage, but a player damaging field is placed inside virtually all goo areas, usually slightly below the surface. Goo normally seems like certain death, as once a player makes contact with it, most levels offer no way to escape or recover. Despite this, the damaging field actually deals '''25''' damage at '''0.5''' second intervals, meaning players can swim in goo for less than '''1.5''' seconds without dying.
+
Goo (also known by other names, e.g. acid, toxic water) is first encountered in the Chapter 1 map [[Cube Momentum]] in single player / the Course 0 map [[Calibration]] in cooperative. Goo itself does not inflict damage, but a player damaging / player killing field is placed inside virtually all goo areas, typically slightly below the surface. Goo normally seems like certain death, as once a player makes contact with it, the design of most levels offers no way to escape the goo and recover. Despite this, most goo in single player uses a damaging field that deals '''25''' damage at '''0.5''' second intervals. This means players can swim in this (the most common) variety of goo for less than '''1.5''' seconds without dying.
  
 
One place where goo can be swam in and survived is [[Finale 1]]. If the player jumps towards the faith plate bouncing the cube, they can swim into one of the corners of the faith plate while looking at an upward angle and climb onto the platform, letting them recover from the damage. It is faster however to bunnyhop all the way to the platform, and goo swimming is currently not used in any speedrun routes. Swimming in goo is used in some full game least portal routes, but these routes acquire damage immunity first, rendering goo damage mechanics irrelevant.
 
One place where goo can be swam in and survived is [[Finale 1]]. If the player jumps towards the faith plate bouncing the cube, they can swim into one of the corners of the faith plate while looking at an upward angle and climb onto the platform, letting them recover from the damage. It is faster however to bunnyhop all the way to the platform, and goo swimming is currently not used in any speedrun routes. Swimming in goo is used in some full game least portal routes, but these routes acquire damage immunity first, rendering goo damage mechanics irrelevant.
 +
 +
A second variety of goo exists in the Old Aperture levels of single player (Chapters 6 and 7). While not visually different on the surface, making contact with goo in these Chapters browns-out the screen, causes the player to stop moving (even with e.g. noclip active), then forces a load to a previous save (or the start of the level in Challenge Mode). This effect does not change or interact with the <code>m_iHealth</code> variable, and will occur even if the player has a form of invincibility. This is technically not damage, but it essentially functions as an instant death field.
 +
 +
In cooperative, goo is instantly fatal, as touching it triggers an animation of the player sinking and exploding. There is currently no known way to legitimately gain invincibility in cooperative, but if it is activated via cheats, the player becomes stuck in a death loop until they disable invincibility and are able to respawn as per normal cooperative gameplay.
  
 
==Lasers==
 
==Lasers==

Latest revision as of 00:05, 14 August 2022

Health and Damage


Overview

While a less significant mechanic than most other first-person games, players in Portal 2 have a hidden health value that can be decreased by a handful of sources, leading to the player's death if it reaches zero. This generally only happens if a player takes sustained damage, as the player's health quickly recovers to full when not taking damage. The health and damage mechanics are identical in all modes of play (single player, cooperative, full game, challenge mode etc.), assuming no mods are in use.

Health Mechanics

The player's maximum and default health value is 100. If the player has not taken any damage for 1 second, they will recover 2 health every 1/30th of a second until their health is fully restored. Note that once a player begins their health recovery, it will continue recovering if the game is paused either with the Pause Game key or bringing up the menu (Esc); the timer to start recovery will not progress while paused, and healing while paused still stops once the player has 100 health.

Player health is stored in the variable m_iHealth. If a player takes exactly 100 unrecovered damage, this variable will be reduced to 0. If a player takes more than 100 damage, then m_iHealth will underflow to 65536 - the damage in excess of 100 (65536 = 2^16). For example, if a player takes 125 damage, m_iHealth will underflow to 65511. The value of m_iHealth, along with a large number of other fields, can be output onto the screen during play with the console command cl_pdump 1 (this command needs sv_cheats 1 to be set when playing in challenge mode).

Note that despite m_iHealth being labelled an integer, players seem able to take half-points of damage. The command hurtme x inflicts x amount of damage on the player, but the player's m_iHealth is only reduced by half of this value (e.g. hurtme 100 reduces the player's health by 50), which may relate to the player's ability to take damage in 0.5 point increments. All values on this page (except hurtme x) state the amount of health lost / gained.

Damage Sources

Damage sources reduce the player's health by a defined amount. There is no notable invincibility period between instances of damage, and multiple sources can damage the player at once, killing them more quickly (e.g. being shot by multiple turrets).

Goo

Goo (also known by other names, e.g. acid, toxic water) is first encountered in the Chapter 1 map Cube Momentum in single player / the Course 0 map Calibration in cooperative. Goo itself does not inflict damage, but a player damaging / player killing field is placed inside virtually all goo areas, typically slightly below the surface. Goo normally seems like certain death, as once a player makes contact with it, the design of most levels offers no way to escape the goo and recover. Despite this, most goo in single player uses a damaging field that deals 25 damage at 0.5 second intervals. This means players can swim in this (the most common) variety of goo for less than 1.5 seconds without dying.

One place where goo can be swam in and survived is Finale 1. If the player jumps towards the faith plate bouncing the cube, they can swim into one of the corners of the faith plate while looking at an upward angle and climb onto the platform, letting them recover from the damage. It is faster however to bunnyhop all the way to the platform, and goo swimming is currently not used in any speedrun routes. Swimming in goo is used in some full game least portal routes, but these routes acquire damage immunity first, rendering goo damage mechanics irrelevant.

A second variety of goo exists in the Old Aperture levels of single player (Chapters 6 and 7). While not visually different on the surface, making contact with goo in these Chapters browns-out the screen, causes the player to stop moving (even with e.g. noclip active), then forces a load to a previous save (or the start of the level in Challenge Mode). This effect does not change or interact with the m_iHealth variable, and will occur even if the player has a form of invincibility. This is technically not damage, but it essentially functions as an instant death field.

In cooperative, goo is instantly fatal, as touching it triggers an animation of the player sinking and exploding. There is currently no known way to legitimately gain invincibility in cooperative, but if it is activated via cheats, the player becomes stuck in a death loop until they disable invincibility and are able to respawn as per normal cooperative gameplay.

Lasers

Lasers (also called "thermal discouragement beams") are first encountered in the Chapter 2 map Laser Intro in single player / the Course 1 map Lasers in cooperative. Although generally used by the player as an asset, they deal 2.5 damage to a player on contact, meaning players can take 39 consecutive laser burns without dying, and produce a small knockback. Due to this knockback, players will die relatively slowly if pressing themselves against a laser in open space, and die more quickly in a position where the laser cannot push them away.

While lasers can destroy turrets, they do not inflict damage to them. If a laser makes contact with a turret, the turret's death animation is triggered (the turret catches fire). This animation completes and the turret explodes even if the laser only makes contact for a moment, so the laser can be redirected elsewhere (e.g. sweeping across multiple turrets quickly).

Turrets

Turrets are first encountered in the Chapter 3 map Turret Intro in single player / the Course 3 map Turret Walls in cooperative. They are the most common source of survivable damage in the game, and completing actions quickly before taking lethal damage (which acts like a timer) is a common technique in many speedrun and least portal routes. This includes exploiting the "wakeup" and "sleep mode" cycles that turrets have.

When a valid target enters a turret's vision (usually a player), they perform a wakeup animation that includes locking onto the target. This animation lasts approximately 2 seconds (exact duration varies) from being triggered to the turret opening fire. A turret deals 9 damage per bullet, and fires at 0.1 second intervals. This means players can take 11 consecutive bullets, or less than 1.1 seconds of sustained fire from a single turret, without dying. Each shot a turret misses increases this time, and taking fire from multiple turrets reduces this time. If a turret loses vision of valid targets for approximately 4 seconds (exact duration varies), it will perform a sleep mode animation lasting approximately 2 seconds (exact duration varies). A turret cannot fire during this animation or interrupt it, meaning that waking up a turret, leaving its vision, then re-entering its vision just as its sleep mode animation starts gives a player more time before taking fire, as the turret must complete its sleep mode animation before starting its wakeup animation. Picking up a turret interrupts most turret actions or animations (including shooting, but not burning to death), and immediately sets them in an awake state.

A turret also deals damage if it explodes (e.g. due to a laser). The maximum damage from this explosion seems to be 25.

Bombs

Bombs are first encountered in the Chapter 9 map Finale 3 in single player, and only appear in that map and the following map Finale 4 - they do not appear in cooperative. Active bombs are dropped from tubes in Finale 3, and fired by Wheatley in Finale 4 as his main form of offence. They explode on contact with a player, object or surface, and are capable of breaking certain scripted level assets (specifically gel tubes in Finale 3 and Finale 4), as well as Wheatley's monitors. Inactive bombs appear in the long excursion funnel near the end of Finale 3, but these cannot be detonated. Piles of active bombs also form Wheatley's final trap at the end of Finale 4, but these are cutscene assets that do not actually interact with health or damage.

The bombs in Finale 3 deal 9 damage on a direct hit, meaning players "could" take 11 consecutive direct hits without dying. It is not possible to be hit by this many consecutive bombs in Finale 3, meaning they cannot actually kill a player. This might be intended to make the bombs act as more of a puzzle element / foreshadowing during this map, instead of a lethal hazard.

The bombs in Finale 4 deal 22.5 damage on a direct hit, meaning players can take 4 consecutive direct hits without dying. Wheatley fires sets of 6 bombs at 1 second intervals, meaning players can take less than 4 seconds of bombardment without dying. Note that there is also a damaging field near Wheatley with its activation and deactivation tied to his bomb cycles. This invisible field deals 125 damage, sometimes making it appear like a single bomb killed the player.

Death Triggers

Various effects in the game will kill the player instantly, such as falling into bottomless pits or running down the timer for neurotoxin. Technically this is achieved by a player damaging field similar to goo - such fields will exist in bottomless pits statically, and a damaging field will be created when a neurotoxin timer runs out, covering the entire room filled with toxin.

These fields usually deal 125 damage, meaning they are instantly / unavoidably fatal to players under normal conditions.

Damage Immunity Glitch ("Betsrighter")

Include explanation of mechanics, execution and uses.