[WIP] SDR - Sneaking Detection Recalibrated - 8.x.x

Post » Tue Nov 25, 2014 4:48 pm

=========== SDR - Sneaking Detection Recalibrated ============

This mod completely rewrites how sneaking/detection works. Complete details are on the main file site (see link above).
A brief list of the main features* are as follows:

  • Takes into account the light falling on the detector as well as the player
  • No skills are modified in any way
  • All penalties / bonuses are calculated separately for each detector-player relationship
  • Having a lit torch can cancel out any current or cast invisibility spell effects on the player.
  • New spells to deafen/blind targets as well as muffle your character's noise, with custom spell icons.
  • New spells for NPCs to cast blindness/deafness on the player.
  • Extended sneak attack bonuses up through Master Sneak.
  • Everything you have equipped impacts your sound penalties, not just boots.
  • Equipped gear takes into account, clothing, light armor, heavy armor, and weapon (if drawn).
  • Equipped gear penalties apply to player and NPCs.
  • Sneak Skill-up bonuses for undetected assassinations
  • New hearing/vision traits for all races and creatures. Takes into account peripheral and binocular vision angles.
  • Sneaking NPCs can become transparent if not invisible.
  • Chameleon refraction effects replaced with transparency.
  • Designed for Oblivion and Nehrim.
  • NPCs will actually cast Detect Life and Night-Eye spells and powers if they have them and are spooked.
  • SM Combat Hide mod by Strategy Master is adapted and built in (with permission).
  • New Perks, such as sneaking while sprinting and bypassing pressure plates and tripwires.
  • Patches / Compatibility for Real Sleep Extended, Basic Primary Needs, Bare Necessities, Oblivion X.P., Druid Mod Remade, Thieves Arsenal, and Reneer's Guard Overhaul.
  • Dynamically changing Night-Eye effect that changes in color and peripheral constraints depending on the lighting conditions.
  • Fully customizable to taste via .ini file settings.

Voted FILE OF THE MONTH on the Oblivion Nexus for April, 2012

SDR has reached 370 endorsemants and over 10,000 unique downloads on the Oblivion Nexus, making it the [2nd*] most endorsed stealth mod on the Nexus! Thanks for the love y'all. :wub:

* SDR was number two to Jog's Stealth Overhaul for a long time, but then SDR overtook and widely surpassed his, but now Jog's is back to number one again. It's not a race, right?

=========== Forum Thread Rules ============

- If you are asking about how SDR works, you must read the .ini User Guide first before asking here.
- You can request new features, but there is no guarantee that I will implement them.

- If there is a problem, it is most likely one of three things:

  • The SDR OBSE plug-in is not installed correctly
  • Another mod is conflicting with one or more settings (usually disabling/changing an .ini setting in either of the mods will solve the problem)
  • There really is a problem with SDR (you must have tested SDR on its own with no other mods installed to claim this)

To properly trouble shoot an issue:

  • Read the documentation thoroughly first. It will most likely answer your question, or provide a method to solve your problem.
  • If there is a conflict with another mod or some other weird behavior, you may only need to change a setting in the .ini. See documentation.
  • Search this thread or previous ones to see if the issue has already been reported and solved.

If you still haven't solved the problem, I am more than happy to help. You must include the following information in your post:

  • A brief description of the issue
  • Which versions of SDR and OBSE you are using.
  • A detailed description of the issue
  • Your load order
  • Links to videos or images that might show more detail on the problem (if applicable/possible)

If you discover an issue and resolve it, please post the issue and the solution in this thread so that others may find it.

=========== Current Version ============

Current stable release: v.7.3.2, as of February 25, 2014

7.3.2 is now available in the following installation package formats:
- Patch Only (for those with 7.3.1 installed)

7.3.1 is now available in the following installation package formats:
- Wrye Bash Bain package with Installer Wizard (works for Oblivion and Nehrim)
- Manual installer for Oblivion Only
- Manual installer for Nehrim Only
- RGO for SDR patch is available as a separate download in the optional files section. (It is already bundled in the Wrye Bash installer, but not the other packages)

Note: omod installer is not available at this time. I apologize for the inconvenience, but will rectify at a later date.

Download links, installation instructions, and load order recommendations here: http://www.saebel.net/SDR/sdrInstall.php

The .ini file structure system has changed, so if you are upgrading from any version prior to the 7.x.x series, only use your old .ini files as a reference.

Visit the http://saebel.net/sdr.php for complete details, including mod-conflict info, performance tips, and much much more!

=========== NEW 8.x.x Alpha Version in DEVELOPMENT! ============

