To adjust the stats of a weapon, I think you need to do it via post-hooking the appropriate function in lib/tweak_data/weapontweakdata
In the case of the Welrod, you'd need to do:
Hooks:PostHook(WeaponTweakData, "_init_welrod", "UNIQUE_HOOK_ID_init_welrod", function(self, weapon_data, tweak_data)-- adjust the stats of the welrod here.-- see vanilla code here: https://github.com/steam-test1/Raid-WW2-Lua-Complete/blob/master/lib/tweak_data/weapontweakdata.lua#L4227end)
and then in supermod.xml, remember to hook this function to lib/tweak_data/weapontweakdata, like so (and adjust the other mod definition values):
<?xml version="1.0"?><modname="cool modded welrod stats"...etc
><hooks><postscript_path="LUA FILE NAME HERE.lua"hook_id="lib/tweak_data/weapontweakdata"/></hooks><!-- here's how you do auto-updates <updates>
<update provider="modworkshop" identifier="NUMBERS AFTER /mod/ IN MWS URL GO HERE" important="true"/>
</updates> --></mod>
Disabling/adjusting the animation which plays between shots would probably require a lot more finagling around with animations (which is a whole other can of worms), but this method should at least allow you to make it function at the desired speed.
30 935
We Use Cookies 🍪We use cookies to improve your user experience. Will you allow us to store them?
To adjust the stats of a weapon, I think you need to do it via post-hooking the appropriate function in
lib/tweak_data/weapontweakdata
In the case of the Welrod, you'd need to do:
Hooks:PostHook(WeaponTweakData, "_init_welrod", "UNIQUE_HOOK_ID_init_welrod", function(self, weapon_data, tweak_data) -- adjust the stats of the welrod here. -- see vanilla code here: https://github.com/steam-test1/Raid-WW2-Lua-Complete/blob/master/lib/tweak_data/weapontweakdata.lua#L4227 end)
and then in supermod.xml, remember to hook this function to
lib/tweak_data/weapontweakdata
, like so (and adjust the other mod definition values):<?xml version="1.0"?> <mod name="cool modded welrod stats" ...etc > <hooks> <post script_path="LUA FILE NAME HERE.lua" hook_id="lib/tweak_data/weapontweakdata"/> </hooks> <!-- here's how you do auto-updates <updates> <update provider="modworkshop" identifier="NUMBERS AFTER /mod/ IN MWS URL GO HERE" important="true"/> </updates> --> </mod>
Disabling/adjusting the animation which plays between shots would probably require a lot more finagling around with animations (which is a whole other can of worms), but this method should at least allow you to make it function at the desired speed.