Behavior and AI Proposals

Name dcss:brainstorm:monster: new behavior modes
Summary This page is to discuss new behaviour modes.
Further informationCurrently available modes: hostile, neutral, sleeping, confused, wandering
Added by b0rsuk
Added on 2010-01-02 14:37

New behavior modes

Monster attacks **everyone** in sight, starting with closest creature.
  • It could be better for creatures like bottled efreet. Currently the efreet is actually a bottled scimitar for spoiled players, and an exception to the rule that summoned monsters leave no loot. The efreet could be hostile to everything, instead. Or there could be progression depending on Evocation/Fire magic: Hostile, Insane, Friendly. Personally I prefer the efreet always being Insane, this way players without Evocation/Fire or whatever it is (pretty much everyone!) could still use the efreet, but with more risk.
  • Powerful mid-level summoning spells could be balanced this way. Level4-5 Big Scary Monster could be alway summoned Insane, meaning it would attack closest creature. This would make it risky to use, and make spamming the spell counterproductive. More than 1 insane Big Scary Monster would just attack each other. There would be combo with Abjuration, but that costs extra 3 MP, spell slots, and player has to find the book. Summoning terrible evil one has no control over is a classic fantasy cliche.
  • Panicked enemy spellcasters could summon single, strong insane creatures. Make it their escape spell. For this to work well it should spawn within random distance from caster, or even at player. Players with Blink or similar tool could escape and watch the big baddie go after its master.
  • Some items or magic could make monsters insane. Because of bigger risk, the sources of making monsters insane could be more plentiful.
  • New and distinctive
Furious(placeholder name):
Monster attacks all other monsters except others of its kin. (possibly all monsters of the same _glyph_ ?)
  • Example usage: hornet nest. With Bumblebee renamed to Hornet (recommended by b0rsuk), hornet nests would appear occasionally in mid-late dungeon levels. Hornet nests would be mostly harmless, once in a while producing a lone hostile hornet. However, if the nest is disturbed by a thrown stone, or a Loud noise (explosions etc), the nest spawns a swarm of furious hornets, which attack everything except each other. Stealthy and cunning players could use that to their advantage.
    • I like this. Players can use a nest to their advantage, or try to lead the fighting (noise) away from it, but it's unlikely to start monster infighting outside LOS (which I think is boring). — evktalo 2010-01-15 19:40
  • Another use: orc pits in Elven Halls. They could be spawned hostile to everything except other orcs.
    • Nononono. They're at peace with each other. Also by the time the player would get there there would only be corpses and loot. That sight would be fun to see once but would make boring gameplay. (You can probably tell I'm not a fan of straightforward monster infighting very appealing.) — evktalo 2010-01-15 19:40

Basically, the two modes would enable new, interesting summoning spells, creatures, powers and magic. What's not to like ? — b0rsuk 2010-01-02 14:37


Attempts to move away from the player if possible. Moves to edge of LOS if the player ignores it, and tries to leave LOS entirely if the player uses a strong ranged attack. It still attacks normally, however, if it is cornered or happens to have a ranged attack, and persistent provocation by the player will also cause an attack.

Suitable for herbivore packs like sheep and yaks, and also top-end ranged units like centaur warriors. Probably too dangerous to assign to normal centaurs. Also intelligent casters like liches and mummies. koboldlord 2011-11-01 03:10

Better AI?

Maybe have at least some monsters also behave more intelligently?

For instance, give them MP too, and have them cast the best spells possible instead of randomly.

