ACR AI Implementations

This is a general open discussion for all ALFA, Neverwinter Nights, and Dungeons & Dragons topics.

Moderator: ALFA Administrators

Post Reply
Zelknolf
Chosen of Forumamus, God of Forums
Posts: 6139
Joined: Tue Jul 05, 2005 7:04 pm

ACR AI Implementations

Post by Zelknolf »

It seems that BG is going to be doing a pretty-pervasive rollout of creatures which use ACR_CreatureBehavior for its NPCs' combat actions, so now seems a good time to bring up what this means for players.

A little refresher, this is actually work I did years ago. It was introduced in ACR v1.88 but since then has only really been deployed on creatures which need my system to operate (specifically, incorporeal creatures which use the Touch Attack feat from ACR v1.81 (as the default AI is much less reliable about actually using this attack). The ACR AI project was and is primarily a project to remove metagaming from the behavior of NPCs during combat. By default, NPCs have perfect knowledge of what buffs a given PC is using, what their armor class is compared to their attack bonus, how many hit points they have, where they're pathing to, etc. Similarly, they act in near-complete ignorance of their allies, which makes it very possible to, for example, blind and deafen a tank and then have the cleric (who has remove blindness/deafness prepared) decide it's a better idea to hit a PC with a stick (after all, the cleric isn't blind-- though, obviously, I assert that even an evil cleric is going to respond if his friend says "halp meh, ahm blahnd!" ["you're blond?" "whaht?"]).


So a few things that you can expect to see on the new AI:
  • Creatures who spot you, for whatever reason, need a couple seconds to scramble into action. They will alert their friends (I'm still working on having them shout something kin to "Oh shit!" in their native tongue; unfortunately, saying "Oh shit!" goes on the action queue, and so does picking up a sword. So I gotta give priority to the sword), but they too need a couple seconds. We want you to fight creatures, not computers, after all.
    • This means that stealth-having wizards should be able to approach and, provided that they're not detected before they start casting a spell, cast one spell on the ambushed party of NPCs before they react.
    • This also means that stealth-having rogues with ranged weapons have a slightly-larger window in which they can get a sneak attack in, as they'll also have the couple seconds between being spotted and the NPC actually ceasing to be flat-footed.
  • Creatures which are canonically idiots (zombies, skeletons, non-magical animals, vermin) will be very easy to manipulate and position to your needs, and also very easy to tank. They will tend to chase after whatever's closest, instead of acting according to some grand plan. This will make them difficult to kite (that is, running away increases the distance between you and them, so it'll take some maneuvering to make them not switch targets), but still easy to tank (the tank can just... walk up front. And the mindless critters will have a thought process roughly complex as "Imma bite this guy!")
  • Creatures which are intelligent will tend to try to identify what their role in the party is, and try to act according to the plan there. In this case, what the NPC sees you do and what they see you wearing is important for what the NPCs will do about you. If you shine with mighty divine power, they're likely to regard you as a good target for dispelling; if you wear full plate and a tower shield, they're likely to believe you're hard to hit; if you cast a spell on one of them, well now they know you're a spellcaster (and if they've got good spellcraft, they might even know what kind of spellcaster).
  • Creatures will regard themselves as part of groups/parties/"packs", which aren't meaningfully different in the code, except to say that if you put two creatures next to each other in the same faction, the ACR AI will assume that they're working together (but won't assume that about the guys in the same faction on the other side of the area-- even if they "work together," they're probably not in the same pack/squad/party/whatever).
    • Side note: if you're a builder and want to set a forward watch for a group, spawn the forward watch next to the group and instruct it to walk up to the lookout.
  • Builders will also be able to specify some creatures as cowards. This will probably look a little weird thanks to the same problems with my inability to make NPCs shout. As with drawing swords and charging, running away also competes with saying stuff on the action queue, but they will run for help and-- if they don't know where help is-- just try to run away from you until cornered, where they will cower.
  • Related, some creatures (particularly, animals) will run away when injured. Hopefully the fact that animals don't call your assault "bollocks" won't be too immersion-breaking. ;)
Right now, BG is the only server using the ACR AI on any kind of grand scale, though you'll find tiny pockets of it in all of the servers (particularly with incorporeal undead, who generally need it to be effective). Others might pick it up, if they like-- we're not yet doing anything so grand or dangerous as defaulting this for every creature.
User avatar
shad0wfax
Ogre
Posts: 684
Joined: Sun Mar 11, 2012 4:57 am

Re: ACR AI Implementations

Post by shad0wfax »

BG is slowly acquiring this behavior. Expect to see it on a pervasive scale within the next few days. As of now, we probably have 10% of the monsters on the AI.

That being said, if you notice any bugs on BG or behavior that seems incorrect, please let me know so that I can verify that it's not a mistake in my creature blueprints. Once we've verified that it's not a configuration problem in my blueprints, I can pass on bug reports to Zelknolf, if it is an AI bug.
User avatar
Castano
Head Dungeon Master
Posts: 4593
Joined: Wed May 26, 2004 5:42 pm
Location: USA

Re: ACR AI Implementations

Post by Castano »

great news. my dream is to get this AI into the campaign folder monsters and fill that folder with the BG monsters. Then we can all at our discretion, pull from the same pool of monsters.
On playing together: http://www.giantitp.com/articles/tll307 ... 6efFP.html
Useful resource: http://nwn2.wikia.com/wiki/Main_Page

On bad governance: "I intend to bring democracy to this nation, and if anybody stands in my way I will crush him and his family."
You're All a Bunch of Damn Hippies
Post Reply