You shouldn't use the code of a poorly implemented mod as an example to base your mod on. Use this instead (replaces everything, save as base.lua or mod.lua):
return DMod:new("MP% but with actual kick", {
author = "Anthony",
description = "Increases the recoil of the mp5 to make it feel stronger.",
hooks = {{
"lib/tweak_data/weapontweakdata", function(m)local WeaponTweakData = m:hook_class("WeaponTweakData")
m:post_hook(WeaponTweakData, "_init_data_player_weapons", function(self)self.mp5.kick.v.standing = 2.5self.mp5.kick.v.crouching = 2.0self.mp5.kick.v.steelsight = 2.5self.mp5.kick.h.standing = 2.5self.mp5.kick.h.crouching = 2.0self.mp5.kick.h.steelsight = 2.5end)
end
}}
})
I left the typo in the id (and implicit name from that) in btw.
You shouldn't use the code of a poorly implemented mod as an example to base your mod on. Use this instead (replaces everything, save as base.lua or mod.lua):
return DMod:new("MP% but with actual kick", { author = "Anthony", description = "Increases the recoil of the mp5 to make it feel stronger.", hooks = {{ "lib/tweak_data/weapontweakdata", function(m) local WeaponTweakData = m:hook_class("WeaponTweakData") m:post_hook(WeaponTweakData, "_init_data_player_weapons", function(self) self.mp5.kick.v.standing = 2.5 self.mp5.kick.v.crouching = 2.0 self.mp5.kick.v.steelsight = 2.5 self.mp5.kick.h.standing = 2.5 self.mp5.kick.h.crouching = 2.0 self.mp5.kick.h.steelsight = 2.5 end) end }} })I left the typo in the id (and implicit name from that) in btw.
does what i released not work correctly?
Something can be poorly coded and still work. But if everyone starts copying the same bad thing, things will inevetably break in unexpected ways.
@DorentuZ` thank you