Enchantment that scale with the players level

Post » Tue Jan 21, 2014 12:33 am

I started to make mods quite a while ago, however they were mostly value changing for personal use. I made a new race, some new spells and turned a daedric mace into a magic rod. None of these things were especially complicated and they didn't involve any scripts. Recently I started working with scripts in the school, so I decided to try it in the Creation Kit.

The problem is pretty simple, I want to make an enchantment that scales with the players level in a skill, namely two handed. The first problem that I found is that there are no scripts that directly change the magnitude of an effect in proportion to something. After some research I found out that it was not possible to change it in a direct way like this. I've thought about using the "SetEnchantment" script (added in SKSE) in combination with using 101 different enchantments from 0-100 in magnitude. The script would (theoretically) consist of a "if" statement and loads of "elsif", one for each level of the skill and one for each enchantment. The script is probably wrong (it has to be, considering that i started with papyrus yesterday) but I hope someone gets the idea.

Spoiler
iftwohanded == 0{Weaponproperty.SetEnchantment ScalingEnchLvL0}elseif twohanded == 1{WeaponProperty.SetEnchantment ScalingEnchLvL1}

etc. etc. until lvl 100

Is using a clumsy script like this possible for an efficient mod or do I have to use a quest script to detect when the level changes and thus get the enchantment change when the skill changes.

I would appreciate any tips on how to solve the problem, the best would be a complete solution with an explanation on why it is best to do it that way.

User avatar
Claire
 
Posts: 3329
Joined: Tue Oct 24, 2006 4:01 pm

Post » Tue Jan 21, 2014 11:30 am

SKSE has SetNthEffectMagnitude, so you could use a script to set the magnitdue.

You might need a maintenance quest as i don't know whether this would persist through seperate playing sessions. You would then also need a quest (started via story manager) to update the new magnitude.

I was going to suggest using a perk to scale however a quick test using One-handed or Two Handed skill as the scaling factor didn't seem to work, and caused the CK to generate an error when accessing the newly created perk.

User avatar
JD bernal
 
Posts: 3450
Joined: Sun Sep 02, 2007 8:10 am


Return to V - Skyrim