Intro
------------------------------
Hi all.
This is a mod which allow NPCs to sneak and perform sneak attacks on PC.
Well, sort of.
Important URLs:
------------------------------
Download: http://tesnexus.com/downloads/file.php?id=34675
RELEASE THREAD: http://www.gamesas.com/index.php?/topic/1116560-relz-realistic-sneak-for-npcs/
Requirements
-------------------------------
Latest Oblivion patch
OBSE 18+
How it works
------------------------------
This mod is a heavy modification of Reneer's NPC Sneak Mod.
A script is running in the background which distributes a ring to the NPC actors in the cell.
This ring runs a script for those NPCs. It calculates a chance for PC to detect a NPC, based
on a respective Sneak skills and Agility attributes.
Chance to hide for NPC is:
(NPCSneakMod^2 + NPCAgi^2 / D^2) / (PCSneakMod^2 + PCAgi^2 / D^2 + NPCSneakMod^2 + NPCAgi^2 / D^2)
where
PCSneakMod is PC Sneak skill modified by luck (+2 skill for +5 luck in vanilla game, may be modded)
PCAgi is PC Agility attribute
NPCSneakMod is NPC Sneak skill modified by luck (+2 skill for +5 luck in vanilla game, may be modded).
Optional penalty for having weapon out and wearing heavy armor can be applied via ini.
NPCAgi is NPC Agility attribute
D is a special factor which determines relative power of Sneak and Agility in this formula. It is
calculated as fDamageSkillMult / fDamageStrengthMult . In Vanilla D = 3 (1.5 / 0.5), in my FCOM game
it is 4.5 (2.25 / 0.5).
This "able or not to hide" piece of info is recalculated every combat round (which is 6 seconds
by default, can be changed in the ini. Yes, i like DnD).
Then, if NPC is flagged as 'able to hide' and the following occurs: NPC is sneaking OR is in
combat AND distance from PC to NPC is greater than 250 units (approx 3.5m, adjustable via ini),
then NPC goes into hiding - by becoming 100% transparent (level of transparency can be changed
via ini).
Now, if the NPC is in combat and player is a combat target of NPC he/she can execute a (ranged)
sneak attack on you. It is done by predicting damage (via formula from UESP Wiki), calculating
damage multiplier (Vanilla way or Stealth Overhaul way - adjustable via ini) and then modifying
NPC's AttackBonus hidden parameter so the total damage done to player would be increased similar
to Sneak Attacks that PC can perform.
If PC blows NPC's cover (by coming closer or winning sneak contest outlined above) then NPC
transparency disappears and his/her AttackBonus returns to original value.
Note: this mod makes all those Outlaw Bowmen alot more dangerous! So all this "Sneak Attack" NPC
behavior may be disabled in the INI.
Special notes
-------------------------------
The formula for damage prediction should be correct, but the formula for doing Sneak Attack
damage might be not, though i've tried my best to adjust it. So if u notice any glaring
inconsistances in damage (regular shot for 30, but 3x Sneak attack shot for 70 instead of 90)
please notify me along with data on NPC - level, skills, stats base damage from weapons.
Turining on debug in ini will be helpful with this
List of changes
-------------------------------
1.04
Tweaked combat behavior: actors will now go into hiding when in combat only with bow drawn. So
you wouldn't see any more of invisible ninjas in melee.
1.03
1. Bugfix: under some circumstances NPC would not come out of hiding. This has been fixed.
1.02
1. Again modified detection formula. Now weights for Agility and Sneak parameters are same as
in-game damage formula.
2. Added optional penalties for wearing heavy armor and/or having weapon/shield out.
3. Reveal Distance can be adjusted via ini now
1.01
1. Modified detection formula, added Agility and Luck.
2. Bugfix: iCombatRound variable which controls combat round duration didnt work at all.
1.0
Initial release.
Load order
-------------------------------
Shouldn't matter at all.
Upgrading
-------------------------------
Go into cell where all actors are visible (not fighting or sneaking).
Save game.
Disable mod.
Load game, save again.
Enable mod and play.
Deinstallation.
-------------------------------
Go into cell where all actors are visible (not fighting or sneaking).
Save game.
Disable mod.
Bugs/Incompatibilities
-------------------------------
Bugs: none known.
Incompatibilities: incompatible with Reneer's NPC Sneak Mod, as my mod is based heavily on his,
quest, item and both scripts have same names, along with many variables.
Credits
-------------------------------
Reneer - without his NPC Sneak Mod, this one would never be created. Thx alot Reneer!
Jroush - for advice about using AttackBonus.
Beathesda - for game.
God - for a whole universe.
Legal
-------------------------------
I dont care tbh.
However, my version of this mod will always stay on TesNexus.
Also i'd be happy to see suggestions, reports etc about this mod.