The goal of the NPC AI framework is to provide a general guideline to designing believable behavior of the NPC that reflects the consequences of choices the player makes through the game. Let's take an example and break it down, as usual.
Is this a nice way to create emergent behavior? Take for an instance the player kills an NPC. Nobody knows of the murder, right? After a few days, other NPCs tagged as the dead NPC's friend's will notice his disappearance and will investigate, eventually triggering the sheriff's investigation script.
If the player leaves town before the news got out, he might be spared from the questioning, but the information bit would have been flagged and next time when he returns the sheriff will seek him out and have a world with him.
Would this be a good way to inject life into the game world? Will this be too much to handle?
Tycho chats up with the player in the bar, knowing that he is a stranger in town and could do some errands befitting a stranger. He talks to him about a job with nice pay, after finding out that the player is a person who is willing to overstep the boundaries of law for personal gain.
- Tycho recognition check: does not recognize player
- Tycho moral compass check: player is chaotic neutral (for example)
He then "suggests" the player "remove" a particular NPC named Nancy, who he claims to be disrupting his business. Once Nancy is gone, the player can come back and collect the money. The condition is, the player must keep this a secret, and make the death look like an accident.
- Tycho quest marker: quest initiated
The player then proceeds to Nancy's and observes the NPC's schedules for a while. He notices that Nancy often climbs down an abandoned well to pray in the bottom of the well, and schemes that a slight knock will cause the walls of the well tumbling down, crushing Nancy underneath.
The player casually walks up to the well and pushes the rocks in, and returns to Tycho for payment. Tycho tells the player to wait a few days to see if the job was done according to requirements.
The next morning, and NPC notices the well being broken and investigates. The NPC discovers Nancy's body, and reports it to the Sheriff. The Sheriff comes and take a look, and then realizes that it is not an accident but a murder. He alerts the entire town to the murder and begin questioning suspects.
- Townsperson recognition check: does not recognize well
- Townsperson script trigger upon foreign data: investigate data
- Townsperson discovery check: well is destroyed
- Townsperson destruction check: ignore well (low priority)
- Townsperson discovery check: Nancy's dead body
- Townsperson destruction check: report death (high priority)
- Sheriff reaction check: death investigation (high priority)
- Sheriff discovery check: well destruction is not natural
- Sheriff reaction check: alert for murder in town (high priority)
- Sheriff detective check: check NPC schedules
- Sheriff detective check: no NPCs passed by
- Sheriff memory check: player (stranger) is in town
- Sheriff script trigger: murder dialog script with player
The sheriff proceeds to investigate all NPCs that happen to pass by that area, and finds nothing. Then he remembers that the player is in town, who is a shady stranger and proceeds to question the player.
Is this a nice way to create emergent behavior? Take for an instance the player kills an NPC. Nobody knows of the murder, right? After a few days, other NPCs tagged as the dead NPC's friend's will notice his disappearance and will investigate, eventually triggering the sheriff's investigation script.
If the player leaves town before the news got out, he might be spared from the questioning, but the information bit would have been flagged and next time when he returns the sheriff will seek him out and have a world with him.
Would this be a good way to inject life into the game world? Will this be too much to handle?