I have a quest in the module I’m working on now where the player and the party is to be sneaking around and not be detected by guards. I have the guards being not hostile (not sure if this has any effect on things). When going into hide/sneak mode with the PC (he happens to have 2 points on his Hide/Move silently skill). The guards have 7 points on Spot and still this quest seems a bit easy. Thing is, I can have the PC about a few millimeters from the guard while in sneak mode and he doesn’t see or hear the PC. On rare occations the PC is detected though so the script seems to be working alright. Maybe I’m doing things the wrong way? I have placed my own kind of script on the OnPerceive of the guards. It looks like this:
//::///////////////////////////////////////////////
//:: Default On Perceive
//:: NW_C2_DEFAULT2
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Checks to see if the perceived target is an
enemy and if so fires the Determine Combat
Round function
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 16, 2001
//:://////////////////////////////////////////////
#include "hench_i0_ai"
#include "ginc_behavior"
#include "ginc_death"
void main()
{
// * if not running normal or better Ai then exit for performance reasons
// * if not running normal or better Ai then exit for performance reasons
//if (GetAILevel() == AI_LEVEL_VERY_LOW) return;
// script hidden object shouldn't react (for cases where AI not turned off)
if (GetScriptHidden(OBJECT_SELF)) return;
int iFocused = GetIsFocused();
object oPC = GetFirstPC();
object oLastPerceived = GetLastPerceived();
int bSeen = GetLastPerceptionSeen();
if (iFocused <= FOCUSED_STANDARD)
{
if (bSeen && GetIsPC(oLastPerceived) && !GetIsDead(oLastPerceived, TRUE) && GetGlobalInt("sneakdrow"))
{
if(!GetHasEffect(EFFECT_TYPE_SLEEP))
{
if(!GetActionMode(oPC, ACTION_MODE_STEALTH))
{
SetCutsceneMode(oPC);
SetWalkCondition(NW_WALK_FLAG_CONSTANT,FALSE, OBJECT_SELF);
AssignCommand(oPC, ClearAllActions());
AssignCommand(OBJECT_SELF, ClearAllActions());
AssignCommand(OBJECT_SELF, ActionStartConversation(oPC, "c_urd_noticed", FALSE, FALSE, TRUE, FALSE));
}
else if( GetIsSkillSuccessful(OBJECT_SELF, SKILL_SPOT, 12))
{
//
SetCutsceneMode(oPC);
SetWalkCondition(NW_WALK_FLAG_CONSTANT, FALSE, OBJECT_SELF);
AssignCommand(oPC, ClearAllActions());
AssignCommand(OBJECT_SELF, ClearAllActions());
AssignCommand(OBJECT_SELF, ActionStartConversation(oPC, "c_urd_noticed", FALSE, FALSE, TRUE, FALSE));
}
else
{
SendMessageToPC(oPC,"You were lucky. The guard didn't notice you.");
}
}
}
}
}
I just would like it to be a little challenging sneaking around, without it being too hard. Have anyone out there done something like this that have worked well?
The odd thing is that if (and that’s when using the default OnPerceive script) the PC is not in sneak/hide mode the guard tend to notice the PC VERY easily. It feels like there’s no middle ground here. I don’t know. I have tried with different settings with Perception Range Short and sometimes Perception Range Medium.
Anyway, if anyone knows of a good middle ground to all this, so that it is balanced ok, then maybe you could let me know. Thanks for your time!