The help is greatly appreciated. This was the main roadblock for me in getting recoil implemented into my mod.
Now, one last thing; is there a function to modify weapon spread? That's the last hurdle I need to clear before I can do the work myself.
Yes and no. Yes, there are NVSE functions to modify weapon spread. No, not
per weapon- only for the weapon base object. As in, if the player fires a 10mm and you up the spread of the 10mm pistol in response, that will affect
all 10mm pistols, wielded by player and NPC alike.
The only way of doing it per actor is by adding a perk to the player (and other actors, if desired) that alters spread based on some conditions. If you only want it to run on the player, you could have a quest containing a 'playerRecoilLevel' variable and use that. If you want it to run on NPCs too, you'd have to make the perk alter spread based on something like GetFactionRank RecoilFaction, and use AddToFaction RecoilFaction to set the level.