Jump to content

Sneaking and noise


MarkInMKUK

Recommended Posts

I tend to play sneaky characters 0 a stealthy approach, a shot from concealment, etc.

 

What I'm wondering is whether there is a way to make npc's respond to sounds, such as opening doors or gates (think the nasty screeching iron gates in the tutorial sewers), and then a way of adding noise-removers to the game (oil can to oil hinges, etc). It's always seemed odd that nothing responds to a screeching gate, yet you can be spotted through a pile of logs in near darkness visually.

 

Any suggestions?

Link to comment
Share on other sites

There is a whole physics involved in such situations, defined sound and light sources actually doing their job "illuminating" the neighborhood and targets able to pinpoint the changes and locate them. Many mods tried and were successful in achieving stealth at some extent but... that kind of game is not focused on it from start, their engine are not meant to this, the final result is, normally, a poor parody of another game which has the theme as main focus.

 

This problem concerns many other features as well, even the simple combat is not satisfying to many, let alone mounted combat or group combat... mods can alleviate the issue but still the final result might become, again, a sad parody of a focused game.

 

One the greater strength of Bethesda games is it's easy to mod, but the engine itself poses a great deal of limiting, there is where comes utilities like the script extenders... and yet it's never what it could be. Many times someone asks for something which looks soooo simple and could not be done unless redesign the whole engine.

 

Well, that is the bright side of modding; enhancing, changing, replacing or even worsening (to some) the original work, but perfection in all areas is hard to achieve.

 

PS: One question to self may help understanding the difficulty degree of something we want: Will that feature change the game genre/type? if the answer is "yes", it might be too much to ask for.

 

About suggestions, try searching with the word "stealth"... This might not bring all the mods already existent on the theme but is a good starting point.

 

Just as a funny note: once I got behind that goblin yet in the sewer tutorial (the same which starts the stealth explanation) and pushed it around using the "hero" body for a long time until slipped just a bit and then he noticed something wrong :)

Edited by nosisab
Link to comment
Share on other sites

Link to comment
Share on other sites

Visually, NPCs can spot a player using some detection level (lost, unseen, noticed, seen). Usually, GetDetected or GetDetectionLevel functions are used to make NPC do something when they spot a player. Bathesda made it so that under certain conditions (light, type of clothes you wear...) NPCs spot a player more easily. But this has little to do with the sound.

 

Sound doesn't do anything in the game. It's just triggered by some event in the game, like opening the door. The same event that triggers the sound can trigger NPCs to attack a player. To say that opening the door would increase NPCs detection ability would be wrong, because he can hear the sound even if he doesn't see the player. The most easy thing to do is to make NPC attack a player (with StartCombat function).

 

What you need to do is to make a script and attach is to all doors that you wish to use for this. That script would run OnActivate of the door. That script would "recognize" if the door is "squeaky" one (you can use simple variable that takes 0 and 1 value to do this). If you use some oil, the variable would take value of 0 and become "quiet" type. If the door is noisy type then make all NPCs in surrounding cells to attack a player (some of functions you can use are: GetFirstRef, GetNextRef , while loop or GoTo blocks and NPC.StartCombat player).

Link to comment
Share on other sites

You can't use sound directly dude. It's just a file that's played when you do something in the game (an event). You can play this sound with PlaySound and SayTo functions. Sometimes you can attach a sound to an object itself that's played when you activate that object.

 

You can attach scripts or make the door persistent reference so you can use it in some script. Some doors have a script attached (made by Bathesda). I didn't check, but I don't think that to many modders attached scripts to doors (doors made by Bathesda). If modders attached some scripts to the doors that they made, that's beyond the scope of this anyway and will not cause conflicts. I don't think there will be any conflicts at all (or only a few of them). These scripts can be attached without any problems with compatibility, only the modder that will do this needs to be very patient and do this for each and every door. The good thing about this is that you use only one script to attach to any door object you want.

 

Alternative to this is to make all doors persistent reference and use some script to handle these types of events. The downside of this is that you need to address all doors that you want to add this feature to.

Link to comment
Share on other sites

Might be easier to have a quest script running, that pays attention to what the player is activating at the moment.... (if anything....) and if it happens to be a door determined to be 'noisy', then bump the NPC's in the area alert status, or some such..... that would avoid any incompatibility issues, and would work on any noisy door, mod added or not.... (OBSE required)
Link to comment
Share on other sites

OK, so a summary of my understanding of the recommendations above is: start with whichever mod it is that makes npc's actively search for you if they come across a body (this being the sort of alertness I am after), and trigger that behaviour if they are within a certain radius of the door/gate you open, with a distance modifier based on your stealth rating? Add a time-out for the searching behaviour (basic time-out since noise, plus a random amount to make it less obvious) and it would start to be pretty much what I was aiming for I think.

 

Now all I have to do is learn enough to work out how to do it. At least no-one said "No, it's impossible"!

 

BTW, are the "Hello, who's there?" queries just random in the game, or are they specifically triggered by something (proximity + movement + sneaking)?

Edited by MarkInMKUK
Link to comment
Share on other sites

You can't use sound directly dude. It's just a file that's played when you do something in the game (an event). You can play this sound with PlaySound and SayTo functions. Sometimes you can attach a sound to an object itself that's played when you activate that object.

 

You can attach scripts or make the door persistent reference so you can use it in some script. Some doors have a script attached (made by Bathesda). I didn't check, but I don't think that to many modders attached scripts to doors (doors made by Bathesda). If modders attached some scripts to the doors that they made, that's beyond the scope of this anyway and will not cause conflicts. I don't think there will be any conflicts at all (or only a few of them). These scripts can be attached without any problems with compatibility, only the modder that will do this needs to be very patient and do this for each and every door. The good thing about this is that you use only one script to attach to any door object you want.

 

Alternative to this is to make all doors persistent reference and use some script to handle these types of events. The downside of this is that you need to address all doors that you want to add this feature to.

 

Just wanted to point out that you could, indeed, use the sound directly.

 

Something like (pseudo code):

scn FnOnActivate
ref activator
ref activated
begin function { activated, activator }
if (activated.IsDoor)
       	if (activated.GetOpenSound == (ref of a "noisy" sound) ) ;note: might also want to check GetCloseSound
               	;walk all the nearby critter refs and , if they are close enough to hear, make them attack the ref activator (player)
       	endif
endif
end
;--------------------------
scn ourQuestToRunThis
begin gamemode
   	if getGameRestarted
           	SetEventHandler "OnActivate" FnOnActivate 
   	endif
end

 

You would add a spell (oil can or whatever) that would use SetOpenSound on the target door ref to change the open sound (and probably close sound).

The advantage of such an approach is that it wouldn't require any modifications to any doors. It would simply be a quest that set an event handler and one

spell to alter the door properties. The disadvantage would be that this code would run every time something got activated (which means you'd want to add

some explicit filters to the SetEventHandler call to try and narrow the handler down to just checking doors, if possible).

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...