LostTruth64 Posted September 16, 2016 Posted September 16, 2016 Currently trying to make my current mod, Unarmed Combat Patch for SPERG a standalone and even expand on it. Im using the Override Pickpocket.esp provided by the mod so that it wouldnt conflict with other skilltree mods/overhauls. For reference: http://www.nexusmods...im/mods/66336/? The only issue I am coming across is figuring out how SPERG made unarmed attacks scale and level up Pickpocket. I've looked for scripts and found UnarmedManager and its also has a Magiceffect and Spell. I've been trying to decipher what the hell all of these means as I have almost no knowledge of scripting. So I essentially took out the pieces I think I dont need. This is what I have so far. float Property SkillMult = 0.4 Auto float Property SkillMultHC = 0.2 Auto bool CheckForUnarmed = false int currentBonus = 0 Weapon UnarmedWeapon Function OnSkillUp(string eventName, string strArg, float numArg, Form sender) If strArg == "Pickpocket" ManageBuffs() EndIf EndFunction Function UpdateUnarmed(string eventName, string strArg, float numArg, Form sender) If strArg == "FullReset" RemoveUnarmed() RegisterForSingleUpdate(0) Else ManageBuffs() EndIf EndFunction Function ResetUnarmed(string eventName, string strArg, float numArg, Form sender) EndFunction Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference) If akBaseObject as Weapon || akBaseObject as Armor RegisterForSingleUpdate(0) EndIf EndEvent Event OnObjectUnequipped(Form akBaseObject, ObjectReference akReference) If akBaseObject as Weapon || akBaseObject as Spell CheckForUnarmed = true RegisterForSingleUpdate(0) ElseIf akBaseObject as Armor RegisterForSingleUpdate(0) EndIf EndEvent Event OnPlayerLoadGame() CheckForUnarmed = true RegisterForSingleUpdate(0) EndEvent Event OnMagicEffectApply(ObjectReference akCaster, MagicEffect akEffect) If akEffect.HasKeyword(MagicAlchFortifyPickpocket) || akEffect.HasKeyword(MagicEnchFortifyPickpocket) ManageBuffs() EndIf EndEvent Function ManageBuffs() If SPEUnarmedDamage.GetValue() == 1 ;player wants buffs float CalculatedBonus = PlayerRef.GetAV("Pickpocket") CalculatedBonus *= SkillMultHC EndIf CalculatedBonus *= ((PlayerRef.GetAV("PickpocketMod") / 100) + 1) ;enchantment bonus CalculatedBonus *= ((PlayerRef.GetAV("PickpocketPowerMod") / 100) + 1) ;alchemy bonus int bonus = CalculatedBonus as int ;quick way to truncate EndFunctionI have essentially everything else finished in terms of skills, mechanics, and balancing. This is my biggest hurdle right now.
Recommended Posts