Page 1 of 1
A question about skill gain formulas.
Posted: Mon Jan 05, 2009 10:26 am
by Hoots
Well first off i can understand if the Devs/Admins do not want to answer this question.... but ill ask it anyway.
How are skills gained in UO? Is that a general enough question?
Ok, so in the wonderful experience of getting a tamer to 92.0 i have seen some crazy things with skill gain and it has made me wonder what type of formulas are being used.
I would guess it is one of 2 things.
1. Cumulative Gains - at a certain level (say 90) you need a certain amount of successful uses of a skill to gain a .1, when you complete the required amount you gain your point and reset your "skill counter"
2. Percentage Gains - at a certain skill level (say 90) you have a X% chance of gaining skill on any successful use. So in theory you could increase 3-4-5 times in a row with a success but also in theory you could go thousands without a gain.
I would guess it is more like the 2nd as OSI introduced a guaranteed gains system (which i think would help people with bad dice rolls in a percentage gains system). Also while taming i noticed things like this in the upper 80's - lower 90's... Tame 10 or more giant toads including some pretames, countless great harts and multiple frenzied ossys and receive no gains then return to del and get .2 off a fresh (non-pretamed) bull.
Or is it something much more complex ?
So i dont know if devs want to answer this or if it is something they prefer remain a mystery but i would be interested in knowing how the system works.
Thanks
Happy New Year!
Re: A question about skill gain formulas.
Posted: Mon Jan 05, 2009 10:42 am
by Faust
I'm not quite sure how it works on here exactly or how different, but I'm sure it's somewhat the same as the RunUO default structure when cutting out all the advanced or new stuff that was added to the OSI code.
It simply comes down to a random percentile. If your gain percentage is greater than the random percentage that is generated. It doesn't matter if you succeed or fail at the skill. If a skill is difficulty based that will weigh in the decision as well. Guarenteed gain system wasn't added until after UOR so that plays no role towards the skill gain here.
Re: A question about skill gain formulas.
Posted: Mon Jan 05, 2009 10:56 am
by Hoots
Faust wrote:I'm not quite sure how it works on here exactly or how different, but I'm sure it's somewhat the same as the RunUO default structure when cutting out all the advanced or new stuff that was added to the OSI code.
It simply comes down to a random percentile. If your gain percentage is greater than the random percentage that is generated. It doesn't matter if you succeed or fail at the skill. If a skill is difficulty based that will weigh in the decision as well. Guarenteed gain system wasn't added until after UOR so that plays no role towards the skill gain here.
Yeah, i know GGS was way later but such a system would suggest it isnt a cumlative gains system.
Can you explain this a little more?
If your gain percentage is greater than the random percentage that is generated
What is your gain percentage?
Perhaps using casting a FS at 90 magery as an example? Even if you dont know real numbers (percentages) use some made up numbers for example.
Thanks.
Re: A question about skill gain formulas.
Posted: Mon Jan 05, 2009 11:17 am
by Faust
The formula that is generated in RunUO is somewhat complex. I would show a real example if I was able to access it, but unfortunately I am at work right now and am unable to get you it. I will try showing an example made up out of no where though. I will use something like poisoning for an example.
Greater Poison - 55.0 + 50.0 = 105.0
Deadly Poison - 90.0 + 50.0 = 140.0
Here is the minimum and maximum numbers that you can possibly gain on this skill. Typicall from what I've seen most skills use a 50.0 range added to their minimum values for the maximum value. The higher and closer you get to the maximum value the harder it becomes to gain at that skill. The code for the skill gain is complex and takes all this into account.
I'm going to make up a generic formula to process for a possible skill gain. Let's say we use this formula ( Maximum Skill - Poisoning Skill ) / 100 = Gain Percentage. Now this is not how it works entirely but it is a mere example of how the process functions. All percentages are based on a double value in code. This means the value is a decimal point, which is theoretically a percentage at all times.
Now lets say we were using a Greater Poison potion for this at 55 and 90 poisoning in two examples.
Example 1: 55.0 Skill
( 105 - 55 ) / 100 = 0.5
Example 2: 90.0 Skill
( 105 - 90 ) / 100 = 0.15
Okay, here are the two examples. If these values were passed through the skill gain code all it simply does is generated a random double in between 0.0 and 1.0 for the value it checks for against a gain.
How about we say a random double of 0.35 was generated.
Now the skill gain code would ask if the skill gain value is greater than the random double value of 0.35 that was generated. This would mean that 0.5 is greater than 0.35 and would generate a skill gain, but in the case of 0.15 it would not.
This is essentially how the code works, but skill gain value is MUCH more lower in reality and the code is significantly more complex than this.
Re: A question about skill gain formulas.
Posted: Mon Jan 05, 2009 11:32 am
by Hoots
Great Info, thanks Faust!
Re: A question about skill gain formulas.
Posted: Mon Jan 05, 2009 2:18 pm
by Derrick
To add to this, if you are within the gain range for a skill, e.e., you have > 0% chance of succeeding and < 100% change of success, there is also a minimum chance to gain, so you will never end up with a 0.00005% chance of gaining a skill. If not for this "minimum chance" if would be virtually impossible to gain from 99.9 to 100 on a skill like cooking where the success chance is a straight %, i.e. min=0 max=100