Please note that new user registrations disabled at this time.

NPC response to PC generated environmental stimuli

This forum is to be used for all discussions pertaining to BioWare's Neverwinter Nights, its Shadows of Undrentide and Hordes of the Underdark expansion packs, and any user-created or premium modules.
Post Reply
User avatar
Grumbling Grognard
Posts: 2
Joined: Sat Nov 11, 2000 11:00 pm
Location: Texas!
Contact:

NPC response to PC generated environmental stimuli

Post by Grumbling Grognard »

"NPC response to PC generated environmental stimuli"

Big words, but a basic and key component in a RPG (IMHO of course).

The 'classic' example is noted on pages 115-116 of the 3e PHB in the combat example given. A party is trying to break down a door and attracts the attention of nearby orcs with the noise.

My question is the response of the orcs to the noise of the party busting down a door going to have to be scripted? Or will the orcs automatically make "Listen Checks" Vs all activities within a certain area (with appropriate modifiers for distance, intervening walls, doors, etc.)

I am thinking that this will have to be fully scripted by the DM, but it would be nice if such 'basic' behavior as investigating noises could be built-in.

And what about something a little harder to 'nail down' like spotting. Again a perfect example is given in the 3e PHB (p 120, under "Awareness and Surprise" third example). I will quote this one, as it is pretty short:

> The party is advancing down a dark corridor using
> light spells to light the way. At the end of the corridor
> is a kobold sorcerer who does not want to be disturbed
> and she angrily casts a lightning bold. That's the
> surprise round. After the lightning bolt, the first regular
> round begins, and the party is in a tough spot, since
> they still can't see who attacked them..."

Now, listen checks are in 3e as are spot checks. But I don't think the kobold needed to pass a "spot check" to see a party stomping down the same corridor, toward him, casting multiple light spells as they approached. And if he did the modifiers would be HUGE!

Sight range according to the PHB is 60' for darkvision (for example). But in the situation I described above the kobold could see that party at a MUCH greater distance because she was in the dark and they were approaching using light spells (in that example). ...So IMO, the game engine will have to be checking for spotting versus ANYBODY with a light source in LOS when the spotting creature is NOT currently IN a lighted area itself (with HUGE modifiers IMO). This would be no simple task IMO.

The game could simply allow the DM to script each and every possible encounter where one creature might not be in a lighted area so that the creatures that are "in darkness" will be able to easily spot others carrying torches, etc. (no small task that either!).

It gets worse still... Consider this example: TWO parties of PC's are both approaching each other down a darkened corridor. One is carrying torches...the other is made up of only of demi-humans using their night vision and darkvision. NWN has to be coded to allow the non-human party spot easily while the other party could not spot at all (or with huge negative mods). AFAIK, there will be no way to "script" this sort of sighting for player controlled characters. Nor is it sufficient for the DM to simply tell the demi-human party "You see a group bearing torches approaching" because even then the demi-humans could not attack at range due to the game engine not recognizing that the torch bearing party was spotted by the demi-humans in the dark.

How will NWN handle a situation like this, scripting again? I hope not, things like SEEING and HEARING are basic to almost all creatures. I hope they are fully implemented in the core game.

------------------
The Grumbling Grognard
The Grumbling Grognard
User avatar
Grumbling Grognard
Posts: 2
Joined: Sat Nov 11, 2000 11:00 pm
Location: Texas!
Contact:

Post by Grumbling Grognard »

(Just thought I would start off with an easy one...)

Image Image Image Image Image

------------------
The Grumbling Grognard
The Grumbling Grognard
User avatar
Rev
Posts: 14
Joined: Tue Oct 10, 2000 10:00 pm
Contact:

Post by Rev »

Well Grumbling, you have certaintly hit on a great question. Although my experience is limited in the implementation of monsters/npc response, I'll do my best to discuss your question.
Basically it boils down to how the core AI works for the monsters/npcs.
To have the them listen/see, each monster/npc have the different eviromental awareness characteristics that would allow for reactions to the player actions.
Having coded an AI before I found that implementing this in the core game would be essential as it would be very difficult to have a api where the DM could set these variables, but on the other hand it would really suck to code into the game...
here's some pseudo code about how it would work.
/*Monster AI by rev
my monsters would have the attributes
vision(available_light) would include:
day_vision(distance, light_intensity,object)
night_vision(distance,light_intensity,object)

hearing(distance,direction,room_type,background_noise, echos)

smelling(object, stimuli)

resting()

alert()

hostile()
... and so on... so the monster would look around, see, smell, and whatnot constantly.
if(hear noise OR see new object in room)
monsterbecome(alert())
investigate
if(see friend)
monsterbecome(resting())
acknowledge
say hi..
have tacos
if(see enemy)
monster(become hostile())
if(distance to enemy is close)
draw best melee weapon
melee attack
else
draw best ranged weapon
ranged attack
elseif not enemy
alert()
eat tacos..
if(see something different)
monsterbecome(alert())
investigate
....
this could go on for days.. anyways... the core game would need to implement this for each monster based on thier characteristics of enviromental awareness.

I don't think taste would work.. cuz if
they are already eating you.. then well.. you're done.. =)
*/
The modifiers would be as you put it... absolutely insane for all this to be implemented in the core.. but i believe that's where it should be done there cuz it's too much for the DM. IMO

but that's just what i think..... =)
Post Reply