Quote:
For the record, that was actually the original scenario for the thread. The player would already be under extreme suspicion, possibly even known as an enemy, but he's unarmed and doesn't look to be threatening. I was looking for ways to react to it.
Yes, the only real variable that you have to track is the Threat level, however, this removes the context from the following interactions. So I took a step back and looked at how the situation could have got to that point, that is why I included the Suspicion level.
This system also allows you to ramp up the reactions of the NPC to the point in the initial scenario and so opens up more opportunity for the player to react in their own way to the scenario up to the point of interest (the NPC responding to the threat of the player avatar).
Quote:
I have full body motion and facial expressions to play with, but limited vocals. Dialog is text based, but vocals are still used for action-based situations, like injury yelps, grunting to lift something, or being suprised.
As the responses of the NPC could be pre-programmed and "stock", then any vocalisations would be not too dissimilar to what you have now. You would be triggering a vocalisation on surprise, but then all you need is to adapt that to respond to the state of the response system. So when the NPC enters a certain level of suspicion, it is a lot like the NPC entering into a state of surprise.
Just like you would play a sound for the surprise, then you just need to play a sound for the suspicion level like: "Halt! Who go there?", "Freeze!", "Hey you!", or some other little sound bite. A small selection of them for each state/reaction and randomly selected would give some variety.
If the response of the NPC was to engage the player in dialogue, then you could just use the existing dialogue system when that is triggered.
From the list of interface elements you described, I don't think you would actually need to create new ones, or new implementations of the ones you have now, just use them in a way that conveys the actions and intent of the AI. For instance, the more of a threat that they see the player, the more angry their facial expression, or head movement towards the player could indicate a low level of suspicion and turning the body to fat them could indicate a higher level of suspicion. Finally, vocalisations could ad clarification or an indication of escalating suspicion or threat levels.
Quote:
In this case, I think the result is worth it. Dishing out any resource assets will be pretty easy. The real challenge will be writing AI to handle all of the variations in player appearance, gear, clothing, and behavior. Figuring out how to mix these elements together with certain weights to generate a generic suspicion level. That sort of thing.
If content doesn't worry you, then you could make a very detailed system.
One solution to the AI is Tagging. Each piece of equipment/clothing has a set of tags associated with it. The AI then has a list of Tags that it considers suspicious or threatening (with a rating for that tag as well). When the AI sees the player, it can then just check the tags and apply its ratings (you could also have tags and rating that lower suspicion and threat too).
So you might have something like a Lab Coat with an insignia on it. The Tags might then be: Lab Coat, Muppet Labs. The guard might have the rating for these tags as Lab Coat = -5 Suspicion -5 Threat and Muppet Labs = -5 Suspicion +10 threat (if you have seen the Muppet's Muppet Lab sketches you will get this :D ).
So the AI will not see the player as Suspicious, but will see them as a potential threat. This might not be a high enough threat level for the AI to react in a threatening way towards the player, but they will probably be cautious of them and ready to respond to a threat. This might be indicated by having the guard place his hand onto the location of his gun while watching the player at all times until they are out of the guards zone.
If you want more details in the system, you could have qualifiers with each tag (so rather than just a string, they would be more like a data structure). These qualifiers could give more details for the AI to examine.
For example, you might have a qualifier for a Tag as "Enemy". If the AI sees this qualifier with a tag, then their threat response would be towards the player being an enemy. But if the threat qualifier was Avoid (like would be used for the Muppet Labs tag on the lab coat from the previous example), then the AI would not act as if the player is an enemy, but might instead avoid the player (knowing what comes out of Muppet labs :D ).
I was in a discussion earlier tonight and we were talking about this AI system and I came up with another idea.
At the moment this design is using a finite state machine to specify what behaviours the NPC can take. But, the idea I came up with was to have a list of action that the AI could do, and then enable or disable them depending on certain criteria which are a part of these Action's descriptions. The tag system could be useful in this too as it could also be used to enable or disable certain reactions. Going back to the "Enemy" tag, this might enable actions that would allow the NPC to hurt the player character (or imply hurt if their orders are not followed).