PatchNotes_1.27 - ysaroka/InediaInfectedAI GitHub Wiki

☑️ 1) The crawling infected gained the ability to climb down from obstacles.

Now there will no longer be situations where an infected spawns on a roof in a crawling state and is unable to get down from it. Naturally, all mechanics related to falling from a height or stunning the player if such an infected falls on them will still work.

☑️ 2) Infected can now jump down while in Inedia Long Vision mode.

Now, infected in Inedia Long Vision mode will jump down from obstacles when a LongVision target is present. This eliminates situations where infected stuck on a roof, alerted by a player from a long distance, couldn’t jump down because this functionality only worked in the vanilla chase mode - now it also works in LongVision chase mode, allowing infected to jump off roofs even if they spot a target from up to 100 meters away. However, the same condition must still be met - the target must be located below the infected.

☑️ 3) Inedia Pain System: Possibly, the issue with saving the player's pain system states after respawn has been fixed. But this is not certain, as the problem is not with InediaInfectedAI, but with some mod that affects the respawn process.

Sometimes, possibly due to mods affecting the player respawn process or server issues during restarts, the Inedia debuffs persist on players after death and respawn.

This happens because the server apparently either calls PlayerBase.OnStoreLoad(...) for newly respawned players - loading old data (which it shouldn’t do during respawn), or it doesn’t recreate the PlayerBase object after a player’s death and instead uses the old one with outdated data (which, apparently, it also shouldn’t do).

The issue occurs extremely rarely and most likely only on servers with some mod affecting the player respawn process. Therefore, reproducing it intentionally or identifying which mod causes it is practically impossible. There were several attempts to fix this issue blindly, but they ultimately failed.

This fix is intended to definitively solve the problem. It adds proper clearing of the Inedia debuffs directly in the on-disk storage immediately after the player’s death (the PlayerBase.EEKilled(...) event). This way, even if the server is broken or some mod interferes with the respawn process and the server decides to execute PlayerBase.OnStoreLoad(...) during the player’s respawn, it will in any case load already cleared data, and everything will be fine. Additionally, just in case (you never know, some crazy mod might monopolize PlayerBase.EEKilled(...)), clearing of the debuffs was also added during the player respawn event (MissionServer.OnClientNewEvent(...)). This is a rock-solid solution that should resolve the problem once and for all.

Users who have encountered similar issues are advised to monitor whether they occur after this update.

If, for some reason, the issue persists, there is little I can do in this case. You will need to investigate which mod interferes with the PlayerBase.EEKilled(...) or MissionServer.OnClientNewEvent(...) events, or why they are not being called correctly on your server, and resolve the problem yourself, as it is not related to InediaInfectedAI mod.

☑️ 4) Inedia Pain System: Added damage handling for AI bandits.

But it behaves very strangely.

Pain and fractures are based on the global Shock damage received in PlayerBase.EEHitBy(...), and there are no issues with them - the Shock damage is applied and everything works as intended, the player receives both pain and fractures.

However, for deep wounds/bullet wounds to work, a specific body zone of the player needs to receive Blood damage. For some reason, Blood damage for a specific zone from these bots is not being applied - it is 0 (i.e. damageResult.GetDamage(dmgZone, "Blood") == 0). As a result, deep wounds and bullet wounds will not work.

For everything to work correctly, PlayerBase.ProcessDirectDamage(...) must be called for the player zone that was hit, with the ammo Blood damage set to 100 for bullets, since the chance of getting a deep wound is calculated based on this value. In this case, when the correct zone is passed, the vanilla engine will automatically calculate damage reduction depending on the armor associated with that zone, and PlayerBase.EEHitBy(...) will receive the correct Blood damage value taking armor into account (as well as other damage types).

To summarize, I don’t know how these bots are implemented - but on my side I added support for processing their damage. However, for the full Inedia Pain System to work correctly, changes are required on the "AI Bandits" side.

☑️ *) Fixes:

  • Some changes have been made that may fix a very rare bug - occasionally, infected would freeze during their attack on the player. After this update, I recommend that those who experienced this issue keep an eye on it, and if it still occurs, please let me know.
  • A fairly frequent bug has been fixed where infected would sometimes deal "phantom" hits - meaning they caused damage without playing any attack animation. This happened because the damage logic for jumping was triggered immediately when the jump command started, while the jump itself is only executed after a short delay (while the infected turns toward the jump direction). As a result, the infected could deal damage even before the jump actually occurred (i.e., during the turning phase).
  • Improved the use of turning animations for infected in Search Mode. Previously, regardless of the turning angle when reaching a search point, the infected would always use the long turning animation. This looked rather awkward when the search radius was small and waypoints were reached frequently. Now, if the turning angle is ≤ 90 degrees, the infected will not use any turning animation at all. If the angle is ≤ 120 degrees, a short turning animation will be used. In all other cases (up to 180 degrees), a long turning animation will be used.
  • If a player was stunned on a ladder in the vanilla game, they would gain immunity to fall damage when falling off the ladder. While this situation was almost impossible in vanilla, it occurred more often in InediaInfectedAI, since infected can stun the player on a ladder by jumping on them from above. I wasn’t able to find a proper way to detach the player from the ladder so that they would start taking fall damage, so a workaround was used: when stunned on a ladder at a significant height, the player briefly loses consciousness, which causes them to detach from the ladder and preserves the fall damage mechanic.
  • Inedia Pain System:
    • Added the Players.LimbsBreakIgnoreAmmoList parameter, which allows excluding specific ammo from the fracture mechanic. This solves the issue with weapon types that deal shock damage but should not cause bone fractures (e.g., a taser or any other weapon that deals electrical damage).
    • Fixed a bug where the character would receive shock damage when performing kicks while having pain in their arms. Also now, when kicking with pain in the legs, the character will also receive shock damage, and when kicking barefoot, they will receive leg pain damage.
    • The bug that allowed Metoclopramide to let the character fill their stomach without limit has been fixed. Now, after taking the drug, the character can still fill their stomach beyond the normal amount, but this value is still capped at 4 liters (the vanilla value is 2 liters), and if it is exceeded, vomiting will still be forcibly triggered.
    • Added the ability to disable the Players.LimbsBulletTimeToSecondStageSeconds mechanic by setting this parameter’s value to -1.
    • Fixed a minor desynchronization issue with the leaking bandage icon, which caused it to remain visible for 1-2 seconds after a wound was bandaged.
    • The swing amplitude of the weapon when experiencing hand pain has been slightly increased.
  • TerjeMods compatibility:
    • Removed the outdated Inedia damage modification for TerjeSkills perks, since TerjeSkills now applies modifiable damage as a separate hit that is correctly handled by Inedia handlers. Due to this issue, damage was being modified twice (once by Inedia in the handler and a second time by the additional TerjeSkills hit), resulting in significantly inflated damage values. Now everything works correctly, meaning the additional damage is fully handled by TerjeSkills. Also, the InediaTerjeCompatibility mod has been updated - the scripts that restored the infected vanilla HP after taking damage have been removed, as they are no longer necessary (essentially, this modification now does not modify anything except config.cpp).

You can always check what has changed in the Default configuration file, which is updated after each modification update. You can also view the configuration file DIFF between the latest versions here.