Jump to content

Enchanting/charges formula change


amborgeson

Recommended Posts

As most of us are aware, the # of charges on a weapon is effected by this formula while enchanting:

 

skill cost multiplier = (1 - skill/200) / (1 + sqrt(skill/200))

 

Which is a disaster at 200 (divide by zero) and above 200 (negative numbers, and absolute value of multiplier actually starts increasing)

 

while it's possible to hit/break an effective skill of 200 in vanilla, Uncapper also has to cope with this, limiting max enchanting skill effect for # of charges at 199 to prevent this from breaking. SO I'm wondering if it's possible to create a 'simple' mod to deal with this?

 

'simple' meaning the specific change is small. I suspect it's less than 'simple' in what needs to be done to implement that single change.

 

However, I have done a little bit of research into this, and have some alternative formulas:

 

y= (e-x/200)/(1+sqrt(x/200))

 

multiplier = e(Log(1/2)*Skill/50)

 

 

and finally, this monster:

 

y = 1/(e(x/200)*((x/200)(1/2) + 1)*(e((3*x)/100 - 9/2) + 1))

 

which models closely to the original formula until past skill 150

 

 

So now i need some one who has the modding skills to figure out how to insert/replace this formula in skyrim. Any takers?

 

 

Link to comment
Share on other sites

This function would be hardcoded into the game and would be difficult, if not impossible, to alter. It's not as simple as changing the formula, because nobody has access to the game's code nor the ability to change it. Just thought I'd throw in that your formulas seem a bit excessive. Not sure what you are trying to achieve, but you could easily make a function that is similar but has an asymptote at y=0. Something like (came up with this on the spot as an example, it would obviously need some refinement):

2^(-x/50)

 

EDIT:

Nevermind, now that I graph it y= (e-x/200)/(1+sqrt(x/200)) looks pretty good.

Edited by DragonDude1029
Link to comment
Share on other sites

Hmmm, would it be possible to intercept the original calculation and overwrite it's returned value?

 

what I mean is, when you enchant something, a calculation is run and a final charge value is assigned to the weapon.

 

would it be possible to let all the vanilla stuff run, have the mod scripts run their own calculation, and simply block of overwrite the returned value from the vanilla game and place the value returned from the mod on the weapon?

 

It seems this would involve more math (Final value of charges, not just the skill based multiplier) but might be easier to implement?

Link to comment
Share on other sites

Another idea would be to ignore the calculations completely, and when ever a weapon is enchanted, replaces the charges with an amount strictly based off the gem you used (ie, a grand/dark soul gem will always give you 100 charges/uses on a weapon, no matter the enchantment. )

Link to comment
Share on other sites

  • 4 weeks later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...