ID:170342
 
Mainly I am only worried about swimming, but how about:
Hiding
Stealing
Cooking
Mining
Etc.

And then make it to where whatever level you're on for that particular skill will affect your efficiency and energy needed to do it.
And what do you need help with c.c''
In response to Chwgt
I think he needs help with the formula.
In response to Thief Jack
Thief jack wrote:
I think he needs help with the formula.

_>
I think he just needs to use DMs subtraction feature by the looks of what he's [pick("trying to do","doing")].
In response to Thief Jack
How are we suppose to know? He only showed a list of stuff, he didn't say "I can't get this this and that to work, blah bah blah", so we don't know what he need's help with on the Developer "How-To"

~Chris
In response to Chwgt
Exactly. "HOW TO"
Obviously I need to know how to do something.
In response to Jamesburrow
Be more specific.
In response to Jamesburrow
Yet as I stated earlier, you haven't stated what.
In response to Chwgt
I need to figure out how to make it to where depending on the person's level in that skill will determine the success rate and the amount of energy it requires.
In response to Jamesburrow
Perhaps try this.
mob
proc
Mining(successrate=5)
if(prob(successrate))
src << "You managed to mine something."
src.mining++
src.stamina -= round(src.mining/2)
else
src << "You failed to mine."
src.stamina -= round(src.mining/2)
In response to Jamesburrow
It "could" and I emphasize on could, use alot of if's like
if(usr.mlvl == 10)
usr.mspeed += 3

But that I know wouldn't work unless you made there lag pretty bad and just increased the speed in say like above m = mining, mining speed += .2 blah, I don't know about that I am just guessing, but if I can get ahold of my friend Gunbuddy13 I can get him to teach me and I will pass it along.
In response to Thief Jack
His would most likely work =P
In response to Thief Jack
The higher your mining experience, the more energy you use? Shouldn't it be the opposite?
In response to Crashed
I'm not tell him that's the way it should be. I'm just giving him a starting point.
You need to know a lot of math to get a good/perfect, or near perfect accuracy formulas for any type of game.

//This is just an example, won't compile succesfully

var/mob/M = usr //let M be the user

var/chance = round(M.mining/100) //This is basically the mining level divided by 100

//if the mining level is 50, 50/100 = 50% chance
//if the mining level is 74, 74/100 = 74% chance

//if you want to make like uncapped max levels, then you will need to do some adjustments and fancy math.

var/chance = round((((M.mining**2.05)/(100**2.10))-100)*1.25) //just some example, just try to use some numbers and math functions till you find a perfect one. This one will probably not work, (untested)
In response to Crashed
Data progression is a big area of study for comp scientists. But luckily, the stamina issue is relatively easy. Since you have a max value on your skills(100), you can just use a linear progression (a fancy way of saying a straight line).

For a nice even progression, (where each skill upgrade is one less stamina) you can use:

stamina -= 100-(skill)

Which probably seems obvious, but from it you can do a lot of cool things. If you remember algebra, you may recall:
y=mx+b

where x is skill and y is the final stamina cost. Now the math gets hairy, so don't hold your breath. Since we want y to be less the greater x is, you use an negative m(known as the slope). Since we know x will be positive, we can rearrange the equation to allow a positive m:
y=b-mx

Now you can choose any positive number you want for m. Unfortunately, our b changes depending on the m we choose since we want 100 to be our max skill. So we have to develop a formula for b, which if we use the easiest formula(the first one) can be easy to calculate. It comes to
b=100*m

You can actually fit this into the formula too, forming our final formula:
stamina -= (100*m) - (m*skill)

Hope someone understood that rambling and gained something from it.
In response to Neo Skye
Thank god I just went over linear equations last week. Never before did I think that would be used in real life...
Well, I understood, so your typing wasn't in vain.