I don't feel so good about this; when I think of monster MP pools, I see a monster wasting its mp being a huge threat, then being helpless, and when I think of picking the best spells, I see crystal spear five times in a row, but a lack of interesting castings -such as summon butterflies and blink- until the very end, when it'd barely matter anymore. — mrmistermonkey 2010-05-13 17:54
I think monster MP pools would make monsters more interesting, since the AI will need to make them run away (or switch to melee *if* good at it, e.g. Cerebov or a fiend) to regenerate MP: of course, it makes writing the AI harder. It may however be better to just have unlimited MP but nerf monster spell power. The difference is a pattern of barrage of powerful spells + run away vs continuous use of less powerful spells. — luca 2010-05-14 05:05
Monsters specialized for casting casting more often is certainly more flavorful, but repetition of the same spell at lower power is probably boring. — mrmistermonkey 2010-05-14 06:58
Casting crystal spear five times in a row is often very good choice (what would you do as a player?), so the monster should definitely do it most of the time if it can. Of course, if you get next to him, he should blink instead, and if he intends to run (low on HP or MP), he should use Summon Butterflies to cover his escape (unless he notices that you attack with smite targeted spells, in which case he should either just run or decide to fight to the death). — luca 2010-05-14 05:05
As a player, I tend to build up a sequence of spells I like to cast (one of my favorites is summon butterflies followed by smite-targeted spells), or lure enemies to a point where my spells are more effective (e.g. poisonous/freezing cloud in corridors), rather than spamming my strong spells. As for summon butterflies as an escape spell, I'm not sure how well it would work unless the escapee has some way of swapping places with its summons. One suggestion for implementing sequences of spells is group them by uses (e.g. offensive, escape) and attributes (e.g. summons, smite-targeted), and have a list of good sequences of types of spells to choose from (e.g. summons then smiting, or incapacitation followed by offensive spells, particularly those where staying in one place would hurt the player). — mrmistermonkey 2010-05-14 06:58
Well, let's look at a practical example: the ancient lich with Bolt of Draining (range 6), Animate Dead, Summon Undead, Throw Frost (, and Crystal spear (range 4). Let's assume he notices the player at range 8 (edge of los).

Generally he seems to have two main options in the battle: either summon as much as possible and shoot bolt of draining through the summons, or don't summon to have a clear line of fire for crystal spear.

In the first case, he should alternate summoning, getting at some distance from the player, and shooting bolt of draining through the summons. He should probably attempt this if not faster than the player, and change strategy if the player has abjuration, rN+++ or smite spells (especially if he has fire/ice storm).

In the second case, he would either charge in, move to distance 3-4 or shoot Throw Frost (at distance 7-8), Bolt of Draining (at distance 5-6) or Crystal Spear (at distance 1-4). If the player has no ranged attacks and is not running away, the ancient lich should shoot, and otherwise the ancient lich should move towards player himself. Furthermore, if the ancient lich is faster and player is not ranged, he should also get away from melee, while shooting at him (likely killing the player unless he blinks and teleports). At close range, he should use either Bolt of Draining or Crystal Spear depending on the player characteristics (crystal spear against low EV + high rN, bolt of draining against high EV+DMsl+low rN). If the player is rC- he may even use Throw Frost.

So in general, he would use all spells, but in some cases only a single spell, since it's the most appropriate: in particular, if he is faster than a melee player, he should either just maintain distance 5-6 and shoot bolt of draining or maintain distance 3-4 and shoot crystal spear (chosen as discussed above): the player will be dead soon unless he teleports away.

luca 2010-05-14 07:58

Of course, the AI may not want to cast crystal spear if he notices you have it too, and he has orb of destruction. The AI should instead get out of crystal spear range and pelt you with orb of destruction while you can't hit back (just as someone playing a fragile caster would do). luca 2010-05-14 05:05
Another interesting option, which I think is actually the best, is to have per-spell cooldown timers, either one per spell or per group of spell (normally varying between two consecutive integers, either randomly or in a pattern), which would mimic very closely the current scheme. In addition to a per-spell cooldown timers, it is possible to have one for attack spells, one for summoning, and other for each other single spell: this will allow the monster to spam the best attack or summon spell for the situation instead of having to rotate just because of the cooldowns, but will still force him to also do something else (like summon, etc.). For instance, smiters would smite as frequently, but with less variance (and of course, choosing intelligently whether to do it or not in the first place). luca 2010-05-14 05:05

Also, they should intelligently retreat to heal, try to stay out of melee when they have ranged attacks.

A centaur that runs *away* from you (without exiting LOS) would be much more deadly, for instance.

This seems similar to how 4.1 worked, from what little I've seen of it, and honestly I really like it. It'd require no end of rebalancing, but one of crawl's biggest flaws is how every creature is all too happy to ignore its unique strengths and instead march right up to engage in melee, which makes enemies feel both overly similar and idiotic. Centaurs are fast and ranged, for example, but do nothing to take advantage of this. Casters likewise are eager to shove past their melee-focused brethren to close in with a dinky dagger. Mermaids can be surrounded by allies but still walk up to you as an invitation to kill them and escape. It's not just that monsters act mindlessly, but that they actively work against their own best interests. I certainly don't agree with everything proposed here, MP included, but the sentiment is good. — og17 2010-05-13 06:30
Monsters with weapons of reaching could also move away or behind other monsters when the player approaches them, and attack from one space away (currently, similar behavior triggers upon fleeing - 0001483). — mrmistermonkey 2010-05-13 17:41

