Voberon Posted January 8, 2019 Share Posted January 8, 2019 Hi guys. I want to create a custom skill, that would work like a vanilla one (like you hit with 1handed - you gain xp for 1handed), but cant find any tutorials on how to bind certain actions to gaining xp. Also, the plan is not to use perk system, but rather use constant magic effect, that would allow this. Via a script or something. I would appreciate any advice. Or maybe someone knows a mod with similar feature. Link to comment Share on other sites More sharing options...
Rizalgar Posted January 10, 2019 Share Posted January 10, 2019 (edited) Fortunately for you, I've been working with a hella lot of this lately. All it involves is a few Global Variables, some custom scripts and you're good to go. Edit - I guess I shouldn't be so vague... Create a global, call it OneHandXP or whatever. Create a script. Call to the global and apply the experience formula. I've been working with custom skill experiences so I'm not sure what the default XP modifier is to look for, but I am sure the Wiki will elt you know. However, your script should look something like this ScriptName SomeExperienceScript Extends Actor ( ? I believe, mine use Object reference but they're handled a different way. Could be quest, can't say.) GlobalVariable Property OneHandXP Auto Event OnHit(on hit stuff, can't remember off the top of my head, Wiki, my friend :P | or however you're wanting to call the experience gain) ;;find way to get damage or however it is you want to level the skill;; (OneHandXP.GetValue().SetValue + modifier) EndEvent Come cross any troubles, or if you want to get more in depth with me on it about how to create it, lemme know Here's a relatively simple script to modify the skill. Create, duplicate or use an original weapon. Add this script to a magic effect, add that to an enchant, then add that to the weapon. Scriptname OneHandMachoMan Extends ActiveMagicEffect GlobalVariable Property OneHandXP Auto Event OnEffectStart(Actor akTarget, Actor akCaster) If akCaster == Game.GetPlayer() Int Damage = Utility.RandomInt(0,10) ;; or however much damage you want to do Int XP = Damage ;; can be multiplied, added to, subtracted from, whatever akTarget.DamageActorValue("Health", Damage) OneHandXP.SetValue(OneHandXP.SetValue() + (Damage)) EndIf EndEvent Edited January 10, 2019 by Rizalgar Link to comment Share on other sites More sharing options...
Voberon Posted January 11, 2019 Author Share Posted January 11, 2019 Thanks a lot! Need to experiment a little with this, but now i know where to begin. Link to comment Share on other sites More sharing options...
Recommended Posts