The SCOOP!
I have taken the plunge and completely overhauled the inner workings of SDR with the primary goal of boosting performance and generally fixing all the little things that have been bugging me and other players.
For those of you that build OBSE plug-ins, are modders that might want to take advantage of some of the new stuff, or just fans of SDR, this is a very big deal.
The entire detection formula has been moved out of the scripts in the SDR.esm and converted into functions in the sdr.dll plug-in. In order to do that, I created my own method of storing and retrieving custom actor values. As such, the Add Actor Values plug-in will no longer be required in the next version.
The new SDR system uses a three tiered nested array (3TNA) system. In addition, the functions are exposed which means other modders can utilize the same techniques. Performance appears to be on par with AAV. One advantage that the 3TNA system has over AAV is that it can store floats as well as integers, while AAV was restricted to only storing integers.
For complete details on how the 3TNA system works, see the spoiler below:
Spoiler
========== Details on the 3TNA Array System ============
The top tier is a string map array of all the mods that have actors with stored values, using the mod name as a key for each key:value pair, with the value being another String Map array of the actors (middle tier).
Oblivion.esm: (array of actors)
OOO.esm: (Array of actors)
etc.
When SDR starts it will check against the list of mods that were loaded against the list of mods stored as keys in the array. If any of the keys/mods are no longer loaded, those records will be deleted from the array. This will make sure that SDR cleans up after itself and reduces bloat.
NOTE: the mod name keys are not actually populated into the array until a data type value is added to an actor ref. So if a mod doesn't have any actors associated with it, they will never appear in the array.
The middle tier is an array of all the actors (connected to the mod of the parent key) that have been assigned one or more values.
I've created a custom .dll function ("sdrGetParentModName") which can be used to quickly retrieve the parent mod name of any reference (or optionally an object belonging to a reference). This function is called to find/set/retrieve the array stored with the ModName as key.
I've also created a custom .dll function ("sdrGetCoreRefID") which strips the modIndex from the hexadecimal value of the actor ref's form ID and uses that as the key for each key:value pair in the actor list array. This allows you to change the load order of mods without losing that specific actor's data or creating duplicate entries for the same reference.
Here is a print out of a debugging log that shows the results of my tests. The base RefID is in parentheses after the actor name:
SDR: Test'yr (000014)
SDR: Ra'Jhan (01eb85)
SDR: Marrie (006238)
SDR: Imperial Watch (01c34d)
The bottom tier is a string map array of all the actor data types and their values that belong to the CoreRefID/key of the parent actor. For example:
["avDistToPlayer":1500]
["avStealth":48]
etc.
So overall, the array tier would be something like this:
MainDataArrayMap[
["Oblivion.esm":[actor array map]]
["000014":[data array map]]
["avSkClothMult":1]
["avSkLightMult":1.2]
["avSkHeavyMult":.8]
etc.
["01c34d":[data array map]]
["avSkClothMult":1.2]
["avSkLightMult":1]
["avSkHeavyMult":2]
etc.
etc.
["Better Cities.esp":[actor array map]]
["0021a2":[data array map]]
["avSkClothMult":.8]
["avSkLightMult":1]
["avSkHeavyMult":1.2]
etc.
["178b2e":[data array map]]
["avSkClothMult":1]
["avSkLightMult":.8]
["avSkHeavyMult":1.4]
etc.
etc.
etc.
]
===================== Default Data =http://forums.bethsoft.com/topic/1510763-wip-sdr-sneaking-detection-recalibrated-8xx/==================
Part of the system will include a method for very quickly setting default values for an actor, rather than having to set each one with a function call.
As an example, with SDR, I intend to set the defaults immediately when a token is first added to an actor. It will then be immediately updated with the correct values as the token initializes.
Here's a list of all the data types SDR currently uses and what their default values will be:
; token status
Let vDefaultData["avTokenValid"] := 0 ; 1 = valid token, meaning it has been initialized

; Actor traits
Let vDefaultData["avActorType"] := 0 ; determines if one of the NPC races (0), Creauture (1), undead (2), or daedra (3)
Let vDefaultData["avBaseAlphaValue"] := 1 ;" Alpha Value (transparency) 0 to 1, 1 equals solid
Let vDefaultData["avVisionQuality"] := 2 ; a.k.a. "VQ". Scale of 0 to 4, 0 = blind. 2 is average.
Let vDefaultData["avVisionFOVp"] := 180 ; Peripheral field of view range
Let vDefaultData["avVisionFOVb"] := 120 ; Binocular field of view range
Let vDefaultData["avHearingQuality"] := 2 ; How well the actor can hear. Scale of 0 to 4. 2 is average.
Let vDefaultData["avHearingType"] := 0 ; how the ears handle directionality, 0 = fixed, 1 = semi-flexible, 2 = omni-directional
Let vDefaultData["avStepWeight"] := 3.5 ; this is the "foot-weight of the actor, loosely based on their race weight/creature foot weight, scale, and strength

