Difference between revisions of "Monster speed"

From CrawlWiki
Jump to: navigation, search
m
m (Displaying Speed)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{version030}}
+
{{version031}}
 
A monster's '''speed''' determines how many actions a monster gets per turn. The higher the speed, the faster a monster is.
 
A monster's '''speed''' determines how many actions a monster gets per turn. The higher the speed, the faster a monster is.
  
 
==Displaying Speed==
 
==Displaying Speed==
In game (as of [[0.31]]), monster speed is displayed as a percentage. A monster at 100% speed makes 1 action per 1.0 [[decaAut]]. A monster at 200% speed makes 2 actions per 1.0 decaAut, a monster at 50% speed makes 0.5 actions per 1.0 decaAut, and so on. Note that displayed percentages are rounded to the nearest integer.
+
When looking at monster descriptins in game, monster speed is displayed as a percentage. A monster at 100% speed makes 1 action per 1.0 [[decaAut]]. A monster at 200% speed makes 2 actions per 1.0 decaAut, a monster at 50% speed makes 0.5 actions per 1.0 decaAut, and so on. Note that displayed percentages are rounded to the nearest integer.
  
In the wiki, monster speed is displayed as a value, where 1 speed = 10% speed. So a monster listed as 10 speed in the wiki will be displayed as 100% speed in game.
+
In the wiki, and in the game's code, monster speed is displayed as a value, where 1 speed = 10% speed; a monster listed as 10 speed is displayed as 100% speed in game. This value is where the phrase "10 speed monster" comes from.
  
By default, speed applies to all actions. However, a monster may have a modifier to specific types of actions. For example, [[ogre (monster)|ogres]] attack at 67% speed (in game display). In the wiki, this modifier is listed as (attack: 150%) - it takes 150% the time to make an attack.
+
By default, speed applies to ''all'' actions. However, a monster may have a modifier to specific types of actions. For example, [[ogre (monster)|ogres]] attack at 67% speed (using the in game display). In the wiki, this modifier is listed as (attack: 150%) - i.e., it takes 150% the time for an ogre to attack.
  
 
==Useful Info==
 
==Useful Info==
Speed is a measure of how fast a monster moves. A 100% speed monster makes 1 action every 1.0 decaAut (every 1.0 turn) of the player's time.
+
Speed is a measure of how fast a monster moves. A 100% speed monster makes 1 action every 1.0 decaAut (or every 1.0 turn) of the player's time.
  
If no rounding occurs (see the [[#Energy|Energy section]] below), speed is deterministic. For example, a 150% speed monster makes an average of 1.5 actions every 1.0 decaAut.
+
If no rounding occurs (see the [[#Energy|Energy section]] below), speed is deterministic. For example, a 150% speed monster makes an average of 1.5 actions every 1 turn.
*If the player [[wait]]s for 1 turn, the monster gets to act either once or twice...
+
*If the player [[wait]]s for 1 turn, the monster cannot make 1.5 actions, so it either acts once or twice...
*But said monster will ''always'' act in a ratio of 3 actions every 2.0 decaAut. So if the monster acts twice in a 1.0 turn interval, it will only act once in the next 1.0 turn.
+
*However, it will ''always'' act in a ratio of 3 actions every 2 turns. So if the monster acts twice in a 1 turn interval, it will only act once in the next 1 turn interval.
  
 
===Speed vs Delay===
 
===Speed vs Delay===
The player's actions are measured in ''delay'', or how long the action takes. The higher the delay, the slower an action, so delay is the inverse of speed. You can convert speed (percentage) to delay, and vice versa, with the following formulas:
+
The player's actions are measured in ''delay'', or how long the action takes. The higher the delay, the slower an action, so delay is the inverse of speed. You can convert speed to delay, and vice versa, with the following formulas:
  
 
Using speed percentage displayed in game:
 
Using speed percentage displayed in game:
 
*<code>speed% = 100% * (1.0 / delay)</code>
 
*<code>speed% = 100% * (1.0 / delay)</code>
*<code>delay = 1.0 * (100% / Speed%)</code> decaAut (rounded in a weighted manner to the tenths place)
+
*<code>delay = 1.0 * (100% / speed%)</code> decaAut (rounded in a weighted manner to the tenths place)
  
 
Using speed displayed in the wiki:
 
Using speed displayed in the wiki:
Line 30: Line 30:
  
 
===Energy===
 
===Energy===
In the game's code, speed is used to accumulate units of energy. For every 1 speed, a monster gets 1 energy per 1.0 [[decaAut]] of player time. This can be displayed as a formula, <code>energy_gain = speed * you_time_taken / 10</code>. Unless modified, it takes 10 units of energy to make one action. Any energy leftover is kept for future turns.
+
In the game's code, speed is used to accumulate units of energy. For every 1 speed, a monster gets 1 energy per 1.0 [[decaAut]] of player time. This can be displayed as a formula, <code>energy_gain = speed * you_time_taken</code> (in decaAut). Unless modified, it takes 10 units of energy to make one action. Any energy leftover is kept for future turns.
  
 
A monster may have modifiers that raise or lower the amount of energy required to make an action. For example, [[ugly thing]]s only require 9 energy to move. This is displayed as 111% travel speed in game, or (move: 90%) in the wiki.
 
A monster may have modifiers that raise or lower the amount of energy required to make an action. For example, [[ugly thing]]s only require 9 energy to move. This is displayed as 111% travel speed in game, or (move: 90%) in the wiki.
  
After every player action, energy is rounded to an integer in a weighted manner.<ref>{{source ref|0.30.1|mons-act.cc|1319}}</ref> So if a monster would get 6.66 energy, it'd have a 66% chance to get 7 energy, and a 34% chance to get 6 energy. Therefore, if energy would be fractional, adverse rounding may occur.  
+
After every player action, energy is rounded to an integer in a weighted manner.<ref>{{source ref|0.30.1|mon-act.cc|1319}}</ref> So if a monster would get 6.66 energy, it'd have a 66% chance to get 7 energy, and a 34% chance to get 6 energy. Therefore, if energy would be fractional, adverse rounding may occur.  
 
*For example, a [[slow]]ed 100% speed monster (effective 66.6% speed) may act 60-70 times in 100 decaAut instead of the expected 66-67.
 
*For example, a [[slow]]ed 100% speed monster (effective 66.6% speed) may act 60-70 times in 100 decaAut instead of the expected 66-67.
*This rounding can also occur when the player makes fast/slow acitons. A 130% speed monster gets an average of 6.5 energy per 0.5 decaAut. If the player constantly makes 0.5 decaAut actions, the monster may get 6 or 7 energy per player action.
+
*This rounding can also occur when the player makes fast/slow actions. A 130% speed monster gets an average of 6.5 energy per 0.5 decaAut. If the player constantly makes 0.5 decaAut actions, the monster may get 6 or 7 energy per player action.
  
 
In the example listed in [[#Useful Info|Useful Info]], the 150% speed monster will always get 15 energy per (1.0 decaAut) player action, so no rounding occurs. The monster makes 2 actions if it has 5 or more energy 'left' (5 + 15 = 20), otherwise it makes only 1 action.
 
In the example listed in [[#Useful Info|Useful Info]], the 150% speed monster will always get 15 energy per (1.0 decaAut) player action, so no rounding occurs. The monster makes 2 actions if it has 5 or more energy 'left' (5 + 15 = 20), otherwise it makes only 1 action.

Latest revision as of 22:49, 24 February 2024

Version 0.31: This article may not be up to date for the latest stable release of Crawl.

A monster's speed determines how many actions a monster gets per turn. The higher the speed, the faster a monster is.

Displaying Speed

When looking at monster descriptins in game, monster speed is displayed as a percentage. A monster at 100% speed makes 1 action per 1.0 decaAut. A monster at 200% speed makes 2 actions per 1.0 decaAut, a monster at 50% speed makes 0.5 actions per 1.0 decaAut, and so on. Note that displayed percentages are rounded to the nearest integer.

In the wiki, and in the game's code, monster speed is displayed as a value, where 1 speed = 10% speed; a monster listed as 10 speed is displayed as 100% speed in game. This value is where the phrase "10 speed monster" comes from.

By default, speed applies to all actions. However, a monster may have a modifier to specific types of actions. For example, ogres attack at 67% speed (using the in game display). In the wiki, this modifier is listed as (attack: 150%) - i.e., it takes 150% the time for an ogre to attack.

Useful Info

Speed is a measure of how fast a monster moves. A 100% speed monster makes 1 action every 1.0 decaAut (or every 1.0 turn) of the player's time.

If no rounding occurs (see the Energy section below), speed is deterministic. For example, a 150% speed monster makes an average of 1.5 actions every 1 turn.

  • If the player waits for 1 turn, the monster cannot make 1.5 actions, so it either acts once or twice...
  • However, it will always act in a ratio of 3 actions every 2 turns. So if the monster acts twice in a 1 turn interval, it will only act once in the next 1 turn interval.

Speed vs Delay

The player's actions are measured in delay, or how long the action takes. The higher the delay, the slower an action, so delay is the inverse of speed. You can convert speed to delay, and vice versa, with the following formulas:

Using speed percentage displayed in game:

  • speed% = 100% * (1.0 / delay)
  • delay = 1.0 * (100% / speed%) decaAut (rounded in a weighted manner to the tenths place)

Using speed displayed in the wiki:

  • speed = 10 / delay
  • delay = 10 / speed (rounded in a weighted manner to the tenths place)

For example, a monster at 200% speed has a delay of 0.5 decaAut.

Energy

In the game's code, speed is used to accumulate units of energy. For every 1 speed, a monster gets 1 energy per 1.0 decaAut of player time. This can be displayed as a formula, energy_gain = speed * you_time_taken (in decaAut). Unless modified, it takes 10 units of energy to make one action. Any energy leftover is kept for future turns.

A monster may have modifiers that raise or lower the amount of energy required to make an action. For example, ugly things only require 9 energy to move. This is displayed as 111% travel speed in game, or (move: 90%) in the wiki.

After every player action, energy is rounded to an integer in a weighted manner.[1] So if a monster would get 6.66 energy, it'd have a 66% chance to get 7 energy, and a 34% chance to get 6 energy. Therefore, if energy would be fractional, adverse rounding may occur.

  • For example, a slowed 100% speed monster (effective 66.6% speed) may act 60-70 times in 100 decaAut instead of the expected 66-67.
  • This rounding can also occur when the player makes fast/slow actions. A 130% speed monster gets an average of 6.5 energy per 0.5 decaAut. If the player constantly makes 0.5 decaAut actions, the monster may get 6 or 7 energy per player action.

In the example listed in Useful Info, the 150% speed monster will always get 15 energy per (1.0 decaAut) player action, so no rounding occurs. The monster makes 2 actions if it has 5 or more energy 'left' (5 + 15 = 20), otherwise it makes only 1 action.

References

  1. mon-act.cc:1319 (0.30.1)