cumbrianlad Posted January 16, 2019 Share Posted January 16, 2019 Hi. Simply put, how do you add an ability to the player that's active when an item is worn? Specifically I want to increase enchanting skill. To give you an idea of where I am with this, here's my incomplete understanding of the process. (incomplete because it doesn't work!) Background: Initially I wanted to up the skill boost a bit on Ahzidal's Genius enchanting skill boost. Now I'd like to add a set of unique jewelry to the game, each piece of which adds an enchanting skill boost when worn. Either way I need to understand the process of adding an ability to an item when equipped. Here's where I'm at... 1. make a magic effect. Give it an ID and nameArchetype: peak value modifierCasting type: constant effectDelivery: selfGive it a base costMenu display object: magic hat markerPower affects: magnitudeAdd a description: ability increases enchanting skill by <mag> points. 2. make the item I'm making unique named jewellery. I know that process and don't think I need to do anything except in my case to add the keyword 'MagicDisallowEnchanting' 3. make the ability Give it an ID and nameType: abilityAdd the magic effect aboveEdit the added effect and give it a magnitude (10 for example)Whilst editing the effect add a condition: isequipped, myunique jewellery item == 1.00Repeat this last step for each of my other unique items. And that's all I did. what am I missing out/doing wrong? Thanks to anyone who can help with this.Edit the effect and give it the chosen magnitude Link to comment Share on other sites More sharing options...
SeraphimKensai Posted January 16, 2019 Share Posted January 16, 2019 I would suggest adding a perk with the effect, and in the hidden perk you have your buff to enchanting. Otherwise, you could have the effect fire a script, that checks if the jewelry is equipped and if so then runs a modactorvalue command on the character to modify the enchanting skill. Link to comment Share on other sites More sharing options...
Rizalgar Posted January 16, 2019 Share Posted January 16, 2019 (edited) TL;DR Could try this instead. Make a script, extends Actor, attach said script to what you're trying to do this with. Use this script Script ScriptName Extends Actor Event OnEquipped(Actor akActor) Player.ModAV("Skill to modify", x) EndEvent Event OnUnequip(Actor akActor) Player.ModAV("Skill to modify", -x) EndEvent /// X representing the number to modify it by Skill to Modify of course representing which skill to modify Edited January 16, 2019 by Rizalgar Link to comment Share on other sites More sharing options...
cumbrianlad Posted January 17, 2019 Author Share Posted January 17, 2019 Thanks for the replies. That seems like a plan. it's a lot easier than my way, anyway. I was just trying to do it that way because it was how the devs did Ahzidal's genius, though I've obviously missed something. I guess they did it that way since they wanted to check that 4 pieces of armour/jewellery were equipped and a script on each item would then be quite messy. I appreciate the effort you put into your replies. Cheers for the script, Rizalgar. I could also add a couple of properties to it 'SkillToModify' and 'AmountToModify' to make the script more generally useful. That fits with my idea of ring, necklace and circlet because I wanted to increase the skill by different amounts for each piece. I'd thought 5, 10 and 15, making a total possible skill increase of 30. That way if I find this useful enough to publish, the player will have more control over how much of a boost they liked. I could even make the pieces only available at certain levels so that enchanting didn't get too good too quickly. Thanks again folks! Link to comment Share on other sites More sharing options...
Rizalgar Posted January 17, 2019 Share Posted January 17, 2019 (edited) Well, if that's what you're going for, a set bonus kind of thing, you could use this instead Scriptname SkillSetIncrease extends Actor Event OnEquipped(Actor akActor) If game.getplayer().isequipped(item1) && game.getplayer().isequipped(item2) && so on and so forth Game.GetPlayer.ModAV(skill, x) Else Debug.Notification("You lack all the required items to get the bonus") or something to that effect EndIf EndEvent Event OnUnequip(Actor akActor) Game.GetPlayer().ModAV(skill, - x) EndEvent Or something like this ScriptName SkillSetScript extends Actor Event OnEquipped(Actor akActor) If Game.GetPlayer().Isequipped(item 1) && Game.GetPlayer().IsEquipped(item 2) && Game.GetPlayer().IsEquipped(item 3) Game.GetPlayer().ModAV(skill, 15) ElseIf Game.GetPlayer().IsEquipped(item 1) && Game.GetPlayer().IsEquipped(item 2) Game.GetPlayer().ModAV(skill, 10) ElseIf Game.GetPlayer().IsEquipped(item 1) Game.GetPlayer().ModAV(skill, 5) EndEvent Event OnUnequip(Actor akActor) ;do the reverse of the above event EndEvent Edited January 17, 2019 by Rizalgar Link to comment Share on other sites More sharing options...
cumbrianlad Posted January 17, 2019 Author Share Posted January 17, 2019 Thanks again for that Rizalgar. It wasn't a set bonus I was after but I daresay I'll want a script similar to those you suggested sometime! I got it to work quite nicely with the simpler version you suggested above, but with the addition of properties so that I could use the same script for each item. That way the player can get an enchanting boost from 5 to 30 in steps of five depending which items they equip. (assuming they have all 3 to play with) I'll try it out in game to see if I think the jewellery is overpowered or underpowered and tinker with the values of the properties if necessary. After that I'll probably add a quest or a merchant and maybe add a book to find that allows the items to be crafted. Thanks again. Not many people sit down and write scripts to offer for advice... very much appreciated. Link to comment Share on other sites More sharing options...
Rizalgar Posted January 18, 2019 Share Posted January 18, 2019 No problem buddy. What the forums are for, right? Link to comment Share on other sites More sharing options...
Recommended Posts