And also an ancient lich that hastes and stays away from you, but in crystal spear range, and only casts bolt of cold if you are not cold resistant, would be much better. He should also summon fiends immediately upon battle, use that exclusively if you lack Abjuration, use that often if you are not torment immune, etc.

Resistance determination would be through casting spells and watching out for imaginary equivalents of an “it resists” message, rather than looking at the player and magically knowing, and spell determination would be through watching for the player to cast the spell in question, right? — mrmistermonkey 2010-05-13 17:54
Probably, the monster trying to cast spells and then changing tactics would be much more interesting that always getting hit with your weakest resistance. They could also probably make the initial guess based your spells, or on whether monsters are biased in a certain way (e.g. an ancient lich in Gehenna should guess you are resistant to fire, and thus hit you with Bolt of Cold if possible). — luca 2010-05-14 05:05

It will make the game dramatically harder though, but perhaps it can be initially restricted to some monsters and then extended to all highly intelligent ones, along with a rebalance to fix them.

Ideally also coordinate with other monsters, so that casters/summoners/priests stay back (esp. in orcish mines), and so on. For instance Orc priests should *never* get into melee if possible, and often should smite even in melee range (smite needs to use MP so the AI can use it as often as possible).

Smoke demons should generally not fire smoke, since they can't then later smite you, Lom Lobon should use Ice Storm or lightning depending on your resistances, and so on.

It seems to me that smoke demons don't spawn smoke because they choose to do, they do so because of what they are. — kilobyte 2010-05-14 09:43

Monsters in Ziggurats should try to spread out so you can't fire storm them as easily as now.

If monsters in Ziggurats spread out, monsters outside of them should too. — mrmistermonkey 2010-05-13 17:54
Yes, sure, that's just the place where you can take the most advantage of monsters being together. They should probably do this intelligently, staying spread by default, but joining together if they notice you use melee or summons instead of conjurations (and go back to sparse if you surprise them with a good beam/ball conjuration). — luca 2010-05-14 05:05

A *lot* of strategies can be very easily thought out for this.

luca 2010-05-13 05:55

Another suggestion: preferring spells which can affect multiple spaces (anywhere from fireball or freezing cloud to chain lightning or fire bolt or even summon horrible things) if the target has its allies nearby, and minimal enemies (no need to check for this in the case of summons, though). — mrmistermonkey 2010-05-14 06:58
Yes, although they should probably use Abjuration if they have it instead, unless they can hit everything with fire storm or ice storm. Also they should do this only if the summons are actually threatening or block the way, and just ignore them otherwise. — luca 2010-05-14 07:58

There is a basic problem will all this though: how do we prevent a centaur from always killing a pure melee build? (since he gets to shoot at you and you can't attack him because he's faster and retreats)

It seems this would require even more fundamental changes: the only thing that comes to mind is make ranged attacks ineffective against an opponent with a shield that just stayed put (without doing attack actions), or that moved in the 3 or the eight directions that are towards the monster.

Thus, in a one-to-one situation, ranged attacks would not be effective, but they would be if the player is facing multiple monsters in different directions, or if he is fighting someone else.

Player hunters will be nerfed by this, but most monsters can simply not be given shields.

Spellcasters with Haste or Swiftness should only appear deep where the player would at least be able to escape, or they should be removed.

Player nagas (and Cheibriados followers) will have a much harder time, and might not be viable as pure melee at all.

luca 2010-05-14 18:27

