This thread will serve as a repository for my LUA code related to Payday 2. I will add/update this thread whenever I release some new LUA code to the public, or something has been broken by an update.
Feel free to contribute or make requests, I will see about filling those requests if/when I have time. If you make a contribution to this thread, I will likely add your contribution to my origional post and ensure proper credit is given.
Notes:
* All LUA code below is written by me, unless otherwise stated.
* Please remember to rep+/credit me if you like/use my stuff. Thank you.
Grenade/Tripmine Damage Multiplier:
Knife/Melee Damage Multiplier:
Low Detection Risk Rating:
Note: Low detection risk rating even with full combat gear. Tweak the variables to your liking.
Player Movement Speed Multiplier:
Free OffshorePayday/Casino Purchasing:
Feel free to contribute or make requests, I will see about filling those requests if/when I have time. If you make a contribution to this thread, I will likely add your contribution to my origional post and ensure proper credit is given.
Notes:
* All LUA code below is written by me, unless otherwise stated.
* Please remember to rep+/credit me if you like/use my stuff. Thank you.
Grenade/Tripmine Damage Multiplier:
Code:
-- enable explosives damage multiplier
if not CopDamage.damage_explosion_origional then
CopDamage.damage_explosion_origional = CopDamage.damage_explosion
end
function CopDamage:damage_explosion( attack_data )
attack_data.damage = attack_data.damage * 5
return self:damage_explosion_origional( attack_data )
end
-- disable explosives damage multiplier
if CopDamage.damage_explosion_origional then
CopDamage.damage_explosion = CopDamage.damage_explosion_origional
CopDamage.damage_explosion_origional = nil
end
Code:
-- enable melee damage multiplier
if not CopDamage.damage_melee_origional then
CopDamage.damage_melee_origional = CopDamage.damage_melee
end
function CopDamage:damage_melee( attack_data )
attack_data.damage = attack_data.damage * 5
return self:damage_melee_origional( attack_data )
end
-- disable melee damage multiplier
if CopDamage.damage_melee_origional then
CopDamage.damage_melee = CopDamage.damage_melee_origional
CopDamage.damage_melee_origional = nil
end
Note: Low detection risk rating even with full combat gear. Tweak the variables to your liking.
Code:
-- enable low detection risk
if not origional_set_suspicion_multiplier then
origional_set_suspicion_multiplier = PlayerBase.set_suspicion_multiplier
end
function PlayerBase:set_suspicion_multiplier( reason, multiplier )
self._suspicion_settings.multipliers[ reason ] = 0.4
self._suspicion_settings.hud_offset = 0
local buildup_mul = 0.5
local range_mul = 0.3
for reason, mul in pairs( self._suspicion_settings.multipliers ) do
buildup_mul = buildup_mul * mul
if mul > 1 then
range_mul = range_mul * math.sqrt( mul )
end
end
self._suspicion_settings.buildup_mul = buildup_mul
self._suspicion_settings.range_mul = range_mul
end
-- disable low detection risk
if origional_set_suspicion_multiplier then
PlayerBase.set_suspicion_multiplier = origional_set_suspicion_multiplier
origional_set_suspicion_multiplier = nil
end
Code:
-- enable player movement speed multiplier. Adjust the multiplier and or base value to your liking for a greater speed increase.
if not PlayerManager.movement_speed_multiplier2 then
PlayerManager.movement_speed_multiplier2 = PlayerManager.movement_speed_multiplier
end
function PlayerManager:movement_speed_multiplier( speed_state, bonus_multiplier )
if not bonus_multiplier then
bonus_multiplier = 1
end
bonus_multiplier = bonus_multiplier * 2
return self:movement_speed_multiplier2( speed_state, bonus_multiplier )
end
-- disable player movement speed multiplier
if PlayerManager.movement_speed_multiplier2 then
PlayerManager.movement_speed_multiplier = PlayerManager.movement_speed_multiplier2
PlayerManager.movement_speed_multiplier2 = nil
end
Code:
-- enable free offshore payday(casino) purchasing
function MoneyManager:get_cost_of_casino_fee( secured_cards, increase_infamous, preferred_card ) return 0 end
Aucun commentaire:
Enregistrer un commentaire