Draft guide to Crawl's time system


Ask fellow adventurers how to stay alive in the deep, dark, dangerous dungeon below, or share your own accumulated wisdom.

Ziggurat Zagger

Posts: 5382

Joined: Friday, 25th November 2011, 07:36

Post Friday, 19th June 2020, 03:44

Draft guide to Crawl's time system

So questions come up a lot about time in crawl, and as far as I can tell, there isn't really a guide which explains how the time system works, so I figured I'd take a stab at writing one. Consider this a draft, I'm looking for corrections/omissions, so please tell me if I get anything wrong. Also I'd recommend quoting the part of the post you're responding to, because if you're right I'll be editing and changing that section, so there won't be a record of what it was that you were replying to.

Time in Dungeon Crawl: Stone Soup

Although Crawl is turn based, it nevertheless has a time system which tracks how long has passed in game, and many actions have different durations, which may result in players unexpectedly getting smashed to death if they do something unwise. Let's start with some terminology:

AUT: Absolute unit of time, this is the actual time unit of dungeon crawl, and is not really mentioned in game very much at all. It is referenced in game by various other terms such as "delay" or "time". If a weapon has an attack delay of 1.3, this is equal to 13 auts. For example, here's a club:

Base accuracy: +3 Base damage: 5 Base attack delay: 1.3
This weapon's minimum attack delay (0.6) is reached at skill level 14.

The base attack delay is 13 auts, and every 2 skill levels reduces this by 1 aut, until it reaches 6 auts at level 14. The delay is shown in turns, our next term...

Turn: The most ambiguous of crawl's time nouns, a turn is typically considered to be 10 auts, but this is NOT consistent. Standard races move at 10 auts, and many actions also cost 10 auts, such as casting a spell, using scrolls/potions, etc. But, many other actions don't cost 10 auts: nearly all weapons have min delay below 10 auts (the dark maul and crossbows being the exception), movement on faster or slower races (or while hasted/slowed), walking into shallow water, changing jewelry (only 5 auts), etc.

Action: Something that the character does in game; making an attack, moving, casting spells, etc. This is what is counted when it comes to scoring, despite the morgue file displaying this:

The game lasted 04:48:51 (82118 turns).

What is actually counted here is actions, and not turns. Someone should really update the morgue generation code!

Monsters & the Energy system

So, you've taken an action which lasted 10 auts, what happens next? Every monster in the game has an 'energy' value, which is not displayed directly but is what the description "It is fast" is based on. The default value is again 10, which matches the 10 aut movement speed of humans. So when you move (10 auts), the monster gains 10 energy. Then, all visible monsters who have enough energy to act (always 10 energy), will take actions until their energy is below 10. If a monster has more than 20 energy, they will act twice. Note that energy is thus inverted from player movement speed, a naga moves at 14 auts (slow), but an orb of fire has "speed" 15, which means that it gains 15 energy every 10 auts, which makes it faster, not slower. Speed is a term used somewhat interchangeably with energy, which usually isn't used in game.

While any action like attacking or casting spells by a monster always takes 10 energy, movement is slightly different in that it has a 1/3 chance of taking only 9 energy, 1/3 chance of 10, and 1/3 chance of taking 11 energy. This is called energy randomization, and means that if you are running away from a 10 speed monster on a 10 speed race, you'll randomly either gain or lose a tile between you. This can be exploited by pillar dancing, waiting for the monster to fall behind, and then escaping up stairs. You may take a hit first as the monster randomly gets closer to you, but given enough time it will eventually fall behind as long as you don't die to the attacks from it when it gets ahead.

Let's give an example that isn't 10 speed, say a Naga who walks towards an orb of fire. The Naga takes 14 auts, or 1.4 turns, and the orb of fire gains 15 energy per 10 auts, so 15 x 1.4 = 21 energy gained. This means the orb will always get two actions in response, and could possibly get three, if it started with 9 energy. In cases where the energy gained isn't a whole number, the fractional energy is randomly rounded. For example, if that Naga moves towards a Cyclops (speed 7), it gains 1.4 * 7 energy, which is 9.8. This has an 80% chance of giving 10 energy, and a 20% chance of giving 9 energy. It is not possible to have fractional energy or auts in crawl.