Or melee-focused characters could simply get used to carrying some sort of ranged weapon for enemies that are difficult to catch? As academic as this is, it'd hardly be disastrous. — og17 2010-05-15 06:31
But they won't have any skill in it, making it useless. I'm starting to think that the only practical way is to only make late-game monsters intelligent, perhaps ever restricting monster intelligence to Pandemonium and/or Ziggurats. Pan lords would in particular be a very interesting class of monsters to make intelligent, since they have random abilities, there is only one per level, and the player is very well equipped by the time he meets them. If they turn out to be too deadly, then instead of either having 3/4 rune wins or 15 rune wins, an intermediate type of win would arise, which seems good. Pan lord generation in Ziggurat would need to be toned down, but this shouldn't destroy the game. — luca 2010-05-15 15:16
If melee is weakened that much, then my suggestion to players is to train a decent bit of skills that would help in situations where they'd otherwise be incapable of hitting their foes, including invocations (use travel exclusions or hide behind walls up to the temple; get a god that helps). For centaurs in particular, it would probably be possible to back them into corners (especially with a head start from stealth), but by the time they reached hasted blinkers, they'd probably need something fancy like a bunch of curare and luck, ranged skills, divine assistance, or magic. I, for one, don't particularly care if demigod fighters with no inclination to pick up a few extra skills become unviable. That is, don't go pure melee; get ranged skill, spellcasting, or invocations. — mrmistermonkey 2010-05-15 17:21

Monster observations

blue_anna 2010-09-19 18:39

it would be nice if we kept a little array with each monster that keeps track of observed facts about each creature it remembers. facts such as:

  • speed (once it seen the creature move)
  • an ac-like measure of to_hit success (measured as an average of successful swings)
  • an intelligence measure (is the player/summons casting spells? etc)
  • range of attack from player (does the player peg you from 8 away?)
  • a general health measure (how many hits before the creature got the target to moderately wounded?)
  • a general damage measure (how many hits did it take the target for the creature to fall to moderately wounded?)

from these facts it could determine the risk of engaging in melee, rish for staying engaged at a distance, relative to the chance that it could run away. the accuracy of this assessment could be intelligence-based.

Mob's Sleep Mode Alternation -> "Chatting"

Kozaczu 2011-06-25 12:37


Why shouldn't they have more personality? To entertain themselves in sunless dungeon they could spare time to share their experiences, tell jokes, and probably inform Stealthy players about dangers awaiting further in the dungeon.

I suppose that could make players not to gain all the necessary information through Crawl Wiki and add some stealth-based-games flavour :). I think that “Chatting mode” would be fun idea, and appear only between 2 or more adjacent creatures.

For example:

  • “Those filthy Centaurs tried to burn my fur with Arrows of Fire”
  • “Have you seen *deep elf name* in action? He's the most accurate of 3 of our Master Archers”
  • “Look out for *player*, he's wreaking havoc at upper levels…”
  • The good *player race* is a dead *player race*!

Maybe good god followers instead of Stabbing could Intimidate the monster to get useful info…

As tricky as it could be to integrate into the game, monster chat of some kind would definitely make the game more flavorful — herself 2011-06-26 19:05

Berserking monsters shove past

From 766. Berserking monsters should shove past other monsters.

With the current mechanics, you can use a low-level monster (say, a rat or a goblin) to block another high-level monster (say, berserk Duvessa, Snorg, Rupert, etc) so long as you are conveniently place in a corridor. For example:


In this example, the rat is just an innocent rat, and the 'e' in question is Duvessa, who is berserk. If you have enough AC or EV, you can just hit '.' until Duvessa's berserk runs out, then kill the rat, and take advantage of the fact that Duvessa is now slowed. I think this is a pretty cheap trick, and it means that, if you have the right circumstances, you can pretty much make berserk useless.

Making berserk monsters displace other monsters would solve this issue entirely.

This seems arbitrary and is far less cool than the other option, to have them attack weaker enemies in their way. — tgw 2010-05-28 17:31
Seconded. If berserk monsters attacked other monsters, then needles of frenzy would be an interesting tactical option. — Minced 2010-06-03 13:14

Reaching / Ranged Attacker Suggestion

A monster with a reaching weapon puts itself at unnecessary risk when it rounds a corner.


Where 'X' is a monster with reaching chasing 'P' the Player and '.', '1' and '2' represent empty spaces. X cannot see P. X has reaching. Current Monster AI always moves X to 1. This is unsafe as P is now in melee striking range. This is a very common ambush tactic with P. I suggest X with reaching should make a weighted random choice between 1 and 2, with preference to move to 2 if P was not heavily injured on last view of P. While this may give P more lead time, it also creates a more interesting, less predictable, and potentially more dangerous situation. — XuaXua 2012-04-19 22:25

Logged in as: Anonymous (VIEWER)
dcss/brainstorm/monster/concept/new_behavior_modes.txt · Last modified: 2012-04-19 22:34 by XuaXua
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki