Description
Possible bug with Officers Stopping Crime
Windows
What is your game version?
228,184
Please explain your issue is in as much detail as possible.
In examining the code related to a mod I made I noticed an interesting artifact.
According to this decompiled code:
Four officers are incapable of preventing a solo renegade crime spree. Ignoring the fact that 2 renegades will never perform any crime, due to a separate function and check. But it would hold true for 8 officers and 2 renegades.
Secondly, this function seems to imply that Officers, regardless of workplace prevent crime just by existing. This came up with my friend who had the Prevent Crime notification occur from a dome with no security office (and two Officer specialists living in the dome).
Can you replicate the issue?
Possibly. It would be difficult to set up. I will post a save if I am able.
Attachments
Possible bug with Officers Stopping Crime
Windows
What is your game version?
228,184
Please explain your issue is in as much detail as possible.
In examining the code related to a mod I made I noticed an interesting artifact.
According to this decompiled code:
Code:
function Dome:CanPreventCrimeEvents()
local officers = #(self.labels.security or empty_table)
local renegades = #(self.labels.Renegade or empty_table)
if officers <= renegades then
return false
end
if officers > renegades * 3 then
return false
end
local chance = MulDivRound(officers, 100, 6 * renegades)
return chance >= Random(0, 100)
end
Four officers are incapable of preventing a solo renegade crime spree. Ignoring the fact that 2 renegades will never perform any crime, due to a separate function and check. But it would hold true for 8 officers and 2 renegades.
Secondly, this function seems to imply that Officers, regardless of workplace prevent crime just by existing. This came up with my friend who had the Prevent Crime notification occur from a dome with no security office (and two Officer specialists living in the dome).
Can you replicate the issue?
Possibly. It would be difficult to set up. I will post a save if I am able.
Attachments
Upvote
0