[Relz] Sneaking Detection Recalibrated (#7)

Post » Wed May 02, 2012 9:39 pm

The default setting for detection is all values for a selected opponent.
1. Go into console mode
2. Type in "TDT" to toggle live streaming of console data on/off
3. Click on the opponent you want to track


I think I can create a general "brightness" setting on the nighteye effect for interior vs. exterior. There is already a game setting for it, but I am not sure how that will modify the new stuff.


Because spectral warriors are based on races (not creatures), they are more likely to receive spells. You could reduce the base chance of having everyone assigned a spell (which I think is fairly high, but I don't recall). The reason why they keep casting the spell is because the spell is ending. I'll throw in a check where if you have been detected and you are in line of sight they won't bother to recast the spell(s).
User avatar
Jhenna lee Lizama
 
Posts: 3344
Joined: Wed Jun 06, 2007 5:39 am

Post » Wed May 02, 2012 9:13 pm

If anyone is using the latest beta, I've had some bug reports on the nexus forums:
1. The FPS lag is cropping up again for some people. I'm wondering if either a) it's the SDR NPC Behavior.esp, or B) I munched something by mistake.
2. Folks who are being followed with CM Partners installed and the default NPC/Player fades when sneaking are running into a bug in which the followers turn invisible when the player pops out of sneak mode. Again, not sure what's causing it. Quick fix is to go into console mode, click on the invisible actor, and type "setactoralpha 1". That should make them visible again. I'll take a look at the code.

3. I am considering going back to an older "structure" - Three levels of difficulty instead of just two. A new middle layer would keep most of the flavor / low impact features so you still get a nice stealth overhaul, without as much FPS hit. Not sure exactly how I am going to do that yet, but I'll look at what I have and see what I can do. Or perhaps instead of a middle layer, just a section of "performance" boost options that will reduce the impact, such as an alternate method of calculating gear, or skipping certain parts of the formulas for creatures so that not everything is calculated all the time. I'll have to think about it some.

sorry about the mess, but it is a beta.

saebel
User avatar
Chris Guerin
 
Posts: 3395
Joined: Thu May 10, 2007 2:44 pm

Post » Wed May 02, 2012 11:52 pm

I did a performance comparison in the IC market place between the last two versions. With 4.2 I got about 10% drop in fps, with 4.2.3 it increased to about 20%. The main esp was enough to create it, the two others had no measurable impact. If you could keep the level of 4.2 that would be great.
Did you change that much between the two versions? Maybe a change in the OBSE plugin caused it?

I'll throw in a check where if you have been detected and you are in line of sight they won't bother to recast the spell(s)
Good idea. I would even go a bit further and only give those NPCs with mysticism as a major skill access to the spells.
If they have a detect life spell by default(a few OOO enemies do), will they also use these?
User avatar
Code Affinity
 
Posts: 3325
Joined: Wed Jun 13, 2007 11:11 am

Post » Wed May 02, 2012 10:53 pm

I did a performance comparison in the IC market place between the last two versions. With 4.2 I got about 10% drop in fps, with 4.2.3 it increased to about 20%. The main esp was enough to create it, the two others had no measurable impact. If you could keep the level of 4.2 that would be great.
Did you change that much between the two versions? Maybe a change in the OBSE plugin caused it?
In all honesty, I can't recall. There may have actually been something that *wasn't* working, that I fixed, and now that it is functioning, it's causing the hit. I'll have to take a deeper look.


Good idea. I would even go a bit further and only give those NPCs with mysticism as a major skill access to the spells.
If they have a detect life spell by default(a few OOO enemies do), will they also use these?
Good idea as well. Perhaps an .ini setting for minimum skill required, default 50. Same with night-eye.
User avatar
Nims
 
Posts: 3352
Joined: Thu Jun 07, 2007 3:29 pm

Post » Thu May 03, 2012 9:00 am

I wouldn't go overboard with ini settings. The ini is already large enough. :tongue: The spells are basically available for all skill levels and it seems natural that those with a major in the skill would use it and the others not, just like it is with all other spells, too.

There may have actually been something that *wasn't* working, that I fixed, and now that it is functioning, it's causing the hit
Actually the important features seemed to work flawlessly. If something minor had such a significant impact, you might be better of taking it out again. :tongue:
User avatar
james kite
 
Posts: 3460
Joined: Sun Jul 22, 2007 8:52 am

Post » Thu May 03, 2012 9:40 am

The problem with "majors" is that creatures don't have them, and I'm not sure NPCs have them either. The whole major/minor thing I *think* is player specific, and there are mods that override that. Base skill level is the most reliable method in this case, and easier to program.
User avatar
Jarrett Willis
 
Posts: 3409
Joined: Thu Jul 19, 2007 6:01 pm

Post » Wed May 02, 2012 10:14 pm

All NPCs have a class just like the player and there is an OBSE command that can check if a skill is a class skill. And I thought creatures, except liches, only get static nighteye abilities based on type so how does their skill matter? But the end result would not be much different anyways, so do as you please.
User avatar
Lucy
 
Posts: 3362
Joined: Sun Sep 10, 2006 4:55 am

Post » Thu May 03, 2012 9:06 am

I was testing this mod with the my next update to Curse of Hircine - Resurrected. I gave werewolves nighteye and life detection effects and it seems to work really well. Werewolves are now able to detect me even when trying to hide behind rocks or other obstacles. So very impressive.


The problem I am having with the .ini is I don't want to hard code all the creatures and races, and I'd love for it to be flexible enough so that folks can create add new creatures to the lists without me having to release a new .esp all the time. However, RunBatchScript can't run a "set StringVar to String", nor can it use any let statements. Basically it can only do commands that are available to the console. However, I'd really like to keep the dependency on other plugins as low as possible. So I'm looking into other possibilities, such as global variables and string game settings, the first could be applied to the .esp, the second to the .dll.

Actually, it is possible to assign string vars in the ini file by doing something like: set stringvar to sv_Construct "string". See the Hud Status Bars mod for full details and lots of interesting examples on how this works.
User avatar
OnlyDumazzapplyhere
 
Posts: 3445
Joined: Wed Jan 24, 2007 12:43 am

Post » Wed May 02, 2012 9:46 pm

I was testing this mod with the my next update to Curse of Hircine - Resurrected. I gave werewolves nighteye and life detection effects and it seems to work really well. Werewolves are now able to detect me even when trying to hide behind rocks or other obstacles. So very impressive.
Thanks!

Actually, it is possible to assign string vars in the ini file by doing something like: set stringvar to sv_Construct "string". See the Hud Status Bars mod for full details and lots of interesting examples on how this works.
Weird, I ran into errors when I tried it, but I was pretty tired that night, and I didn't spend a whole lot of time on it, so maybe I missed something.
User avatar
Miguel
 
Posts: 3364
Joined: Sat Jul 14, 2007 9:32 am

Post » Thu May 03, 2012 2:51 am

I checked my SDR_obse log, and it says this:

OBSE Query ...
OBSE Load ...
Creating Game Settings ...
Loaded detection hook script 63001002
Set detection level hook script to 63001002
Received unknown OBSE message type 0000000A
Received unknown OBSE message type 0000000A
Received unknown OBSE message type 0000000A
Received unknown OBSE message type 0000000A
Received unknown OBSE message type 0000000A
Received unknown OBSE message type 0000000A
Received unknown OBSE message type 0000000A
Received unknown OBSE message type 0000000A
Saved detection hook script 63001002
Saved detection hook script 63001002
Any idea what the unknown message type thing is about?

Oh, if this helps... the OBSE log says this:

Loading strings
WARNING: substantial numbers of string variables exist for the following files (may indicate savegame bloat):
SDR_Core.esp (5335 strings)
SDR_NPC Behavior.esp (2132 strings)
I know there's no bloating, because I just checked yesterday.
User avatar
Gisela Amaya
 
Posts: 3424
Joined: Tue Oct 23, 2007 4:29 pm

Post » Thu May 03, 2012 2:49 am

@ WalkerInShadows,

Thanks for report!

I think the string is probably the name of the race or creature, which is created once when the token is first assigned so that it can be used to determine various features such as peripheral vision and night vision types. I was probably thinking it might come into play later, so decided to save the information in case I needed to recall it later, but I may just move that into a custom function to call as needed, and destruct the string once the token has initialized. That would be the proper way to do it. (Edit: It might also be related to the detect life / night eye spell casting features, I'll have to see).

I have no idea what the other OBSE errors are, but I'll look into it. In general I'm going through everything with a "fine toothed comb" to see where I might find some performance improvements, as well squish any bugs.

I've already found the cause of some reported glitches that were due to the new Add Actor Values plug-in, which doesn't allow fractions to be stored. That side effect wasn't documented, so I didn't know about it until errors were being reported. It was causing the disappearing corpses (which I fixed last time) and the disappearing followers glitch (which I didn't catch). I rewrote all of the Chameleon/Alpha Value code from scratch, and it seems to have fixed everything, as well as be more efficient (I think). I tested it with Vijja and CM Parnters, and no one was disappearing... unexpectedly. :wink:

____________________

Update:
Re: Strings
Yup. Lots of strings that should have been destructed. Sorry about that. Fixed for next release.

Re: OBSE error messages
Can't replicate the issue. Sorry. :(

Re: Night vision brightness.
Added two ini settings that will adjust the overall brightness of the night-eye effect, one for interiors and one for exteriors.

Re: Customizing which Races/Creatures get assigned Peripheral/Night/Twilight vision.
I finally figured out how to move the lists of races and creatures out of the hard coding and into the .ini file. So adding and removing races/creatures to the lists to customize for taste, or to account for other mods, should be relatively easy if you follow the instructions.

To Do:
- Find out where that FPS hit is coming from.
User avatar
hannaH
 
Posts: 3513
Joined: Tue Aug 15, 2006 4:50 am

Post » Wed May 02, 2012 8:32 pm

Update (in case you are wondering):

I have all the new programming, bug fixes and features in place. They all *seem* to be working as intended. Right now I'm trying to figure out how to boost overall performance, using the Extended Imperial City mod as a test zone.

SDR is essentially made up of two parts, the player/NPC tokens and the detection formula. I isolated the two from each other by disabling the detection formula but keeping the tokens active, and there was no performance drop with just the tokens active. That's the good news (because the tokens do a lot of stuff). However, activate the detection formula, and I saw fps go from 30-32 to 16-17 when there were an estimated 20 NPCs within range in the Market District, which is around 400 detection calls being made simultaneously. I have a very fast computer too. I'm disappointed, but honestly not too surprised.

I'm going to take a another look at the detection formula, and see if I can't come up with some options. Either a rewrite of the code or a "Detection Formula Lite" variant that won't be as immersive, but will be less processor intensive.

Edit: Current thoughts are:
option 1. If the detector and target are not in rival factions, then it doesn't really matter, and the formula can return with Oblivion's default result.
option 2. Filter detection calls by the type of actor. For example, an .ini setting:
set sdrIniQ.vApplyDetectionFormulaTo 4 ;
0 = no one, use Oblivion's formula
1 = Player only
2 = Player and Followers of player only
3 = Player, Followers of Player, and NPCs (playable races which includes Imperials, Wood Elf, Orc, etc. as well as any mod added races)
4 = Everyone (NPCs and "Creatures" which includes Goblins, Ogres, bears, etc.)

Currently, SDR is functioning at the equivalent of 4. Everyone is using the formula against everyone else. At setting 3 or 4, with Extended Imperial City, you would still see a significant fps hit. With option 2, that hit would be significantly reduced, only impacted by the number of followers you have at the time. With option 1, that hit would be reduced to only detection calls between the player and the other actors.

Let me know what you all think.
User avatar
Emma Parkinson
 
Posts: 3401
Joined: Wed Jul 26, 2006 5:53 pm

Post » Thu May 03, 2012 7:56 am

If I recall currently I had already asked at some point to make it only apply towards the player to save performance, so I won't say anything against it now. :tongue: But I still wonder why it got worse with the latest beta. Before that the impact was bearable, at most 3fps in my game. Were you not able to find out what happened there?
User avatar
Causon-Chambers
 
Posts: 3503
Joined: Sun Oct 15, 2006 11:47 pm

Post » Thu May 03, 2012 2:30 am

I haven't had a chance to dig into the actual formula yet. My post was just a stream of thought (probably subconsciously stirring in the background from your suggestion). There is a chance that the reason why it was performing well was that there might have been part of it that was broken, or I added something that made it worse. I'd have to do a side by side comparison of the two scripts/formulas.
User avatar
Claire Mclaughlin
 
Posts: 3361
Joined: Mon Jul 31, 2006 6:55 am

Post » Wed May 02, 2012 10:25 pm

I haven't had a chance to dig into the actual formula yet. My post was just a stream of thought (probably subconsciously stirring in the background from your suggestion). There is a chance that the reason why it was performing well was that there might have been part of it that was broken, or I added something that made it worse. I'd have to do a side by side comparison of the two scripts/formulas.
Have you taken a look at shadeMe's new http://www.gamesas.com/topic/1183428-rel-runtimescriptprofiler/ (RuST)? [Edit: Seems you have. Good. Though maybe not the latest (v1.0) posted today?] Seems like just the tool you need, just when you need it! And of course http://www.prestosoft.com/edp_examdiff.asp for the side-by-side comparison.

-Dubious-
User avatar
Brandi Norton
 
Posts: 3334
Joined: Fri Feb 09, 2007 9:24 pm

Post » Thu May 03, 2012 10:56 am


Have you taken a look at shadeMe's new http://www.gamesas.com/topic/1183428-rel-runtimescriptprofiler/ (RuST)? [Edit: Seems you have. Good. Though maybe not the latest (v1.0) posted today?] Seems like just the tool you need, just when you need it! And of course http://www.prestosoft.com/edp_examdiff.asp for the side-by-side comparison.

-Dubious-
Yup, ran the profiler. Downloaded it this morning actually, so I assume it's the latest. Interesting thing is because the detection script is "hooked", and vanilla script tracking was turned off, so I wasn't getting data on the actual detection formula. To be honest, I didn't write the hook, so I can't be sure how it works exactly, but it was fairly easy to determine it was the problem by returning out of the detection hook early with the default Oblivion detection result.

I'll check out exam diff.
User avatar
Eileen Collinson
 
Posts: 3208
Joined: Thu Dec 28, 2006 2:42 am

Post » Wed May 02, 2012 10:16 pm

Coolio. Fixing all those strings might eliminate the OBSE errors. Or not. At least something good came of it. :D

Re: detection formulas: Sounds like a good idea to me. I don't use followers, personally, so I'd just use Option 1 all the time. A lot of folks would likely use 2, and some might even use 3 if they have other mods that enable NPCs to sneak (Tamriel Travellers, for instance) and/or pick pockets.
User avatar
Vera Maslar
 
Posts: 3468
Joined: Wed Sep 27, 2006 2:32 pm

Post » Thu May 03, 2012 5:55 am

Coolio. Fixing all those strings might eliminate the OBSE errors. Or not. At least something good came of it. :biggrin:

Re: detection formulas: Sounds like a good idea to me. I don't use followers, personally, so I'd just use Option 1 all the time. A lot of folks would likely use 2, and some might even use 3 if they have other mods that enable NPCs to sneak (Tamriel Travellers, for instance) and/or pick pockets.
3 would definitely make sense if NPCs were trying to sneak around or pick each others pockets outside of whatever the player and his/her followers are doing.

UPDATE:
1. Found some more lines of code that can be moved out of the detection formula and into the tokens.
2. Currently breaking things down into components to try to boost FPS as much as possible before exploring early returns as described in previous posts. The main formula with the sight/sound/skill sub calls disabled is returning a 4-5 FPS hit in heavily populated areas. With sight/sound/skill enabled, the FPS hit is around 10-15.
User avatar
Mason Nevitt
 
Posts: 3346
Joined: Fri May 11, 2007 8:49 pm

Post » Thu May 03, 2012 1:35 am

New beta version is ready for downloading and testing:
http://tes.nexusmods.com/downloads/file.php?id=37385

I've done everything I can to find/squash bugs and improve performance. The results are pretty good. With max settings (detection package 3 or 4), the worst drop I got was down to 20 FPS in an extremely populated area, and 30 FPS everywhere else, which was what I had without SDR. (I'm using OSR by the way). If you go with detection 1 or 2, there was no perceivable performance hit, even in highly populated areas. So if you are having performance issues, and have companions/followers or like to conjure creatures, go with option 2. If you are a strictly solo, go with option 1 (but 2 is still recommended).

It is the best I can do. Detailed change list is on the TES Nexus download page.

If all goes well, this will be the official, and most likely last release of SDR. Partly because there just isn't much more I can or want to do, but also because I've spent over a year on this and it is time to move on.

I'll be working on updating all of the documentation over the next week or so when I have some down time.

Thanks to everyone for their support, input and ideas. I'm very proud of this one. Please check it out, and let me know if it's working.
User avatar
Ymani Hood
 
Posts: 3514
Joined: Fri Oct 26, 2007 3:22 am

Post » Thu May 03, 2012 12:51 am

Nice. Looks to be a great successor to JOG's mod. Will give it a try.
User avatar
casey macmillan
 
Posts: 3474
Joined: Fri Feb 09, 2007 7:37 pm

Post » Thu May 03, 2012 4:00 am

Downloading. I'll let you know how it goes. And congrats on the final release!
User avatar
OTTO
 
Posts: 3367
Joined: Thu May 17, 2007 6:22 pm

Post » Thu May 03, 2012 6:26 am

I think I was one of the discoverers of the issue with SDR + CM Partners. Scanning the recent posts I see you're aware of it and working on it though if there's a permanent solution yet I missed it.
I fixed the problem on my own install by going into the SDR Core ini and disabling "NPCs fade while sneaking". That one change seems to have cleared up the problem completely. The rest of my ini is default, as far as I can recall.

Thanks again for the great mod!
User avatar
Casey
 
Posts: 3376
Joined: Mon Nov 12, 2007 8:38 am

Post » Thu May 03, 2012 11:25 am

I think I was one of the discoverers of the issue with SDR + CM Partners. Scanning the recent posts I see you're aware of it and working on it though if there's a permanent solution yet I missed it.

The most recent version (4.3.0 beta) should have it fixed. It *may* not necessarily fixed anyone who disappeared and that "disappearance" was saved. I can certainly run a check for that in a future version and make sure that if their alpha value at the time the token is handed out is 0, to reset it to 1, as I am not aware of any NPC or creature with a natural alpha value of 0.
User avatar
Georgine Lee
 
Posts: 3353
Joined: Wed Oct 04, 2006 11:50 am

Post » Wed May 02, 2012 9:22 pm

I can certainly run a check for that in a future version and make sure that if their alpha value at the time the token is handed out is 0, to reset it to 1, as I am not aware of any NPC or creature with a natural alpha value of 0.
Hmm. What about the populace of Aleswell in the 'Zero Visibility' quest?

-Dubious-
User avatar
^~LIL B0NE5~^
 
Posts: 3449
Joined: Wed Oct 31, 2007 12:38 pm

Post » Thu May 03, 2012 5:32 am

Forgot about that. But here is the thing, it's their *base* alpha value I am talking about. They are under an enchantment, so once the enchantment breaks, it would naturally be 1. In the vast majority of cases, a creature's/npc's base alpha value is going to be one. Spectral spirits of NPCs, like the Forlorn Watchman have a different base alpha value that is applied to them, because they need to be slightly transparent. Unless the creature is supposed to be invisible in its natural state, the alpha value is going to be greater than 0. And the way the game works is if you kill something that is invisible (or even partially), it usually appears. For instance, in vanilla Oblivion, a Nether Lich is partially transparent when you fight it, but it becomes 100% solid after you kill it. (my mod fixss that, keeping the vase transparency level).

So I guess what I would do when checking for the base alpha value is to see if the character is under an invisibility effect or chameleon magical effect at the time the token is added, and if so, set the base alpha value accordingly. I'll run some tests on the Forlorn Watchman, the inviso town, as well as the mother trollish thingy up in the snowy place.
User avatar
Jack Moves
 
Posts: 3367
Joined: Wed Jun 27, 2007 7:51 am

PreviousNext

Return to IV - Oblivion