Difference between revisions of "Energy"

From UFOpaedia
Jump to navigation Jump to search
m (→‎Recovery: - Removed the word "base" to avoid confusion as this generally means the maximum value)
(→‎Weirdities: a signed short int would be 32767.)
 
(18 intermediate revisions by 9 users not shown)
Line 1: Line 1:
Energy, or stamina, refers to your soldier's abiity to sustain intense movement over several turns. Energy is <b>only</b> spent when a soldier <b>walks</b>. No other action uses energy. More energy and time units are spent depending on the difficulty of the terrain traversed.
+
The Energy or Stamina bar represents the soldier's current level of tiredness. A full bar will mean that the soldier is not tired, while an empty bar means that the soldier is exhausted. A soldier's actions are limited by both energy and TUs; if you have depleted one or both of these stats, then you will not be able to preform any actions.
 +
 
 +
The primary actions that will consume energy are walking, or flying when wearing the [[Flying Suit]]. Some aliens will also lose energy when simply changing their facing. Changing your elevation by means of a lift or Flying Suit will not consume energy, nor will firing weaponry. Energy and [[Time Unit]] costs for walking will vary depending on the difficulty of the terrain being traversed and the type of unit that is traversing it.
 +
 
 +
Note that the soldier stat screen refers to the stat as ''Stamina'', while it is referred to as ''Energy'' in the battlescape. They are otherwise used interchangeably.  
 +
 
  
 
==Starting Values==
 
==Starting Values==
 
New recruits will always begin with a value between 40 and 70.
 
New recruits will always begin with a value between 40 and 70.
 +
 +
 +
==Improvement==
 +
 +
