PANPC 2.0.12 has been released and is now available to Citizen role users on the GreslinGames Discord. (Thanks to Cryss for his videos, above - please go like and subscribe.)
Changelog:
[NEW] Near-immediate allied hit and death reactions
[NEW] Car explosion avoidance, grenade dodging
[NEW] Real time trap alerts - monkey, hanging tin can traps, etc.
[NEW] Real time responses to Deathclaw, Behemoth special attacks
[NEW] Most explosives now generate enemy reactions
[NEW] PANPC_KW_ScaryWear keyword - intimidate/high vis (Base only)
[NEW] NPCs now aware of companion/Dogmeat proximity
[NEW] Out-of-ammo behaviors on non-infinite-ammo enemies (All ranged)
[NEW] Real time LOS events on player, companion, Dogmeat
[NEW] Added Legendary Rust Devil team to Arena
{CHANGED] Distraction system completely overhauled to real time response
[CHANGED] ComeHere ally call mechanic converted to real time response
[CHANGED] Weapon comparison updated to better handle melee vs. gun situations
[CHANGED] Added commit time option to GoThere()
[CHANGED] Legacy panic retreat/GTFO phased out in favor of modern move system
[CHANGED] Proximity: player can no longer be "hidden" at close range in combat
[CHANGED] General overhaul of Low Power Mode for faster startup
[CHANGED] Sniper alert/alarm removed as redundant
[CHANGED] Lots of tactical adjustments
[COMPAT] Keywords to block combat/out of combat/RTR actions
[COMPAT] Fallout 4 DLCs now required
[PERF] Throttle can now be set to negative values
[PERF] Clone AI activation limit in MCM (default to zero)
[PERF] All forced combat starts streamlined for efficiency and speed
[PERF] Arena - MCM kill switch to despawn remaining Arena actors
[PERF] General optimization pass
[MCM] All special abilities now default to off/none
[FIX] "PANPC started" message should now only happen on initial install
[FIX] Too many legacy bugs to list here
Oh boy. Where to begin.
You can read about 2.0.12 development in my last few entries. This started with the realization that there was a relatively cheap and simple way to incorporate near-immediate combat and environmental event reactions into PANPC. And so my original plan was to spread this out over maybe two or three PANPC releases, to be done over the next couple of months.
That changed last week when I was almost killed in a car accident. I walked away uninjured, but with a new drive to stop wasting time, as well as a lot of mental and emotional energy that needed to go somewhere. So it went here.
For those of you who have been with me for a while, this update is a major one, on par with the jump from 1.7 to the late 1.8 series. That was when the package-based movement control system happened; I spent much of 1.8.x working out the details, similar to how I intended to spread this one out. But the significance is about the same. In many ways, it's the other half of the movement system.
So enough storytelling. Read the recent Dev Diaries if you want to know more. Let's just get right into this grand circus of a PANPC release.
The Real Time Response Framework
This is the 2.0.12 game changer, and here's why. Since the earliest versions in 2018, most of PANPC evolved as a series of workarounds for dealing with script lag. The AI can only detect, react, and respond to events as fast as the scripts are running, and the more script activity that's running at once, the slower they all go. That means that at peak script load times - for example, in a heavy combat session with lots of AI scripts going simultaneously - an individual response cycle could take as long as ten seconds, start to finish.
This all began because I was thinking one day about the death warning problem, dealing with situations where you kill an enemy and his friends don't react. That may seem like a simple problem to solve, but lag makes it a complicated one. In drilling down on that one problem, I realized that there was a cheap and simple solution that turned out to work surprisingly well.
That solution became the Real Time Response (RTR) framework. Many standard PANPC combat situations are now being translated directly to Papyrus events, which means they're kicking off right away and only minimally affected by lag. This meant redesigning (and in some cases, outright removing) a lot of legacy code that was no longer required, or was even in the way.
There are still some things yet to do. But RTR now covers:
* Hit and death warnings
* Car explosion avoidance
* Grenade/mine reactions, including dodging
* NPCs being called to each other, for a variety of reasons
* The PANPC distraction system
* Traps - monkey cymbal, hanging cans, a few others
* Some NPC special attacks: Deathclaws, Behemoths, Liberty Prime, others
* Many explosion types, including turret destruction
and probably some others I'm forgetting right now. In general, expect any of these events to immediately send data to local AIs, typically telling them to move and/or to prepare an attack on the instigator. Reaction times have been reduced in most situations from 5-10 seconds to under one second.
General AI Tactical Update
Shifting the event inputs to real time had the immediate secondary effect of completely wrecking the AI, which again evolved over years for non-real time conditions. So, in general, expect 2.0.12 to have a completely different feel from any prior version of PANPC, because not only are they getting real time data, they're also making different decisions with it.
Proximity and Line of Sight
Real time processing also made other issues obvious priorities, namely player/companion/Dogmeat proximity and LOS (line of sight) events. Losing all that legacy code, just by itself, meant a bunch of optimization savings, some of which I could spend elsewhere. So 2.0.12 now detects when the primary companion and/or Dogmeat is nearby (it always prox checked the player), responding to them in real time as potential threats.
Line of sight on the player/companion/Dogmeat is now more active, in addition to the existing passive LOS checking. Enemies are now a lot more likely to attack as soon as they see you, and more able to do it.
Redesigned Weapon Switching
Prior PANPC versions had an intermittent problem where the AI would get stuck in a loop, switching their weapons back and forth or holstering/unholstering the same one. I've ripped out the old subsystem and redesigned a leaner and more coherent one. While it may switch weapons legitimately less often, this bug should be resolved and the NPC should be a bit smarter about their weapon choices.
The out-of-ammo behaviors introduced in 2.0.11 have now been ported to all AI classes capable of using weapons that use ammo.
Optimization and Performance
When I wasn't writing new code or redesigning old systems, I was ripping out unnecessary bits and consolidating everything else. 2.0.12 should be the leanest and best optimized version of PANPC to date.
Most of that is under the hood, but there are two areas where these optimizations are importantly player-facing.
First, cloning: by default, clones now no longer enable PANPC AI. They spawn in their vanilla state (or whatever state you've modded them into elsewhere). This means that you can now crank up clones as high as you like without blowing up the script system, because only the original NPCs are enabled with AI scripts.
This can be changed in MCM with a new control that allows you to limit the number of existing clones that are AI-enabled at one time. When clones are killed are despawned, other existing clones will then get an AI script, up to that limit. Again, this limit value is zero by default - it's up to you to take on that extra load, if you want.
Second, you can now select negative values for the Throttle settings. Throttle has always been about doing a single job: slowing down PANPC script processing during spike periods of script overhead, in an attempt to ease the load until things calmed down. However, the Throttle math is still tuned for a much heavier version of PANPC - somewhere around 1.7 or 1.8 - and could probably stand a bit of reduction.
I haven't decided yet to do that, but you can experiment with lower values yourself. Lowering Throttle into negative values will speed up the scripts, versus slowing them down. It WILL increase your chances of script crashes during peak times. But if you want to experiment with those options for yourself, it is now there.
That's the big stuff. There's some compatibility stuff, but I'll update the compat guide for that - this shouldn't break any existing patches. However, the real time responses to environmental events require optional ESPs in the PANPC package, made optional because they change base game records. If you choose not to use them, RTR reactions will be limited to PANPC-created combat events.
I will update the PANPC Manual soon. In the meantime, if you have any questions about 2.0.12 features and changes, please address them to the #pack-attack channel on the GreslinGames Discord and I'll try to answer them the best I can.
Have fun,
- G.
PS: When you're done here, go check out this FROST artwork being done by our friend Eusong. Good stuff.