Subject: Re: Why do monsters attack From: R Dan Henry Date: Sun, 18 May 2003 07:09:38 GMT Group: rec.games.roguelike.development On Mon, 12 May 2003 12:18:34 GMT, in a fit of madness "Mylon" declared: >"The Sheep" wrote in message >news:slrnbbutca.jga.sheep@atos.wmid.amu.edu.pl... >> >> I think it could be helpful for designing monster ai, to discuss why >> in fact the mosnters will attack. >> >> I came up with several ideas, each of them could be coded separately. >> >> - Pure instict -- monster will attack anything that moves. Man-eating >> plants, spiders, snakes will probably act this way. And true *monsters*. It's the nature of the monster to attack the hero(ine). Many undead, various monstrous beasties, berserk robots, etc. will simply attack. Frenzy would be a temporary version of the unthinking attack which could be brought on by demonic possession, religious frenzy, spells, spell failure backlash, eating red magic mushrooms, the sting of scarlet scorpion, etc. >> - Cornered defense -- if a monster is cornered (or thinks it's cornered) >> it will try to defend itself by attacking directly. If a monster thinks that it is threatened, that its young/mate/allies are threatened, or that its goods are threatened, it will attack "defensively". If it does not become enraged, it will generally be satisfied if the threat retreats. >> - Hunting -- if the mosnter is hunting, it will first try to evaluate the >> opponent's power, then, if it decides it's worth the risk, it will attack. >> If there is another pray that's easier to kill and more tasty, it will go >> for it. On the other hand, if something unexpected happends, or the pray >> seems to be powerful, the monster will flee. It's also possible to be attacked by getting in the way during a hunt. The hunter may maul you to get you out of the way. You may want some sort of "hunger counter" on predators, although one might also kill something "for later". Predators may also attack other predators to drive them away from a kill. If plants are represented, "hunting" may include mushroom eaters and such. One might class disenchanting beasts that feed on magic as hunters. >> - Defending terrority -- the mosnter will first try to scare the enemy, and >> if that fails it will attack. The size and estimated power of enemy >>doesn't matter. This is another form of defensive attack, although it requires less in the way of an appearance of "threat" by the target. They might prefer to tell an intelligent intruder to go away before attacking. However, they might also prefer to kill in a surprise attack. >> - Muggling -- the monster will act as when hunting, only it doesn't want >to kill >> his enemy. It will probably make it unconscious and take his possesions. A mugger won't care about killing his enemy, but won't necessarily favor an attack that tends not to kill. In this case, obvious wealth should be weighed against obvious threat when deciding whether or not to attack. Multiple muggers might fight over the loot. Related is the robber, who will threaten in an attempt to get the goods without actually fighting. A band of outlaws might be satisfied with a sack of gold and go away rather than fight a heavily armed adventurer for his magic rings. Of course, you have thieves like pickpockets who simply want to take something and get away. They'll fight only if cornered. >Capture -- Monster wants to knock enemy unconcious and drag him somewhere >else. Motives for capture can include selling for ransom, selling into slavery, keeping as a slave, sexual assault (probably better have a warning on any game where this motive is used), keeping around as fresh meat for later, forced marriage, practical joke. >Guard -- Monster is given the task of defending a person, a location, or an >item, or more than one. A form of defensive attack as I defined it above. >Patrol -- In addition to guarding, a patrolling monster will also actively >seek out ill deeds (pickpocketing, ect) and try to stop them. Guards will >be more focused with protecting, patrollers will be more focused on a target >when found. Law enforcement would be another motive for capture. Unlike a defensive attack, a law enforcement attack would not be satisfied by seeing the target run away, but would continue until a kill or capture was made, or continued pursuit was impossible. >Bumbler -- No purpose. Or at least it appears that way. No purpose would be the "instinctive" attack. >Sentry -- Similar to Bumbler. Stands still. This is just an instinctive attacker who can't move. Like the plants originally mentioned, probably. >Citizen -- A person with an agenda. Otherwise is another bumbler. "An agenda"? The question was what the agenda might be. >Most enemies would attack if attacked in self defense. Citizens might be an >exception, where they would prefer to flee. Mercenary -- some other creature has paid the creature to attack the target. Reproduction -- a creature like some wasps or the alien in Alien, it wants to insert its eggs into another creature so the little guys can eat their way out in a short while Ego -- young punk is looking to make his reputation by taking out the fabled warrior, or the town bully thinks he's found an easy mark Hatred/Revenge -- target, or someone like the target (same race, religion, whatever), has done some perceived harm to the attacker; a defensive attack to protect one's young can become a hatred attack if the threat actually kills them. This kind of attack can be as persistent as the instinctive kind, or even more so Rivalry -- attacker and target want the same thing, such as two adventurers fighting over the Amulet of Yendor; probably one will retreat if it becomes clear he will lose Trophy Hunting -- unlike food hunting, this isn't about survival and tends to prefer more difficult and spectacular prey; head-hunters would fall under this category; an orc might kill elves to collect the ears as trophies rather than out of hate Supply Hunting -- killing not for food but for other uses of the prey; necromantic types seeking corpses, killing animals for fur and monsters for magically significant parts (the old "eat them for intrinsics" bit) -- R. Dan Henry rdanhenry@earthlink.net They can have my ASCII graphics when they pry them from my cold dead (c) and (d) slots.