STEAM GROUP
Payday 2 Mechanics PD2mech
STEAM GROUP
Payday 2 Mechanics PD2mech
11
IN-GAME
73
ONLINE
Founded
27 September, 2015
Finale 24 Oct, 2018 @ 8:13pm
areaminpoliceforce system explanation request
I'm trying to understand exactly how the areaminpoliceforce element and structure works- what it calls, what units satisfy it, etc.

It may be key to a bug in a heist edit I'm working on, and more broadly I think it might be related to a set of AI pathing bugs effecting a bunch of heists.

I had previously believed it called a separate set of spawngroups that Jules had disabled several months ago, but I now believe it is sometimes just calling...any enemy NPC in the map, at what seems to be a random point in time after it is activated. This is a problem for my edit, because the heist is calling stationary guards to walk over to the drill in stealth.
Last edited by Finale; 24 Oct, 2018 @ 8:41pm
< >
Showing 1-3 of 3 comments
It looks like it was used to set the reinforcement group areas, and possibly a way to force units to spread out. I also have a feeling it was used in the spawn areas to hold units back so that newly spawned units didn't immediately path out and attempt to engage the enemy.

From my gut (since I really don't have Lua knowledge) it's just a bounding box over an area which keeps a minimum number of enemies within it. This is probably set to 0 in all the spawn areas of the recent maps making them into "Dynamic Spawn Zones" which is why there is never-ending enemies. Actually, I have a belief that Jules probably didn't make seperate zones to use this element stratgetically, instead just set a global element of 0 meaning that enemies aren't bound to an area allowing for the horde engage the player from the moment they're spawned to the moment the player leaves the navmesh, or the player kills them.
Frankelstner 25 Oct, 2018 @ 10:17am 
Yeah, it's for the reinforcement units, which is deprecated. Though I have just noticed that there is another pathway for enemies to be assigned to such a place.

GroupAIStateBesiege:on_cop_jobless assigns an enemy to such a reinforce spot (if it has room) and with various additional requirements. It is only called by CopLogicAttack._chk_exit_attack_logic if the wanted reaction is not "attack" anymore and CopLogicBase.is_obstructed returns true,false which only happens when

if not objective or objective.is_default or (objective.in_place or not objective.nav_seg) and not objective.action

and is_default happens when an objective is done (success or fail). But it should not apply here at all, because the assignment only happens if the enemy happens to stand on the reinforce spot already. And the enemy is never in the attack logic.


Anyway, I would just disable it for good:
function ElementAreaMinPoliceForce:on_executed(instigator) if not self._values.enabled then return end --self:operation_add() ElementAreaMinPoliceForce.super.on_executed(self, instigator) end
And then find the real culprit.
Finale 25 Oct, 2018 @ 10:48am 
OK, thanks. Time to manually assign debugs to every SO on that side of the map, I guess... this would be a lot easier if I could replicate the bug.
< >
Showing 1-3 of 3 comments
Per page: 1530 50