Old Copycat swap speed, mod try fail...
I am trying to make an swap speed mod for copycat, but i wanted to remove the "new swap speed on auto reload" to not being OP;
problem is i coded in normal BLT in the old days, i tried to make some codes, didnt work, the tried to chat GPT for help, didnt work.
could somone help/ make this mod?
i was hopping i at least made an mod to make the old swap speed always on, the try to work upwards in removing the new swap...
but could not do nothing
Info
Replies
runtime.lua
--[[
Old Copycat Swap Speed (Runtime override)
Intercepta upgrade_value para garantir que o bônus +320% (3.2x)
só seja retornado quando a specialization ativa for a MRWI / Copycat.
Cobre várias chaves possíveis usadas por mods/jogo.
--]]
local function is_spec_mrwi(spec_id)
if not spec_id then return false end
local spec = tweak_data and tweak_data.skilltree and tweak_data.skilltree.specializations and tweak_data.skilltree.specializations[spec_id]
if not spec then return false end
local name_id = tostring(spec.name_id or ""):lower()
local desc_id = tostring(spec.desc_id or ""):lower()
if name_id:find("mrwi") or name_id:find("copy") or desc_id:find("mrwi") or desc_id:find("copy") then
return true
end
end
-- Lista de chaves de upgrade que podem representar swap speed (cobre variações)
local SWAP_KEYS = {
["mrwi_passive_swap_speed_multiplier"] = true,
["mrwi_passive_swap_speed"] = true,
["mrwi_swap_speed_multiplier"] = true,
["passive_swap_speed_multiplier"] = true,
["passive_swap_speed"] = true,
["swap_speed_multiplier"] = true
}
Hooks:PreHook(PlayerManager, "upgrade_value", "OCSS_OverrideSwapUpgradeValue", function(self, category, upgrade, default)
-- Só nos interessam upgrades de arma (weapon)
if tostring(category) ~= "weapon" then
return
end
end)