Energy points are awarded (at end of mission) any time you perform at least one [[Experience#How_Experience_Points_Are_Applied|primary action]]. Just one action is enough - additional ones do not cause more points to be awarded.
 +
 +
The possible points earned are dependent on your current Energy. At recruit minimum (40 Energy), an average of 4.0 points are earned. This slopes evenly down to where, at cap minus one (99), an average of 1.0 points are earned (range 0-2).
 +
  
 
==Maximum Caps==
 
==Maximum Caps==
An X-COM soldier's energy is capped at 100.
+
A soldier's Energy [[Experience#Regarding_Caps|caps]] at 100, but it is possible to 'overflow' the cap by one point on the last combat when you go over the cap. On average, you have a 33% chance of getting capped at 101 instead of 100. Once at 100+, all Energy/Stamina improvements cease.
 +
 
  
 
==Usage==
 
==Usage==
For X-COM soldiers, Energy Units (EUs) are used at half the rate of [[TU|TUs]]. The actual formula relies on unitref.dat offset [45].
+
For X-COM soldiers, Energy Units (EUs) are used at half the rate of [[Time Units]]. The actual formula relies on [[UNITREF.DAT|unitref.dat]] offset [45]:
  
 
  '''Formula:'''
 
  '''Formula:'''
 
   
 
   
  Energy Used = INT( TUs_Used / 2^unitref[45])
+
  Energy Used = INT( TUs_Used / 2<sup>unitref[45]</sup>)
 
   
 
   
  
Line 19: Line 33:
 
  All X-COM units have a unitref[45]=1.  
 
  All X-COM units have a unitref[45]=1.  
 
  Crossing a standard tile to an adjacent one uses 4 TUs.
 
  Crossing a standard tile to an adjacent one uses 4 TUs.
  This means that they will use INT(4 / 2^1) = 2 EUs.
+
  This means that they will use INT(4 / 2<sup>1</sup>) = 2 EUs.
 +
 
 +
Aliens can have different values for unitref[45] (depending on race - no one's bothered to document these yet). Many appear to have 0, which means they use a 1:1 ratio of Energy to TUs. Such aliens even need 1 EU to turn one facing (a 1 TU action), unlike X-COM soldiers. A few have been seen to have values of 2 or higher. With a value of 2, they don't use energy when walking to adjacent tiles, only diagonally. Values of 3+ result in little or no Energy usage; 4+ (2<sup>4</sup>=16) will make even the most TU-expensive tiles ([[Time Units#Time_Unit_Walking_Usage_Tables|12 TUs]]) cost 0 energy.
  
Aliens can have different values for unitref[45]. Many appear to have 0, which means they use a 1:1 ratio of Energy to TUs. Such aliens even need 1 EU to turn one facing (a 1 TU action), unlike XCOM soldiers. A few have been seen to have values of 2 or higher. With a value of 2, they don't use energy when walking to adjacent tiles, only diagonally. Values of 3+ result in 0 EUs no matter the action.
 
  
 
==Fatal Wounds==
 
==Fatal Wounds==
 
Each fatal wound to the body reduces the soldier's energy by 10%.
 
Each fatal wound to the body reduces the soldier's energy by 10%.
 +
  
 
== Recovery ==
 
== Recovery ==
A soldier's ability to recover energy is determined by the soldier's <b>Initial </b>[[TU|Time Units]]. Thus, their raw recruit TU value dictates this throughout their career. You can see initial TUs on the Soldier tab (Strategic view) as the darker part of the TU bar.
+
A soldier's ability to recover energy is determined by the soldier's '''Initial''' [[Time Units]]. Thus, their raw recruit TU value dictates this throughout their career. You can see initial TUs on the Soldier tab (Strategic view) as the darker part of the TU bar.
  
 
  '''Formula:'''
 
  '''Formula:'''
Line 60: Line 76:
 
Energy can also be recovered by way of stimulants from a [[Medi-Kit]].
 
Energy can also be recovered by way of stimulants from a [[Medi-Kit]].
  
==Improvement==
 
  
Energy points are awarded (at end of mission) any time you perform at least one primary action (see [[Experience#How_Experience_Points_Are_Applied|Experience]]). Just one is enough - additional actions do not cause more points to be applied.
+
==Weirdities==
 +
The stamina/energy stat displays erratic behavior in battles if pumped up far beyond the cap value, by using a [[game editors|cheat/editor]].
 +
 
 +
Up to 179 (including) all is well. But if the stamina is set to 180 the soldier will start with '''zero''' energy and will be unable to move.
 +
 
 +
Each turn the energy level will fill up (providing the soldier didn't move around too much) but when reaching the infamous byte barrier at 255 it will drop back all the way to zero again.
 +
 
 +
Going beyond initial 180 stamina maintains this behavior, except that instead starting with 0 energy the soldier will start with (Stamina - 180).  
  
The possible points earned are dependent on your current Energy. At recruit minimum (Stamina=40), an average of 3.1 points are earned (range 0-6). At cap minus one (69), an average of 1.0 points are earned (range 0-2). Thus it is possible to have a value of 101 (cap+1).
+
It doesn't matter how the too-high stamina is formed - either the original stat pumped up, or the improvement stamina or combination of both.
  
See Also: [[TU|Time Units]], [[Medi-Kit]]
+
==See Also==
 +
*[[Time Units]]
 +
*[[Medi-Kit]]
  
  
 +
{{Unit Stats Navbar}}
 
[[Category:Soldiers]]
 
[[Category:Soldiers]]
 +
[[Category:Enemy Unknown/UFO Defense]]

Latest revision as of 09:08, 7 July 2014

The Energy or Stamina bar represents the soldier's current level of tiredness. A full bar will mean that the soldier is not tired, while an empty bar means that the soldier is exhausted. A soldier's actions are limited by both energy and TUs; if you have depleted one or both of these stats, then you will not be able to preform any actions.

The primary actions that will consume energy are walking, or flying when wearing the Flying Suit. Some aliens will also lose energy when simply changing their facing. Changing your elevation by means of a lift or Flying Suit will not consume energy, nor will firing weaponry. Energy and Time Unit costs for walking will vary depending on the difficulty of the terrain being traversed and the type of unit that is traversing it.

Note that the soldier stat screen refers to the stat as Stamina, while it is referred to as Energy in the battlescape. They are otherwise used interchangeably.


Starting Values

New recruits will always begin with a value between 40 and 70.


Improvement

Energy points are awarded (at end of mission) any time you perform at least one primary action. Just one action is enough - additional ones do not cause more points to be awarded.

The possible points earned are dependent on your current Energy. At recruit minimum (40 Energy), an average of 4.0 points are earned. This slopes evenly down to where, at cap minus one (99), an average of 1.0 points are earned (range 0-2).


Maximum Caps

A soldier's Energy caps at 100, but it is possible to 'overflow' the cap by one point on the last combat when you go over the cap. On average, you have a 33% chance of getting capped at 101 instead of 100. Once at 100+, all Energy/Stamina improvements cease.


Usage

For X-COM soldiers, Energy Units (EUs) are used at half the rate of Time Units. The actual formula relies on unitref.dat offset [45]:

Formula:

Energy Used = INT( TUs_Used / 2unitref[45])

Example:

All X-COM units have a unitref[45]=1. 
Crossing a standard tile to an adjacent one uses 4 TUs.
This means that they will use INT(4 / 21) = 2 EUs.

Aliens can have different values for unitref[45] (depending on race - no one's bothered to document these yet). Many appear to have 0, which means they use a 1:1 ratio of Energy to TUs. Such aliens even need 1 EU to turn one facing (a 1 TU action), unlike X-COM soldiers. A few have been seen to have values of 2 or higher. With a value of 2, they don't use energy when walking to adjacent tiles, only diagonally. Values of 3+ result in little or no Energy usage; 4+ (24=16) will make even the most TU-expensive tiles (12 TUs) cost 0 energy.


Fatal Wounds

Each fatal wound to the body reduces the soldier's energy by 10%.


Recovery

A soldier's ability to recover energy is determined by the soldier's Initial Time Units. Thus, their raw recruit TU value dictates this throughout their career. You can see initial TUs on the Soldier tab (Strategic view) as the darker part of the TU bar.

Formula:

Energy Recovery = INT(Initial TUs/3)

Example:

If a soldier starts with an initial value of 60 TUs, they will recover 20 EUs per turn.

Energy Recovery Chart
Time Units Energy Recovery
50 16
51 → 53 17
54 → 56 18
57 → 59 19
60 20

Energy can also be recovered by way of stimulants from a Medi-Kit.


Weirdities

The stamina/energy stat displays erratic behavior in battles if pumped up far beyond the cap value, by using a cheat/editor.

Up to 179 (including) all is well. But if the stamina is set to 180 the soldier will start with zero energy and will be unable to move.

Each turn the energy level will fill up (providing the soldier didn't move around too much) but when reaching the infamous byte barrier at 255 it will drop back all the way to zero again.

Going beyond initial 180 stamina maintains this behavior, except that instead starting with 0 energy the soldier will start with (Stamina - 180).

It doesn't matter how the too-high stamina is formed - either the original stat pumped up, or the improvement stamina or combination of both.

See Also


UFO Badge X-Com: Enemy Unknown/UFO Defense
Soldiers:Time UnitsEnergy (Stamina)HealthBraveryReactionsFiring AccuracyThrowing Accuracy
StrengthPsionic StrengthPsionic SkillMelee AccuracyStunMoraleRankFatal Wounds