; Actor values
Let vDefaultData["avStealth"] := 0 ; SDR's Effective Sneak/Stealth/Perception AV
Let vDefaultData["avChameleon"] := 0 ; SDR's adjusted Chameleon value.

; Actor gear
Let vDefaultData["avUpdateGear"] := 0 ; flags whether or not to update all the gear related actor values.
Let vDefaultData["avHelmetArmorRating"] := 0 ; when wearing Helmet, Armor Rating is applied
Let vDefaultData["avHelmetPenaltyFOV"] := 0 ; the field of view penalty when wearing a helmet / hood
Let vDefaultData["avEncumbrance"] := 0 ; how much weight the actor is carrying
Let vDefaultData["avSkClothMult"] := 1 ; the multiplier to cloth gear noise based on skill of actor
Let vDefaultData["avSkLightMult"] := 1 ; the multiplier to light armor gear noise based on skill of actor
Let vDefaultData["avSkHeavyMult"] := 1 ; the multiplier to heavy armor gear noise based on skill of actor

; Actor statuses
Let vDefaultData["avVampirismStatus"] := 0 ; determines how far along in vampirism an actor is. 0 = not a vampire
Let vDefaultData["avHealthFatigue"] := 0 ; the modifier to detection based on health / fatigue
Let vDefaultData["avIsUnconsious"] := 0 ; 1 = unconscious
Let vDefaultData["avGetSleeping"] := 0 ; GetSleeping (for detection formula calc)
Let vDefaultData["avIsTalking"] := 0 ; Determines if the actor is currently talking
Let vDefaultData["avIsInDialogue"] := 0 ; Determines if the actor is currently in dialogue with someone else.
Let vDefaultData["avDeafness"] := 0 ; How deaf the actor is
Let vDefaultData["avHearingCurrent"] := 2 ; The current hearing quality of the actor. (the regular avHearingQuality will probably be the default, but may be modified by spell effects.)
Let vDefaultData["avMuffleMult"] := 0 ; 0 = no muffling, 1 is 100% muffled
Let vDefaultData["avTotalMass"] := 10 ; combines step weight with encumbrance
Let vDefaultData["avFollowerType"] := 0 ; 0 = not a follower, 1 = companion, 2 = summoned

; movement related
Let vDefaultData["avLandingBump"] := 0 ; the bump for being detected when landing after a fall/jump
Let vDefaultData["avTerrainType"] := 0 ; the type of terrain the actor is currently treading on
Let vDefaultData["avMoveRateMult"] := 1 ; the modifier to detection based on how fast the actor is travelling
Let vDefaultData["avMoveType"] := 0 ; how the actor is moving (0 = standing still, 1 = turning in place, 2 = walking, 3 = running, etc.)
Let vDefaultData["avIsSneaking"] := 0 ; IsSneaking (for .dll detection formula calc)

; Detect Life Shader Number
Let vDefaultData["avDetectLifeEffectNum"] := 0 ; for clearing out Detect Life Effects on death

; Temp Blindness Calculations
Let vDefaultData["avTempBlindValue"] := 0 ; the blindness level of the actor due to magical effects
Let vDefaultData["avTempBlindDurationMax"] := 0 ; the maximum duration of the temporary blindness effects
Let vDefaultData["avTempBlindSecondsPassed"] := 0 ; how many seconds have passed since the temp blindness effects were applied

; Temp Deafness Calculations
Let vDefaultData["avTempDeafValue"] := 0 ; the deafness level of the actor due to magical effects
Let vDefaultData["avTempDeafDurationMax"] := 0 ; the maximum duration of the temporary deafness effects
Let vDefaultData["avTempDeafSecondsPassed"] := 0 ; how many seconds have passed since the temp deafness effects were applied

