Skip to content

Instantly share code, notes, and snippets.

@kythyria
Last active February 15, 2023 15:06
Show Gist options
  • Save kythyria/85e6001a0772bc4394a073cf2659e651 to your computer and use it in GitHub Desktop.
Save kythyria/85e6001a0772bc4394a073cf2659e651 to your computer and use it in GitHub Desktop.
Nearly infinite jokers mod for Payday 2
function GroupAIStateBase:has_room_for_police_hostage()
local nr_hostages_allowed = 4
for u_key, u_data in pairs(self._player_criminals) do
if u_data.unit:base().is_local_player then
if managers.player:has_category_upgrade("player", "intimidate_enemies") then
nr_hostages_allowed = nr_hostages_allowed + 1
end
elseif u_data.unit:base():upgrade_value("player", "intimidate_enemies") then
nr_hostages_allowed = nr_hostages_allowed + 1
end
end
return nr_hostages_allowed > self._police_hostage_headcount
end
{
"name" : "More Jokers",
"description" : "A nigh-infinite amount (1000) of jokers, but not unjokered hostages.",
"author" : "Grey Heron",
"contact" : "https://steamcommunity.com/id/kythyria/",
"version" : "1.0",
"hooks" : [
{
"hook_id" : "lib/tweak_data/UpgradesTweakData",
"script_path" : "upgrades.lua"
},
{
"hook_id": "lib/managers/group_ai_states/GroupAIStateBase",
"script_path" : "hostagecount.lua"
}
]
}
local init_original = UpgradesTweakData.init
function UpgradesTweakData:init(...)
init_original(self, ...)
self.values.player.convert_enemies_max_minions = {
2,
1000
}
end
Copy link

ghost commented Jan 30, 2021

Hello, how i install this? Thanks

@V1llie
Copy link

V1llie commented Oct 13, 2022

Hello, how i install this? Thanks

im very late but you can just download this https://mega.nz/folder/aIxwnBhL#I3eBUM_o9eyn8ASfpxFqaA and put it in the mods folder

@JCD2007
Copy link

JCD2007 commented Jan 25, 2023

Doesn't work

@AntfrostPL
Copy link

VERY Good mod im play and build army i love your mod

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment