I'm trying to add some functionality to a mod I created that gives you a bounty in all holds when equipped, and removes it when the item is unequipped. I don't know where to begin, can anybody help me with a starting point?
I'm trying to add some functionality to a mod I created that gives you a bounty in all holds when equipped, and removes it when the item is unequipped. I don't know where to begin, can anybody help me with a starting point?
Indeed. I've done a similar thing. I'm assuming you've got a basic knowledge of scripting. Put this script on your item:
Scriptname BountyScript Extends Weapon; or ammo, or armor, or whatever it should extendFaction[] Property CrimeFactions Auto ;fill this array with all of the factions in Skyrim, I believe they all start with CrimeFactionActor Property PlayerREF Auto ;autofill this propertyInt iIndexEvent OnEquipped(Actor akActor) If akActor == PlayerREF iIndex = CrimeFactions.Length While iIndex CrimeFactions[iIndex].ModCrimeGold(100); change 100 to what you want the bounty to be, add a true if you want it to be a violent crime iIndex -= 1 EndWhile EndIfEndEventEvent OnUnequipped(Actor akActor) If akActor == PlayerREF iIndex = CrimeFactions.Length While iIndex CrimeFactions[iIndex].ModCrimeGold(-100); replace 100 with the number you used a bove EndWhile EndIfEndEvent
If you want to set the crime gold in all factions to 0 after unequipping, change ModCrimeGold to SetCrimeGold(0). Be sure to fill the array property.