This is in no way my own mod, it was made by Kwhali or Polarathene as he is known as in the modding scene. Just releasing it here since he never released this wonderful mod. This is a interesting Lua Script mod that I ran across on Reddit here: https://www.reddi*****m/r/paydaythehe...arry_multiple/
What it does essentially is lets you set how many keycards you can pickup and lets you pickup more than one. I always found it annoying and tedious that I could not pickup more than one keycard. I usually play solo so it was really time consuming trying to find all of the keycards I didn't pickup. It is ridiculous that you cannot have more than one keycard, so this mod changes this. If you want to change the max number of keycards that you can carry just edit the .lua script with Notepad++, on line 10 change the max=9 to whatever number you want. You can even set it so that you always have a keycard by setting the current=0 to 1.
The Keybind part of the mod lets you carry more special items and equipment. Same as before, you can set the maximum number of equipment and special items you can carry. You must edit the .lua script with Notepad++, on line 4 change the max=9 to whatever number you want. I wouldn't advise changing the current=0, since this applies to all equipment and special items. It might crash the game since the game doesn't know what special item to give to you at the start of the heist.
Lua Script By Kwhali:
Code:
1. BKIN_ExtraItems = BKIN_ExtraItems or class()
2.
3. if not BKIN_ExtraItems.ready then
4. BKIN_ExtraItems.ready = true
5.
6. --Config for your items, current should always be 0, max whatever max you want.
7. --Find values at EquipmentsTweakData/tweak_data.equipment and use any in the specials
8. --table.
9. managers.player._special_item = {
10. bank_manager_key = { current = 0, max = 9 }
11. }
12.
13.
14. --Hooks
15. BKIN_ExtraItems.orig__PlayerManager = {
16. add_special = PlayerManager.add_special,
17. remove_special = PlayerManager.remove_special,
18. can_pickup_equipment = PlayerManager.can_pickup_equipment
19. }
20.
21. --Any added after the 1st one will increase counter and skip the rest of the code
22. function PlayerManager.add_special(self, params)
23. local name = params.equipment or params.name
24. local special_item = self._special_item[name]
25. if special_item and special_item.current < special_item.max then
26. self._special_item[name].current = special_item.current + 1
27. if special_item.current > 1 then log("more than 1") return end
28. end
29.
30. BKIN_ExtraItems.orig__PlayerManager.add_special(self, params)
31. end
32.
33. --If you have more than one it'll just decrease the counter and not run the rest
34. function PlayerManager.remove_special(self, name)
35. local special_item = self._special_item[name]
36. if special_item and special_item.current > 1 then
37. self._special_item[name].current = special_item.current - 1
38. return
39. end
40.
41. BKIN_ExtraItems.orig__PlayerManager.remove_special(self, name)
42. end
43.
44. --This allows you to pickup more than one
45. function PlayerManager.can_pickup_equipment(self, name)
46. local special_item = self._special_item[name]
47. if special_item and special_item.current < special_item.max then
48. return true
49. end
50.
51. return BKIN_ExtraItems.orig__PlayerManager.can_pickup_equipment(self, name)
52. end
53. end
Keybind Lua Script By Kwhali:
Code:
1. --Adds one of everything (note some items impact movement speed preventing running)
2. managers.player._special_item = {}
3. for key, _ in pairs(tweak_data.equipments.specials) do
4. managers.player._special_item[key] = {current = 0, max = 9}
5. end
6. for key, _ in pairs(managers.player._special_item) do
7. managers.player:add_special({name = key})
8. end
mod.txt by Kwhali:
Code:
{
"name": "BKIN Extra Items",
"description": "Increase how many items like keycards you can hold.",
"author": "Polarathene",
"contact": "no@suppor*****m",
"version": "0.1",
"updates": [
{
"revision": 1,
"identifier": "bkin-extraitems"
}
],
"persist_scripts" : [
{
"global" : "bkin_extraitems",
"script_path" : "lua/bkin_extraitems.lua"
}
]
}
If you have no experience in setting up .lua mods then you can download the mod from the attachment below. To install the mod just drop the bkin_extraitems folder into your mods directory located in the main directory of Payday 2, Enjoy!