PAYDAY 2's vanilla AI is a "wonder", with years of old, outdated, and relatively broken code, it's a surprise it works at all!
That's because it barely does. There is an astounding amount of bugs, issues and lack of optimizations that cause enemies to take way longer to update than nescessary, and most of it's functionality is buried under code that breaks it further, so:
Within the constraints of keeping things as close to Vanilla as possible while still fixing, optimizing and improving AI, this mod will fix most of the biggest issues that plague the game's AI without compromising performance OR needing a unique match-making key!
Cops are now somewhat close to tactical:
Vanilla has an issue in which cops are constantly relocated to the position the player is, even if their objective isn't actually to assault the player. This is both a waste of performance AND makes them overly aggressive in a particularly dumb way, this also causes special enemies to be unable to use their special attacks 90% of the time, as they end up thinking they need to go into travel-logic.
This has now been fixed. Cops will approach the area the player is in, and wait until their teammates are close before pushing, they will also proudly announce them opening fire and pushing in.
This also fixes Cloakers and Tasers rarely ever using their abilities properly, resulting in them being much more threatening.
Fixed in Vanilla finally! (Update 240.3)
Cover points rotations are automatically generated when a heist is launched, allowing enemies to properly use these points for better navigation.
Enemies will try to take cover near friendly shields, medics and bulldozers if possible, to maximize their chances of survival.
Enemies no longer break when sent into panic by skills or perkdecks:
Due to a mishap in setting up the panic animations, once a cop goes into panic, they'll be stuck unable to move until either you force them to play another animation somehow, or, their level of detail gets updated. (It's easy to test in Vanilla, make a cop play a panic animation and they'll be stuck doing nothing forever until you either turn away from them or send them into a stagger animation.)
This no longer happens.
Fixed in Vanilla finally! (Update 240.3)
There are now more high-definition AI enemies allowed:
Vanilla has a maximum of 3 high-definition AI enemies per player, up to a total of 12 important enemies, however, if there's less players than that, the game never tries to add the maximum number of important enemies that there would be with 4 players, meaning that enemy AI is actively dumber in single-player than in multiplayer.
This is now fixed, and the number of important enemies dynamically scales with player count properly.
Improved enemy pathing:
Vanilla is riddled with tiny little things that make enemy pathing take way longer than it should, I'm just going to list those out:
-
Pathing sometimes over-complicates itself, turning straight lines unescessary bends and delaying the intended movement.
-
When an enemy is travelling to a destination, there's a tendency for logic updates to get wasted and cancelled early when it's not nescessary.
-
Pathing priority is not sent correctly most of the time, this causes pathing to take way longer in the engine because it gets tossed in to the ultra-mega-backburner.
-
Cops/Team AI will occasionally unescessarily choose to strafe or moonwalk towards their destination, even when there are no targets to shoot or aim at, which reduces their movement speed.
LIES fixes these issues up to a point, allowing cops to travel from point to point much faster and at intended speeds.
Various other fixes:
I can't cover everything into these big examples, here's some other stuff that impacts gameplay massively without really being obvious:
-
When enemies perform a path-finding search, they have to wait for the next logic update to actually utilize it, even if the path is ready to be used. In LIES, as soon as path-finding is done, enemies will try to update their travel and attack logic without updating "detection", ensuring minimal movement delays, without sacrificing performance.
-
Enemies can't really reload while moving in Vanilla due to a improperly set animation tag, in LIES, enemies determine how bad they need to reload or not, and try to stop moving in order to do it.Fixed in Vanilla finally! (Update 240.3) -
Various enemy height checks in code are using values from PD:TH, where enemy models and proportions were different, causing enemies to think they are well-hidden by cover when they might not be. LIES fixes this.
-
Civilians in travel logic during stealth cause MASSIVE framedrops by constantly updating them without needing to. LIES fixes this.
-
Tied up civilians are constantly relocated to the player's position if the player moves even slightly, causing them to hitch in place, or not follow players properly. They also are very easily scared by enemy gunfire during loud, and basically impossible to move as a result. LIES fixes both of these issues, allowing hostages to be moved so long as you keep the cops away from them and you stay relatively close.
-
Enemies in Loud have to run little tid-bits of stealth detection code before they can fully "see" a heister, this causes an unintended delay with players who have high concealment during loud gameplay, and sometimes makes them look pretty stupid because they can't see something directly in front of them. This is now fixed.
Improved chatter:
Enemies in vanilla have a bunch of unused voicelines. This mod adds some of them as functional things they can say. Just as a little bonus.
While there isn't much that changed, the hope here is that the changes will be noticeable enough to make the game feel just a little fresher and better, after all, AI is just that, it's artificial intelligence, the intelligence is all...LIES. (ba-dum-tss)
OPTIONAL FEATURES:
This mod isn't just all fixes and gray, there's a few things that are new in it.
Customizeable Aggressiveness, Movement Frequency, and Reaction Time:
If the mod starts making the game feel easy and cops feel too tactical? Just crank up the aggressiveness and reaction time. Watch those cops snap towards you like you're playing Classic DOOM on Ultra-Violence.
Custom Navlink Delays:
Adjust the individual delays for movement animations, used by the AI for things such as climbing a fence, or jumping down a ledge, which sometimes are way longer than the actual animation itself, causing enemies to have to wait around long periods of time just to perform those animations.
Cover through LUA:
By overriding the cover functions with my own, cops now take cover through LUA and actively try to cut line of sight with threats if possible instead of only relying on looking cool:
-
Off: Vanilla behavior.
-
Vis-Check: Checks whether the character taking cover would be actually covered up by the cover, improving the effectiveness of the search, at the cost of some performance.
In addition, even if you are not using Cover Through LUA, the outdated information that the engine usually relies on will be generated to allow characters to at least try using it.
Smart Engagement:
Minimize the tendency for enemies to continue moving into danger if starting the engagement at a distance, and moving in slower would be viable for their purposes. Not accurate to Vanilla.
Spicy Tactics:
Adds entirely new AI behaviors and new tactics from Vanilla, and changes things to be just a little bit more interesting to play:
-
Enemies behave differently when players take civilian hostages, and take hostages in general, and swap to different weapons to play things safe if possible.
-
Flank enemies will now chase down lone heisters who have abandoned/been abandoned by their team.
-
On Mayhem and above, specific enemy groups will prefer to target heisters who are doing interactions, reviving players, or reloading. They will also call out reloads from heisters.
-
On Mayhem and above, enemy dodges will be improved, and they will dodge more frequently.
-
On Mayhem and above, various enemies will have increased magazine capacity.
-
On Mayhem and above, civilians go to weekly yoga classes and have grown nerves of steel, allowing them to react faster to criminals that are not giving them proper attention, and being much more courageous about fleeing from them.
-
Minigun Bulldozers can now throw grenades.
-
Various enemies on Death Wish and Death Sentence have damage falloff where they'd normally be missing it, such as Shields.
-
Some specific damage stats on Death Sentence are altered due to different weapons being used.
-
On Death Sentence, ZEAL Heavy SWATs that use rifles will have an underbarrel grenade launcher and be able to launch grenades at heisters.
-
On Death Sentence, Marshal Marksmen will no longer have a glint or trail, and will gain Armor-Piercing rounds.
-
On Death Wish and above, Minigun Bulldozers now gain increased damage, and their damage slowly increases while firing, up to a 2x damage multiplier after 4~ seconds of firing.
-
Captain Winters will now slowly approach players, can spawn in single-player, and now prevents enemies from surrendering until he is defeated.
-
In stealth, characters will no longer have eyes on the back of their head, their vision cone is altered to be more unforgiving, and guards will start "chasing shadows" when their detection meter gets past 60%.
-
In stealth, Detection Risk/Concealment only affects detection speed and range by 25%, both positively and negatively.
-
Certain maps will have specific gimmicks and altered spawngroups.
May contain some extra surprises.
Extremely not accurate to Vanilla, but accurate to our hopes and dreams. NOTE: High sodium content. Toggleable.
Fixed/Low RNG enemy spawns:
Restores shotgunner groups, also comes with the option to minimize the group spawning RNG for a more consistent spread of units. Also allows ZEAL SWATs and ZEAL Heavy SWATs to carry shotguns if their group would normally carry those.
Allow assault groups to retire:
After a specific update, assault groups could no longer walk off the map and despawn when an assault is over, this option restores that feature. Toggleable.
No Joker Stagger:
Makes Jokers unable to be staggered by enemy attacks which allows them to follow players better. Toggleable.
Team AI Shouters:
Allows Team AI to help players with escorts and surrendering cops. Toggleable. Not accurate to Vanilla.
Forced Spawn Delays:
Increases the spawn group delays, reducing cases of enemies constantly pouring out of nearby spawn points. Toggleable.
FAQ:
- Did OVERKILL use your mod's code for Update 240.3?
No, OVERKILL fixed the issues in different, less hacky ways than I did. Please stop making stuff up about this.
- Will this mod conflict with Full Speed Swarm/Iter/Better Bots/Keepers/Think Faster/Responsive Responders:
Yes, and if I see a crashlog with any of these mods in it, I'm going to ignore it from now on.
- Will this mod conflict with (insert other ai-related mod here)?
Probably. I don't advise using multiple AI mods, either because LIES will override something it needs, or it'll overwrite something LIES needs. And as much as I've tried to figure out methods to keep things compatible, there isn't much I can do about it.
- Will this mod conflict with (insert other mod here)?
Give it a shot on Holdout singleplayer, if it crashes only after this mod is installed, there's your answer.
- Will this significantly affect the game's difficulty?
Maybe, you might see special enemies using their attacks MUCH more often in certain cases, the change to panic animations might make certain perkdecks like Muscle feel a little weaker, but it'll all be within the intended behavior that was SUPPOSED to be there to begin with.
- Does this improve Team AI?
Yes, significantly so. Team AI's target priority code has been reworked entirely, and their logics have been improved to help them keep up and position themselves near players.
- Why did you name the mod LIES instead of something more friendly?
I was originally going to name it Fuglore's AI Deals and this entire page was gonna be themed like a car sale, but then I realized that'd be funny and I'd not allowed to do anything but use exclamation marks.