• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

Draco18s

Recruit
11 Badges
Mar 23, 2018
5
0
  • Cities: Skylines
  • Cities: Skylines - Mass Transit
  • Surviving Mars
  • Age of Wonders III
  • Shadowrun Returns
  • Shadowrun: Dragonfall
  • Shadowrun: Hong Kong
  • Prison Architect
  • Crusader Kings II
  • Magicka
  • Sword of the Stars
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:

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
Was able to produce both behaviors.
Upon loading this save, fast-forward to noon, the renegades will steal resources from Dome #1 (there are 10 officers, 3 renegades, and no security office).
Reload the save and reassign two security officers to Dome #3, fast forward to noon, renegades will be prevented from stealing resources (this may not be a sure-thing, I had to test four times: the first three I reassigned one officer to Dome #3 with no success, but on the fourth try I reassigned two and it triggered).

Mods are installed, but the save loads and the behavior reproduces without them. Linking them just in case:
Cheat Menu http://steamcommunity.com/sharedfiles/filedetails/?id=1336604230&searchtext=cheat
Perk Pack
Mod Config
Warp Speed
 

Attachments

  • Autosave Sol 26.savegame.sav
    37,7 MB · Views: 4