View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005987 | The Dark Mod | AI | public | 20.06.2022 12:25 | 25.06.2022 11:33 |
Reporter | Dragofer | Assigned To | Obsttorte | ||
Priority | normal | Severity | normal | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | TDM 2.10 | ||||
Fixed in Version | TDM 2.11 | ||||
Summary | 0005987: AIs always enter agitated searching after noticing missing items regardless of "absence_alert" | ||||
Description | "Absence_alert" is a spawnarg which is meant to allow a mapper to determine the amount by which an AI is alerted if it notices a missing item. Its value should be added to the AI's alert level, so values between 0 and 23 should be expected. This is, however, overridden by a later line in states.cpp, which ensures that the AI will always be alerted to an agitated searching state. This was added as part of a larger series of changes for 0002903. This could be fixed by rearranging this part of the code so that by default the AI enters an agitated searching state, but if an "absence_alert" spawnarg is found that will be used instead. However, dozens of FMs use this spawnarg, most frequently with a value of 1 which would barely affect the AI's alertness. This is almost certainly unintended by the authors, who probably thought this was a boolean switch. A possible solution would be to rearrange the code as above, but rename the spawnarg (i.e. absence_scale) so that released missions won't be unpredictably affected. | ||||
Additional Information | Forum thread containing additional discussion: https://forums.thedarkmod.com/index.php?/topic/21482-ai-alert-level-too-high-when-noticing-a-stolen-item/ | ||||
Tags | No tags attached. | ||||
A fix is provided with revision 9953. The only open question is on whether we introduce a new spawnarg as suggested by Dragofer. I would vote against that. Opinions? |
|
1) What's the point of introducing special behavior in absence_alert = 0? Is it necessary? No released map has such value anyway. 2) What's the reason for capping alert level from above? I see values 100, 50, 23 in some missions (gatehouse1_3, lockdown1_2_1, itb). Apparently, authors wanted AI to get to full alert. What do mappers use this spawnarg for? Given how long the old behavior was in place, I think it would be wise to do one of: leave it as is and fix docs/wiki/whatever to mark this as boolean flag introduce new spawnarg for new behavior |
|
"1) What's the point of introducing special behavior in absence_alert = 0? Is it necessary? No released map has such value anyway." That's how it is stated in spawnarg description. If no value is passed, the ai goes slightly above agitated searching. I haven't implemented it so I don't know the motivation. "2) What's the reason for capping alert level from above?" That's an asumption based on how I found the code. The cap can be removed, though. " I see values 100, 50, 23 in some missions (gatehouse1_3, lockdown1_2_1, itb). Apparently, authors wanted AI to get to full alert." It is still the same alert state (state 5 is only entered on sight). The extreme values may only assure "What do mappers use this spawnarg for?" The original intention is to control by which amount the ai alert level gets increased, as written on the wiki. So if the ai is at alert level 7 and sees an item is missing, that had the spawnarg set to 4, the ai alert level would rise to 11. "Given how long the old behavior was in place, I think it would be wise to do one of: leave it as is and fix docs/wiki/whatever to mark this as boolean flag introduce new spawnarg for new behavior " I would tend to the second choice then, as the first doesn't fit the code. It wasn't used as boolean, it had no effect at all. My suggestion: I will remove the cap and introduce a new spawnarg. I change the definition accordingly and mark the old spawnarg as deprecated. I do the same in the corresponding wiki entry. Is that ok? |
|
I've linked to the forum thread where this is also discussed (should probably get in the habit of discussing bugs primarily in the bugtracker). @stgatilov Re: booleans, we already have absence_noticeability to enable this mechanic, and a default alert increase to 18, which means "agitated searching". The discussed spawnarg is only for cases where the mapper wants a different alert increase than 18. |
|
tdm_base.def added with revision 16500, which introduces absence_alert_increase to replace absence_alert, which becomes non-functional. state.cpp added with revision 9961, that removes the cap mentioned earlier and got modified to use the above spawnarg. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
20.06.2022 12:25 | Dragofer | New Issue | |
20.06.2022 12:26 | Dragofer | Relationship added | related to 0002903 |
25.06.2022 05:51 | Obsttorte | Assigned To | => Obsttorte |
25.06.2022 05:51 | Obsttorte | Status | new => assigned |
25.06.2022 06:09 | Obsttorte | Status | assigned => feedback |
25.06.2022 06:09 | Obsttorte | Note Added: 0014916 | |
25.06.2022 07:52 | stgatilov | Note Added: 0014918 | |
25.06.2022 08:52 | Obsttorte | Note Added: 0014919 | |
25.06.2022 10:28 | Dragofer | Additional Information Updated | |
25.06.2022 10:32 | Dragofer | Note Added: 0014920 | |
25.06.2022 10:32 | Dragofer | Status | feedback => assigned |
25.06.2022 11:33 | Obsttorte | Status | assigned => resolved |
25.06.2022 11:33 | Obsttorte | Resolution | open => fixed |
25.06.2022 11:33 | Obsttorte | Fixed in Version | => TDM 2.11 |
25.06.2022 11:33 | Obsttorte | Note Added: 0014922 |