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
Skills.lua
--[[
Old Copycat Swap Speed (Robusto)
Autor: ChatGPT
Versão: robust-v1
- Define o upgrade de +320% (3.2x).
- Injeta dinamicamente o upgrade na specialization MRWI (procura por pistas).
- Garante que o auto-reload não receba bonus de swap speed.
--]]
-- 1) Hook em UpgradesTweakData para definir valores e a definition do upgrade
Hooks:PostHook(UpgradesTweakData, "init", "OCSS_DefineUpgrades", function(self, tweak_data)
-- auto reload: tempo padrão
local auto_reload_swap_time = 3
self.values.weapon.primary_reload_swap_secondary = { auto_reload_swap_time }
self.values.weapon.secondary_reload_swap_primary = { auto_reload_swap_time }
end)
-- 2) Hook em SkillTreeTweakData:init para localizar a MRWI e inserir o upgrade na skill certa
Hooks:PostHook(SkillTreeTweakData, "init", "OCSS_InsertUpgradeToMRWI", function(self, tweak_data)
-- garantias
if not self or not self.specializations then
return
end