» Wed Dec 31, 2014 8:11 am
I used to have it that way. But I ran into two issues, one philosophical and another technical. On the technical side it became a real performance drag because the code for awarding points was on the actor token script. When only dealing with the closest actor, the majority of the code is in a dedicated quest script. Plus, there was an issue with figuring out how much to award per individual. There wasn't a really good method to do that without significant imbalance in both extremes (one person vs. 30 people).
On the philosophical side, some folks brought up a very good point, and the more I thought about it, the more I felt inclined towards "closest potential detector". Let's say you are sneaking through a bar, and the bartender sees you but a guy at the bar with his back to you doesn't, should you really get any points? I think the whole ideas of getting points for your skill is that you are making a "clean" sneak where no one is detecting you. In the example in the bar above, if you were to have stolen something, you would have been caught. Just like in many sports, it only counts if it's clean. And you get the most points from the closest detector.
My concern is that it is so difficult for sleeping actors to detect you that it's just way too easy to take advantage of them. It's "unsportsmanlike" to gain points off of them. So just like SDR ignores followers, I think it should ignore sleeping actors as well when determining points to be awarded.
I agree to some extent, but my options are limited. Currently there only a few settings that somewhat addresses this: "No LOS" penalty as well as talking/in dialog penalties. What you should keep in mind is that each individual is running detection calls against everyone around them at the same time. So it's not a matter of differentiating between friends and enemies, it's detecting each person individually. Once the person is detected, then the actor reacts to whether or not the person is a friend or enemy. When you dig down deeper, it gets complicated depending on the scenario. Let's say you are a bandit sitting around with four other bandits that you can see and you know there are no other bandits in the room. If you hear a strange noise off in the distance, you will know there is an intruder. Same scenario, but one of the bandits is out of sight getting a beer or on patrol. If I hear a strange sound, it's either him or an intruder. Depending on what I am hearing and how familiar I am with the other bandit, I may or may not figure out that the sound is coming from an intruder, depending on what I am expecting to hear, if anything. Trying to figure out some algorithm that allows a given NPC to figure all that out is a brain buster. It would also probably be a huge drain on resources.
Because of my limited function/options, it would have to be something like this:
- Each time an actor makes a round of detection checks, an array would be created for each target a detection is made against.
- Then the script would have to loop through the results and count how many were detected that the actor had line of sight of.
- The remaining actors would be the "don't know" factor. This would be adjusted by any companions that the player has.
- Then the "don't know" factor could be applied towards the next round of detections, but only if the actor doesn't have line of sight of the potential target.
There are already a few problems with this at a technical level. Although I know how to set how often a round of detection checks are made now, I *don't* know how to exactly predict *when* the detections actually happen. I can certainly print them out to the console, but that's after the fact, so to speak. I would have to constantly clear/reset these arrays every time a round of detection calls are made by each actor.
Even if I could figure out how to do it, I'm fairly certain that something like this would cause a huge drain on performance, which is challenging enough as it is.
One possible thing that would be fairly easy to implement is two different No LOS settings, one for interiors and another for exteriors. You are way more likely to have more sounds interfering with your ability to pick out specific noises in exterior scenarios than in interiors. So it would be something like this:
set sdrQ.fSDRsNoLOsixterior to .4
set sdrQ.fSDRsNoLOSinterior to .8
There is already a game setting for interior/exterior in general, and there is already a script that switches out other pieces of info whenever the player swtiches from interior to exterior cells, so this wouldn't be difficult to do.
Another possibility is to use the GetHighActors function to get a generic number of possible sound sources. The higher the number, the more difficult it would be to separate out individual sounds (not sure what formula to use for that though). However, it's a bit muddy to do it that way because GetHighActors is player centric and could potentially include actors that would normally not be within detection range of any given actor and therefore they would be unfairly penalized. So I'm not too inclined to do it that way.
I'm certainly open to suggestions. But it's important to remember that performance is a major issue I'm battling right now, so the solution has to be relatively clean and easy to implement.
Well, unfortunately my attempts at using the GetIsAlerted command in the past caused unpredictable CTDs. There are already detection bonuses for AI behavior when in combat, searching, or hostile. I'm not sure that "being on alert" necessarily translates to searching however.
In order to do this properly, I would pretty much have to either replicate Duke Patrick's mods or come up with an "SDR" friendly patch that allows them to interact with SDR in a similar way that I handle Reneer's Guard Overhaul. I'm not inclined to do it at the moment, mainly because I'm already overwhelmed for time. I need to finish what I have and take a break from modding for awhile. I am SO burned out at the moment.
You know, if someone else wants to take a stab at it, they could probably do it with the modder's resource package information. Although they should wait until after the next release.