View Issue Details

IDProjectCategoryView StatusLast Update
0002829The Dark ModAIpublic15.03.2013 00:27
ReporterSpringheel Assigned Tograyman  
PrioritynormalSeveritynormalReproducibilityhave not tried
Status resolvedResolutionfixed 
Product VersionTDM 1.06 
Target VersionTDM 2.00Fixed in VersionTDM 2.00 
Summary0002829: Flashbombs should reduce AI hearing as well.
Descriptionhttp://modetwo.net/darkmod/index.php?/topic/12963-flashbombs/page__pid__264159__st__0&#entry264159

Right now it is difficult to get away from blinded AI because they can still hear you and track your position if you're making noise.

It would be good for gameplay and pretty realistic if AI could not do this.
TagsNo tags attached.

Activities

CodeMonkey

CodeMonkey

07.10.2012 10:04

reporter   ~0004865

Last edited: 07.10.2012 10:26

I've made a basic patch for this issue, however, I could use some feedback on how to proceed.

The patch basically adds a reduction to audio acuity via the AI blind state. (I've set it to 25 for the moment, they can still hear, but, it's a drastic reduction.)

I could use feedback on the amount of deafness to inflict, I'm also unsure of whether integrating it into the blind state is a good idea, this could cause issues if someone were to use it for some other purpose expecting only visuals to be reduced. (Renaming the existing state to make it clear it reduces both might work, but, that could introduce backwards compatibility issues.)

Can the game support multiple AI states? If so, a new deaf state would seem appropriate, and offer more versatility, but, I just don't know the internals well enough yet to figure out how to proceed.

Suggestions?

tels

tels

08.10.2012 07:34

reporter   ~0004885

Can you post your patch somewhere so we can look at it?
CodeMonkey

CodeMonkey

08.10.2012 08:23

reporter  

Issue 2829 Patch.rar (2,048 bytes)
CodeMonkey

CodeMonkey

08.10.2012 08:24

reporter   ~0004887

I just attached it to the issue, you should be able to see it. (I hope that's okay.)
Springheel

Springheel

08.10.2012 14:28

administrator   ~0004895

Probably best to post non-technical questions and feedback requests in the forums; that's a better venue than hashing things out here.
CodeMonkey

CodeMonkey

08.10.2012 15:02

reporter   ~0004896

Yeah, I was going to ask about that, any particular part of the forums I should use for code related stuff? (Any preference on topic titles, ie, "Issue #xxxx", etc,.)

Also, I generally don't work on such formal projects, so, let me know if you have an issue with how I'm doing things, or whatever. :) (About this issue, just PM me on the forums if you feel that's more appropriate, I already submitted a fix, so, we can go from there, and start a forum thread if needed.)
grayman

grayman

28.02.2013 00:02

viewer   ~0005118

I don't know if CodeMonkey made it to the forums to discuss a technical solution, so I'll post my comments here.

1 - Before entering the blind state, the code checks for whether the flashbomb is in the AI's FOV. If it isn't, then the AI isn't blinded. However, if we want to add deafness to the effect, the deafness has to be allowed whether we blind him or not, because even if his eyes are turned away, he's still going to hear whatever sound it is that deafens him. Since there's no guarantee that we'll enter the blinded state, reducing his hearing can't be done there. At minimum it should be reduced outside the blinded state and restored via an event a certain amount of time later. At maximum, we create a new deafened state, but that's a lot more work.

2 - The acuities are in the range of 0->1.0. Setting the acuity to 25 gives the AI 25x super hearing. So you want to give him 0.25 instead. An even better solution is to reduce his hearing by a factor of 0.25, since actual acuities can vary not only from AI to AI, but also by alert level.
Springheel

Springheel

01.03.2013 20:39

administrator   ~0005120

Last edited: 01.03.2013 20:39

I don't agree with issue 1 above, actually. It's not that the flashbomb makes a loud noise that literally deafens the AI (it doesn't). The deafness is more to simulate the general confusion of the AI at being blinded. They're focussed on their immediate problem, in other words, and not paying attention to the player for a few seconds. So an AI that is not blinded by the flashbomb should not be deafened.

grayman

grayman

15.03.2013 00:27

viewer   ~0005180

Applied CodeMonkey's patch to the source, with one change: reduce the AI's hearing to 1/4 of what it was, rather than setting it to 25.

The only cause of blindness is flashbombs and flashmines.

No existing missions use "effect_blind" for any stim responses.

If someone introduces a blindness situation in the future where reduced hearing is inappropriate, we can deal with it then.

Issue History

Date Modified Username Field Change
30.07.2011 17:23 Springheel New Issue
07.10.2012 10:04 CodeMonkey Note Added: 0004865
07.10.2012 10:21 CodeMonkey Note Edited: 0004865
07.10.2012 10:26 CodeMonkey Note Edited: 0004865
08.10.2012 07:34 tels Note Added: 0004885
08.10.2012 08:23 CodeMonkey File Added: Issue 2829 Patch.rar
08.10.2012 08:24 CodeMonkey Note Added: 0004887
08.10.2012 14:28 Springheel Note Added: 0004895
08.10.2012 15:02 CodeMonkey Note Added: 0004896
28.02.2013 00:02 grayman Note Added: 0005118
01.03.2013 20:39 Springheel Note Added: 0005120
01.03.2013 20:39 Springheel Note Edited: 0005120
15.03.2013 00:22 grayman Assigned To => grayman
15.03.2013 00:22 grayman Status new => assigned
15.03.2013 00:27 grayman Note Added: 0005180
15.03.2013 00:27 grayman Status assigned => resolved
15.03.2013 00:27 grayman Resolution open => fixed
15.03.2013 00:27 grayman Fixed in Version => TDM 2.00
15.03.2013 00:27 grayman Target Version => TDM 2.00