; Detection formula related
Let vDefaultData["avDetectionFormula"] := 0 ; Detection Formula to use
Let vDefaultData["avDistToPlayer"] := 10000 ; Distance of actor to the player
Let vDefaultData["avAttackedPlayer"] := 0 ; Distance of actor to the player
Let vDefaultData["avRadiusTorch"] := 0 ; The radius of light supplied by a lit torch, if any (for detection formula calc)
Let vDefaultData["avRadiusLight"] := 0 ; The radius of light supplied by a an active light spell, if any (for detection formula calc)
Let vDefaultData["avLightLevel"] := 100 ; the light level hitting the actor. Scale of 0 to 100. 100 equals fully lit
Let vDefaultData["avAudioPenalty"] := 0 ; the total audio penalty based on movement rate/type, gear worn, and weapons drawn
Let vDefaultData["avFactorCrimeGold"] := 0 ; Current skill detection adjustment due to crime gold set on the actor
Let vDefaultData["avFactorClothingValue"] := 0 ; Current skill detection adjustment due to value of clothing on the actor

; External mod values
Let vDefaultData["avxDetectorAdj"] := 0 ; adjustments to the detector's chance to detect, tweaked by external mods
Let vDefaultData["avxTargetAdj"] := 0 ; adjustments to the target's chance to detect, tweaked by external mods
Let vDefaultData["avxRealSleepAdj"] := 0 ; adjustments applied based on factors from the Real Sleep mod
Let vDefaultData["avxBPNeedsAdj"] := 0 ; adjustments applied based on factors from the Basic Primary Needs mod
Let vDefaultData["avxBareNecAdj"] := 0 ; adjustments applied based on factors from the Bare Necessities mod

===================== Icing on the CAKE for MODDERS ====================
I am designing this system so that not only can SDR take advantage of it, but so can other modders that use SDR's plug-in.
I have created functions for Set/Get/Mod the data values. They look like this:
ActorRef.sdrAVSetNum "DataType" Value ArrayID
ActorRef.sdrAVModNum "DataType" Value ArrayID
ActorRef.sdrAVGetNum "DataType" ArrayID
In order to take advantage of this system, you only need some basic tools:
- construct a string map master array for the top tier
- create a method for calculating, storing, and referring to the master array ID
- construct a default array of actor values
- create some scripts that validate previous mod lists with the current mod list and removes mod records from the master array.
- create a script that finds and removes an actor from the array when they are killed off.
- create a system that regular cleans up dynamically created actors that are no longer in the save game
All of these things I will have to do for SDR, so I will provide example code as part of a modder's resource package.
You can then use the system to store/retrieve/modify actor values of your own design in any number of ways with (hopefully) minimal performance and bloat issues. In theory, you could probably have different "master arrays" for different purposes.
================ Conclusion: "Leave No Trace" =========================
I haven't dealt with arrays on this scale before, so I'm not exactly sure if there are any gotchas I haven't thought of yet.
The amount of data being stored is pretty much the same as before, so I assume that the overall game save size should be the same, possibly even less because of how AAV works.
Most of the issues that folks have brought to my attention have either been addressed or will be.
I am very much looking forward to hearing people's thoughts and suggestions about what I am planning on doing.
Progress Report
as of 11/24/2014
Current Alpha version: v.8.1.0 build 6
SDR OVERHAUL:
Description: All new features, conversion, optimization, updating, new functions, etc.:
Status: complete

ALPHA TEST:
Description: Me and a few brave volunteers (SuPierce!) running around and testing everything.
Status: complete (?)
UPDATE WEBSITE:
Description: Trying to stay on top of all the myriad of changes as I go!
Status: in progress
REVISE PLAYER'S HANDBOOK:
Description: mmmmmm. documentation fun!
Status: in progress (58% complete)
BETA TEST:
Description: Opening it up to users who want to give it a whirl for awhile before official release.
Status: not started
CREATE MODDERS API RESOURCE PACKAGE:
Description: This will includes detailed documentation on all the new features as well as examples for how modders can use them.
Status: in progress
MULTI-MEDIA PACKAGE:
Description: This will includes screenshots as well as a video "highlight" covering all the cool new stuff.
Status: not started (might not ever do it actually, but it's on my wish list)
RELEASE!
Status: TBD
Download It!
If you are feeling gutsy, you can try it out by downloading it here: http://www.saebel.net/SDR/sdrAlpha.php

It should be stable enough, but there is always a risk when working with Alphas/Betas.

User avatar
FABIAN RUIZ
 
Posts: 3495
Joined: Mon Oct 15, 2007 11:13 am

Post » Tue Nov 25, 2014 2:11 pm

Reserved.

Decided to merge the old SDR thread and the WIP thread together, since a beta release is fairly imminent.

User avatar
brenden casey
 
Posts: 3400
Joined: Mon Sep 17, 2007 9:58 pm


Return to IV - Oblivion