SKKmods Posted April 19 Share Posted April 19 The Follow Player AI package is super expensive in resources having to constantly recalculate navmesh pathing to a dynamic moving target (the player). There is a limit to how many actors will actually update their Follow Player AI package before they just stand idle in place. I believe it is around 32 or 64 but have misplaced the testing notes and test harness when I profiled it for FeralNights back in 2021 Anyone else tested that and not lost their notes ? Link to comment Share on other sites More sharing options...
South8028 Posted April 19 Share Posted April 19 How many NPCs can calculate their paths in one scene? For example, how many ghouls can attack the player? Link to comment Share on other sites More sharing options...
SKKmods Posted April 20 Author Share Posted April 20 [ setgs iNumberActorsInCombatPlayer ] defaults to 20 although I have watched 32 NPCs fighting another 32NPCs so not convinced thats the full story. Link to comment Share on other sites More sharing options...
South8028 Posted April 20 Share Posted April 20 Yes, subjectively it seems that there are more. My enemies spawn with a bat file, there are 100 npc in them. I liked to arrange a ghoul invasion on Gunners and Brotherhood. ~200-300 ghouls. They started moving as they were eliminated and paths were unblocked. But gradually, 60-80% joined the attack, depending on the terrain. The further the npc are from each other, the faster they join the scene. I think it depends on the navmesh. Link to comment Share on other sites More sharing options...
NeinGaming Posted April 20 Share Posted April 20 (edited) I have made zero scientific measurements, but anecdotally from playing around with overkill enemy spawning, and being followed by like 20 settlers, when there are a lot of combatants, even with iNumberActorsInCombatPlayer=100 there are never ever even close to 100 of them *moving* at the same time. They may shoot and shout but otherwise, if you look at the ones in the back, they often just stand still as if they're waiting their turn. But then again, I also messed with pathfinding ini settings a bunch, blindly, and probably making them worse, so that might be a self-created problem. I wanna point out these: iMaxAvoidBoxCheckPerFrame iMaxObstacleBuildPerFrame iMaxPathRequestsPerFrameTracked iMaxQueuedPathingRequests iPathRequestsAllowedPerFrame I don't even know if these do anything, and if so, what they do exactly, but that "per frame" part seems like it could affect bottlenecks created by lots of pathfinding. I wonder if iNumberActorsInCombatPlayer is purely related to performance, or also to difficulty? Many games limit the number of enemies that can aggro, or perform an attack at the same time. That is: does this setting affect the combat between NPC that aren aware of the player? As in, if you set it to 1, can 10 NPC fight against another 10, but only 1 of them can target the player -- OR is only one NPC in the whole game fighting, clobbering defenseless enemies? I can't try it out atm but that seems like a fun thing to test, especially since you can change the setting via console. Edited April 21 by NeinGaming Link to comment Share on other sites More sharing options...
SKKmods Posted April 21 Author Share Posted April 21 The complexity of AI updates for travel and combat seem to be two DIFFERENT limits. The cases I have observed that have different results based on inferred complexity of behaviour tree and pathing calculations: A savegame will not load with > 300 actors in the loaded area (proven fact). NPC in the loaded area travel to a fixed target: lots ~128 ? NPC in the loaded area follow a moving target: not many ~32 ? NPC in the loaded area in combat with NPC: lots ~ 128 ? NPC in the loaded area in combat with player: less ~ 32 ? "In the uGridsToLoad loaded area" makes a massive difference, unloaded off screen its a simple straight line time/speed/distance calculation per tick no navmesh no rendering no behaviour tree evaluation. Link to comment Share on other sites More sharing options...
South8028 Posted April 21 Share Posted April 21 https://disk.yandex.ru/d/3krDatM0FowFYg I experimented. Here are the conclusions: First wave 8npc vs 100npc. In the first 10 seconds, ~75 ghouls and all 8 synths moved. Second wave. + 100npc In the first 10 seconds, ~40% of the second wave moved. Result. Duration ~1-1.5 minutes. There are ~130npc active in the scene, taking into account the killed npc. There are 208npc on the map in total, of which ~10% were killed during the test time. Link to comment Share on other sites More sharing options...
d4em Posted April 23 Share Posted April 23 On 4/19/2025 at 10:05 AM, SKKmods said: The Follow Player AI package is super expensive in resources having to constantly recalculate navmesh pathing to a dynamic moving target (the player). There is a limit to how many actors will actually update their Follow Player AI package before they just stand idle in place. I believe it is around 32 or 64 but have misplaced the testing notes and test harness when I profiled it for FeralNights back in 2021 Anyone else tested that and not lost their notes ? Expand You have notes? Can I please see your notes If they were included in something like you would never lose them again Link to comment Share on other sites More sharing options...
SKKmods Posted April 23 Author Share Posted April 23 My notes are typically in depth technical articles that end users just b1tch and moan about when I publish them. Amuse yourself with this sort of incomprehension. Trying to chunk 'em into load screen deliverable soundbytes would be totally hopeless. Link to comment Share on other sites More sharing options...
d4em Posted April 23 Share Posted April 23 When actors attempt to travel to a settlement, they often try to find the LocationCenterMarker for that settlement. Building over this marker can cause AI packages to freeze or teleport. If an actor spawns outside the loaded area around the player (defined by uGridsToLoad), their AI can teleport them to the edge of the loaded area around the player. To trigger base game attacks at settlements that have settlers, console: [ cqf WorkshopParent "WorkshopParentScript.TriggerAttack" WorkshopRef NumberOfAttackers ] e.g. [cqf WorkshopParent "WorkshopParentScript.TriggerAttack" 000250fe 4 ] --- (Side note: is it possible that navmesh issues are causing FGEP ghouls to teleport to the player with feral nights?) Link to comment Share on other sites More sharing options...
Recommended Posts