Some monsters have energy modifiers for specific actions. A common one is to have a different swimming speed, for example hydras are speed 10 but have swim: 60%. This means if they are in water (shallow or deep), movement only costs 6 energy instead of the 10 it normally would (before energy randomization). A less common mechanic is the Juggernaut: a speed 15 monster (very fast) who attacks at a huge penalty: 450%. Thus they are hard to run away from, hit for a lot of damage, but don't actually deal a great deal of damage over time (relatively speaking, they are still quite dangerous).

Regeneration and AUT/Turncount Speedrunning

One of the quirks that arises from all of this is something called bread swinging, the practice of trying to intentionally take slow turns so that you can regenerate more health/mana per action. Since you regenerate health based on how long has passed since your last action, taking very slow actions means you will heal faster. The name bread swinging comes from it previously (I think it's been changed?) taking 15 auts to swing anything that was a non-weapon, but many other slow actions can also be used. Swinging with a 2h weapon that you have no skill in, walking into shallow water, walking while worshipping Chei, etc. Removing/wearing body armor takes several turns, but this is implemented as taking five 10 aut actions, rather than one 50 aut action, and so it doesn't work for this.

This is one of the major reasons why Cheibriados is generally the best god for speedruns, as it's very easy to simply walk at 20 aut delay, and effectively double your regeneration per action. In addition, Cheibriados gives a rapid power increase which promotes being able to dive to more dangerous levels quickly; while the downside of not being able to escape doesn't matter much when your goal is only to win one game out of hundreds. And remember that despite the morgue lying about how many *turns* you took, it's actually counting actions. Some players have suggested changing to aut-based scoring (whether you call it auts or turns), but in my opinion, this isn't actually fixing anything, and is just changing one set of problems for another set of problems. It would also change what kind of weapons are optimal to use, allowing for things like quick blades to be more time efficient (assuming they actually deal enough damage to kill in a low enough number of hits) than slower, 7 aut min delay weapons. Currently, crossbows (10 aut delay) are a more ideal speedrun weapon than something like a demon whip (5 aut delay), although actual speedrun strategy usually centers around using highly efficient spells (Borgnjor's Vile Clutch, Statue Form + unarmed, or summons such as Summon Horrible Things).

*end of guide*

Anyways, looking for anything you feel should be added, is the speedrunning stuff relevant or offtopic, am I a horribly biased Cheibriados fanboy, etc etc...

And what does happen if you have a 14 aut turn and a monster has 8 speed, gaining 11.2 energy? Random rounding to nearest integer? Added
Last edited by tasonir on Saturday, 20th June 2020, 00:33, edited 4 times in total.

For this message the author tasonir has received thanks:
Sorcerous

Zot Zealot

Posts: 1004

Joined: Thursday, 16th August 2018, 21:19

Post Friday, 19th June 2020, 10:03

Re: Draft guide to Crawl's time system

tasonir wrote:Turn: The most ambiguous of crawl's time nouns, a turn is typically considered to be 10 auts, but this is NOT consistent. Standard races move at 10 auts, and many actions also cost 10 auts, such as casting a spell, using scrolls/potions, etc. But, many other actions don't cost 10 auts: nearly all weapons have min delay below 10 auts (the dark maul and crossbows being the exception), movement on faster or slower races (or while hasted/slowed), walking into shallow water, changing jewelry (only 5 auts), etc.

Action: Something that the character does in game; making an attack, moving, casting spells, etc. This is what is counted when it comes to scoring, despite the morgue file displaying this:

The game lasted 04:48:51 (82118 turns).

What is actually counted here is actions, and not turns. Someone should really update the morgue generation code!

Glad to have found someone who agrees :D

For your 11.2 energy example, the game should randomly round to the nearest integer, but every once in a while a 'bug' is found where the game rounds something deterministically rather than randomly. (There are always people who argue it's not a bug but a feature.)

WRT your speedrunning advice, I think weapon delay is actually pretty inconsequential. I'm not particularly good at speedrunning myself, but I think in speedruns it's much more important to kill monsters whilst losing little health, not having to wait out other timers (mana, -berserk, contam, etc), and being able to survive with less XP & equipment.
PS, are you saying it would be bad if weapons with higher dps would be better for speedrunning, and that quickblades have high dps (damage per aut)?

bt

Halls Hopper

Posts: 60

Joined: Thursday, 7th April 2011, 18:13

Post Friday, 19th June 2020, 12:37

Re: Draft guide to Crawl's time system

tasonir wrote:I'm not entirely sure how the game handles rounding, but to give an example that isn't 10 speed, let's look at a naga who walks towards an orb of fire. The naga takes 14 auts, or 1.4 turns, and the orb of fire gains 15 energy per turn, so 15 x 1.4 = 21 energy gained. This means the orb will always get two actions in response, and could possibly get three, if it started with 9 energy.

Regeneration and AUT/Turncount Speedrunning

One of the quirks that arises from all of this is something called bread swinging, the practice of trying to intentionally take slow turns so that you can regenerate more health/mana per action. Since you regenerate health based on how long has passed since your last action, taking very slow actions means you will heal faster...


Considering "turn" is an ambiguous and inconsistent term (bolded in quote), it would be best to not use it when describing game mechanics if it can be at all avoided. You can use "slow actions" in second case, but I'm not sure how to fix the first one. Maybe something like "gains 15 energy per 10 auts" could work.

Speedrunning section is fine IMO, it's good to give some concrete examples, but, unless I've missed it, you haven't described what turncount speedrun means, and that it counts amount of actions taken (rather than turns :)). Can be useful for newer players.

Also a small section that mentions exceptions to the rule "all enemy actions take 10 energy", like juggernauts, sixfirhies and ugly things might be nice. Though I'm not certain if they are an exception as such, or if it's handled in some other way.

Great guide, btw.

For this message the author bt has received thanks:
andrew

Ziggurat Zagger

Posts: 5382

Joined: Friday, 25th November 2011, 07:36

Post Friday, 19th June 2020, 19:53

Re: Draft guide to Crawl's time system

petercordia: I'll simply the guide by just saying that fractional auts are randomly rounded, maybe with some note about possible mishandling, but I'll assume that's generally correct. I certainly haven't audited crawl code extensively, so I'll just have to trust those who wrote it!

As for whether short blades or 2h weapons should be better for speedrunning, I don't really have much stake in it either way. Dps (in this case, damage per aut) for most weapons is meant to be fairly balanced, so I don't think light vs heavy weapons have any major differences. Specific characters, like if you have a quickblade and also found two +4 rings of slaying, may be different of course. However for speedrunning it's damage per action, not aut, so that should pretty much always favor heavier weapons. As an aside, statue form unarmed is generally one of the heaviest "weapons" you can find, so that is common in speedruns. BVC, particularly before the recent nerfs, is also one of the best offenses available.

I agree that the "not having to wait out other timers" part is probably more significant. This is why I was thinking that VS would basically be the perfect speedrunning race, although it's been shown that gnolls can get BVC online so quickly, throw on a magic regen amulet (possibly optional, but helps), and then kill monsters before taking significant enough damage that gnolls are likely the #1 race, with VS second. I'm not a top speedrunner though, so this is mostly second hand observation.

BT: I'll replace turn there with action, good catch. And add more specific mentions that 'turncount' speedruns are in fact 'actioncount' speedruns. I also completely overlooked monsters with swim/move at different % costs. Does anyone know how swim 60% actually works? Say a hydra (speed 10, swim 60%) has 15 energy, and is in water, if it moves once it consumes 6 energy, then has 9 energy, can it act again or does it does require having 10 energy? Basically is the 10 energy to start an action a hard requirement or do hydras with 6 energy have a chance to be activated and use that 6 energy?

Ziggurat Zagger

Posts: 6454

Joined: Tuesday, 30th October 2012, 19:06

Post Friday, 19th June 2020, 20:15

Re: Draft guide to Crawl's time system

There should probably be some mention of "multi-turn actions" (like wearing armour) which are one keypress, but take up multiple turns in your turncount for scoring purposes.
Spoiler: show
This high quality signature has been hidden for your protection. To unlock it's secret, send 3 easy payments of $9.99 to me, by way of your nearest theta band or ley line. Complete your transmission by midnight tonight for a special free gift!

Shoals Surfer

Posts: 305

Joined: Friday, 13th December 2019, 01:33

Post Friday, 19th June 2020, 20:48

Re: Draft guide to Crawl's time system

tasonir wrote:The Naga takes 14 auts, or 1.4 turns, and the orb of fire gains 15 energy per 10 auts, so 15 x 1.4 = 21 energy gained.


Maybe "1.4 10-aut units", if you're trying to avoid reference to "turns"?

Ziggurat Zagger

Posts: 5382

Joined: Friday, 25th November 2011, 07:36

Post Friday, 19th June 2020, 23:50

Re: Draft guide to Crawl's time system

Siegurt wrote:There should probably be some mention of "multi-turn actions" (like wearing armour) which are one keypress, but take up multiple turns in your turncount for scoring purposes.

Had to do a double take, because this one is already in there! Last sentence of the first paragraph in the regeneration/speedrunning section:

Removing/wearing body armor takes several turns, but this is implemented as taking five 10 aut actions, rather than one 50 aut action (exact time delay depends on how heavy the armor is), and so it doesn't work for this.


I think it's still correct that removing armor is always 5 actions/50 auts. Didn't realize this apparently includes shields, but apparently they're also slow. I'll remove the part about the delay varying with how heavy the armor is...I think it used to, but doesn't anymore.

Ziggurat Zagger

Posts: 6454

Joined: Tuesday, 30th October 2012, 19:06

Post Saturday, 20th June 2020, 02:55

Re: Draft guide to Crawl's time system

tasonir wrote:
Siegurt wrote:There should probably be some mention of "multi-turn actions" (like wearing armour) which are one keypress, but take up multiple turns in your turncount for scoring purposes.

Had to do a double take, because this one is already in there! Last sentence of the first paragraph in the regeneration/speedrunning section:

Whoops, I guess I missed that, although I think there were (maybe there are not any longer) multi-turn actions that weren't wearing armour.
Spoiler: show
This high quality signature has been hidden for your protection. To unlock it's secret, send 3 easy payments of $9.99 to me, by way of your nearest theta band or ley line. Complete your transmission by midnight tonight for a special free gift!

Zot Zealot

Posts: 1004

Joined: Thursday, 16th August 2018, 21:19

Post Sunday, 21st June 2020, 14:00

Re: Draft guide to Crawl's time system

WRT monsters with 60% swim speed and such things:
I'm fairly certain that a monster will only move when it has 10* energy, regardless of how much energy its action costs. The behaviour of the Juggernaut proofs this pretty definitively. (It has a long period of inactivity after attacking.)

*actually if monsters move when they have 0 energy you'd see exactly the same behaviour, and I haven't been able to find the line of code which implements a "mons_energy > ..." test. So I don't know whether they act at 10 energy or at 0 energy. But given that the amount of energy monsters receive is varied (rather than the amount of energy monster actions cost), a threshold at 10 energy is more likely.

Return to Dungeon Crawling Advice

Who is online

Users browsing this forum: No registered users and 15 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.