Last active
February 15, 2023 15:06
-
-
Save kythyria/85e6001a0772bc4394a073cf2659e651 to your computer and use it in GitHub Desktop.
Nearly infinite jokers mod for Payday 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local init_original = UpgradesTweakData.init | |
function UpgradesTweakData:init(...) | |
init_original(self, ...) | |
self.values.player.convert_enemies_max_minions = { | |
2, | |
1000 | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
VERY Good mod im play and build army i love your mod