Jump to content

Take the stupid out of the A.I.


Harkonian

Recommended Posts

I see the problem the developers have with this approach and the non stealthy character. Assuming the stealthy is willing to take the risk and run like hell if fails, alerting the crowd could make the life of a fighter too hard because he would be quickly overwhelmed by the sheer number of opponents in crowded locations (otherwise there is no reason to scream for help if no one is near to answer).

 

And yes, it makes the game nothing like a game designed for stealthy only character from start...

 

I'm sure a few mods will enhance the general combat AI to the extent it is possible with the current engine (or the scripted extended), but that is difficult task till the CK is out, at least.

 

You take a game, like a shooter and it is all about combat AI, so it is free to have it evolved to the max, but in a good RPG the main interaction source is outside combat, maybe someday we can have hardware enough to have the perfect game covering All styles...

 

Complementing: Actually I think expending most time trying to improve too much the many aspects is one the factors (mainly the visual aspect and generalization) is among the main reasons nowadays games look dumbed down in the playful factor (ludo).

Edited by nosisab
Link to comment
Share on other sites

  • Replies 70
  • Created
  • Last Reply

Top Posters In This Topic

I noticed that new addition to the OP about proximity sneak penalties.

 

I don't entirely agree with the idea, although it has a good foundation.

 

There is no TL;DR version, sorry.

 

To start off with I don't think applying penalties is a proper way to determine detection of a sneaking character. There is always the chance that the people just standing around doing nothing are day dreaming for one thing. So assuming they are 100% vigilant is a fallacy.

Okay, so instead of tearing it down the rest of the way I will come out with my suggestions. Anybody talking about stealth has probably played Splinter Cell, the game uses some very excellent methods in determining these things. Most of which are built into the engine so my likened version will be less implemented than they are.

 

 

Visual Detection

* Line of Sight

* Light position

* Light level

* Vigilance

* Nightingale Yes/No (-15% from char LL, not the effective LL)

 

* With the line of sight the closer to the center you are the more visible and likely you are to being detected. Assuming the field of view is 90 then you can say this.

The center is 0 degrees which makes the sides both 45 degrees. Ignoring negative values, as they are unimportant you can now say Cosine( Line of Sight ( Player ) )

Line of sight gets the player's angle in the field of view for the enemy, and cosine makes it so that 0 degrees is equal to 1 and the sides are approximately half.

 

* I would have just put whether you were wearing the Nightingale armor or not, but.. I don't wear the entire suit even when I am wearing it; I modified the shrouded gloves to match the nightingale gloves, so they wouldn't qualify. So I figure it is better if it is done just upon whether you've taken the oath or not. You are Nocturnal's agent and she is supposed to provide you luck in your stealthy endeavors, 15% sounds like a lucky number.. it is 2 more than 13 and 2 is even. Bs justification, and I know it. 15% is just a solid number.

 

* The reason I put position in there is because if there is a powerful light between you and an object you generally find it hard to see the object if it has a low light level and is behind the light. So I would propose if the light level is low and your behind a bright light you become less visible. AI should also be less likely to sit staring towards a bright light for that matter, for intelligence sake. So here is my arbitrary but functional way of doing so. I tested and made sure it goes down where it should and up where it should.

( Note: this is only for when you are on opposite sides of a light source eg. you are directly in-front of them and they are holding a torch )

 

Effective Light Level = (Char Light Level / Light Source Light Level) * ( Char Light Level * ( Enemies Distance From Source / Char's Distance From Light Source))

Effective LL= ( Char LL / Source LL ) * ( Char LL * ( Enemy Distance / Char Distance ) )

 

That makes it so that the effective light level becomes stronger if you are closer to the light source than the enemy, for more than one reason in fact. It becomes weaker if your light level is lower than the sources due to the first division. This equation should never make your light level stronger unless you were already pretty detectable. So this will provide better benefits and worse penalties. Give AND take, the way it should be.

 

If you are on the same side, well that is different. It depends on their line of sight and how much light is in it, and what yours is in relation and so on so forth. Instead of making it complicated though let's follow the same formula, and switch the "light source light level" with the enemy's light level.

 

 

Sound Levels

---------------------

Sound levels should be give and take as well. You are generally not going to be the only thing making noise, and again for those who have played Splinter Cell.. you know they had a good way of using sound to control how you would sneak around. Of course you can't use your scroll wheel to increase and decrease you speed.. despite the scroll wheel doing nothing else.. ¬,¬ (correct me if I am wrong, but I don't use it for anything other than menus)

 

These are the things that should provide sound bonuses, by increasing background noise. These are all things that presumably can be checked on to determine what their states are.

 

* Idle Animations (minimal)

* Walking Animations (Enough to sneak run)

* Talking (enough to step on things that make noise due to bad physics and collision boxes)

 

If they happen to be looking in the direction of the sound, already. Then take your chance of being detected via sound and multiply by 2. With object noise, this should be proximity affected the same as walking and running already are in vanilla.

 

I have given this a once over, and it looks good enough. I've already spent about an hour and a half, so maybe I might come back and notice it needs an edit, but for now I will be happy with feedback.

 

 

 

Edit:

I forgot one tiny thing. Line of sight needs to be based off their face orientation meaning their animation needs to somehow be taken into account, probably via a bunch of hard coding and timing. Else it just won't be fair, because the intuitive reaction to somebody turning their head is, oh hey they won't see me if I stand in front of them or to the opposite side of the direction their head is turned. So if it can't be done, I would personally would avoid using the mod and hope for a better one or a version without the LoS function.

Edited by Sagenth
Link to comment
Share on other sites

I was sad when I saw that B had done NOTHING to fix sneak sillyness.

 

I can wear Heavy Armor and be like 10' in FRONT of a npc and they don't see me! Or I can "sneak" standing in the middle of a crowded well lit inn. And then there's ignoring another npc/creature dropping dead right in front of you. This is stupid.

 

I hope someone can fix this.

 

Sometimes they just don't like that person that dropped dead. Heart attacks and strokes are probably pretty common in Skyrim; blissful ignore-ance.

 

I had a hell of a time killing the thalmor ambassador or whatever he was in Markarth, his guards cared.. so did the other city guards. I tend to have the opposite problem of what you described. I will kill an NPC who pissed me off, from 20 feet away.. or poison them and walk 20 feet away.. and then everybody in town hates me and tries to kill me on sight. When I poison somebody undetected, I should get away scot-free unless there are special circumstances(like what I don't know)

 

When I shoot someone with an arrow from 50 feet away and I am undetected and my bounty doesn't increase.. what SHOULDN'T happen is that guards attack me.. Nothing more aggravating than a persistent glitch that causes people to attack you when the crime system doesn't say you did anything wrong. So either I should get a bounty or these guards and townspeople should piss off.

Edited by Sagenth
Link to comment
Share on other sites

  • 1 month later...

The A.I is so horribly bad right now, particularly if you are playing stealthily.

 

Most encounters go something like this:

 

*sneak up near NPC*

*thunk!* put an arrow into the back of his head

*hide*

NPC looks around, "Huh? Who's there?"

A few seconds later, NPC says, "Must have been my imagination." and walks away...with an arrow in his head.

...

 

ROFL, loved that story. This arrow in the head must cause some mental deficiency. But they could say "ouch", at least.

 

I agree with the OP.

Link to comment
Share on other sites

One of the major Ai issues I've found that bothers me the most is that when you fire an arrow or spell and miss, the npcs always run right to the spot where the arrow hit, allowing you to pick them off quite easily by "leading" them to a spot. I've always thought they should take cover.

 

Throw voice is a different story, but running to where a half dozen arrows are stuck in the ground is just retarded.

Link to comment
Share on other sites

For this Mod, it should be possible to make Enemies Not detect me if i run around till they actually See me, how is it they know its me when there are other People around them, especially the Falmer who is suppose to be Blind when hearing themselves but for some reason they know its Me.
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...