Page 1 of 1
to: Someone who's good at math
Posted: Sun Jun 03, 2007 7:58 pm
by Red Squirrel
Ok I will be redesigning the loot system, at least, the part that generates the properties.
So I need to figure out some formulas, and I suck at math. So here's what I need.
A formula that returns a number from 1 to 100, and when given the value x, the chance of a higher number is higher. So for example, if x is 0, the chance of getting 1-10 is much higher, while if x is 1500 the chance of 90-100 is much higher (but can still get 1).
Basically, y is the loot intensity, and x is the luck.
Then I need another formula to take a value from 1 to 100 and turn it into a value from 1 to z, so if z is 15, 50 would translate to 7 (rounded).
So if anyone could post that, thanks!
Archived topic from AOV, old topic ID:755, old post ID:4590
to: Someone who's good at math
Posted: Sun Jun 03, 2007 11:18 pm
by dprantl
Red Squirrel wrote:Then I need another formula to take a value from 1 to 100 and turn it into a value from 1 to z, so if z is 15, 50 would translate to 7 (rounded).
That one is super easy: (value / 100) * z.
I'm still thinking about the first one...
Archived topic from AOV, old topic ID:755, old post ID:4599
to: Someone who's good at math
Posted: Mon Jun 04, 2007 1:05 am
by dprantl
Ok, so it really depends on what you want your graph shape to look like. Assuming the luck cap is 1500, if you want the luck chance to be completely linear, then:
y = x / 15
To have a really sharp increase and make luck mutually degressive (from 0 - 200 luck gives a larger bump than from 1200 - 1400), then you can have something like this:
y = log(x^13.67)
That one above is *really* sharp. Maybe a compromise would be:
y = sqrt(x * 6.67)
With this last one, 200 luck gives a ~36% boost, 750 luck gives a ~70% boost, 1000 luck gives an 82% boost, and 1300 luck gives a ~93% boost.
Archived topic from AOV, old topic ID:755, old post ID:4607
to: Someone who's good at math
Posted: Mon Jun 04, 2007 9:34 am
by Nosferatu
nice
Archived topic from AOV, old topic ID:755, old post ID:4614
to: Someone who's good at math
Posted: Mon Jun 04, 2007 10:53 am
by Lymus
slope m =Dy Dx=y2-y1 x2-x1=rise run
x =-b± ______
Öb2-4ac
2a
Nuf said....
Archived topic from AOV, old topic ID:755, old post ID:4617
to: Someone who's good at math
Posted: Mon Jun 04, 2007 10:54 am
by Nosferatu
*is lost*
Archived topic from AOV, old topic ID:755, old post ID:4618
to: Someone who's good at math
Posted: Mon Jun 04, 2007 1:14 pm
by Red Squirrel
Oh and I forgot to mention this is something that has to work programaticly using a random function I'll just call it Rand() here for simplicity. Rand(b+1) returns a number between 0 and b. That would be 0 to 15 for HCI for example, and at high luck it needs to have a better chance of hitting the 15, but still have a chance to hit 1.
I might just do it in steps too, like for each 100 points of luck, a loop runs, and the highest number gets picked. or something. Theres also a random for the loot bonus to happen in first place, I think.
Archived topic from AOV, old topic ID:755, old post ID:4625
to: Someone who's good at math
Posted: Mon Jun 04, 2007 1:39 pm
by Gaiava Arkkaza
lol Those are times where I wish my math teacher was here.
Archived topic from AOV, old topic ID:755, old post ID:4635
to: Someone who's good at math
Posted: Mon Jun 04, 2007 9:21 pm
by Lymus
Sorry I missed the fun. Your first question doesn't make any sense . If x is 0, you get 0 in your "answer", which directly conflicts with one of the conditions you gave in the original question.
I mean... there's no "chance" of returning different numbers (unless you taught C a special square root where it will return 50/50 chance of the positive or negative root!
)
Archived topic from AOV, old topic ID:755, old post ID:4683
to: Someone who's good at math
Posted: Tue Jun 05, 2007 12:03 am
by dprantl
Lymus wrote:Sorry I missed the fun. Your first question doesn't make any sense . If x is 0, you get 0 in your "answer", which directly conflicts with one of the conditions you gave in the original question.
I mean... there's no "chance" of returning different numbers (unless you taught C a special square root where it will return 50/50 chance of the positive or negative root!
)
Well, I assumed the graph would be used as a modifier with a randomizer function...
Archived topic from AOV, old topic ID:755, old post ID:4690
to: Someone who's good at math
Posted: Tue Jun 05, 2007 12:31 am
by Red Squirrel
yeah come to think of it don't think the random part can be done fully mathematicly. I'll come up with something for that.
Archived topic from AOV, old topic ID:755, old post ID:4691
to: Someone who's good at math
Posted: Tue Jun 05, 2007 12:36 am
by DOCTOR THUNDER
I worked really hard on this formula:
Loot = (cool factor + murder count)account age/[-1(forum posts)]
Cool Factor:
Thunder = 1000
Eby = 500
Red = Pi/-1 (he created the server)
Hector = 499
Brunus = 100
Nosferatu = .001
anyone else pick a number between 1 and 10, that will be your cool factor.
Archived topic from AOV, old topic ID:755, old post ID:4692
to: Someone who's good at math
Posted: Tue Jun 05, 2007 12:49 am
by Red Squirrel
Hmm I could add some char serial # checks in there
if(player.Serial == 0x0032F)coolnessfactor+=10;
Archived topic from AOV, old topic ID:755, old post ID:4694
to: Someone who's good at math
Posted: Tue Jun 05, 2007 9:08 am
by Nosferatu
Your formulas are a little off
Archived topic from AOV, old topic ID:755, old post ID:4699
to: Someone who's good at math
Posted: Tue Jun 05, 2007 12:52 pm
by Lymus
DOCTOR THUNDER wrote:I worked really hard on this formula:
Loot = (cool factor + murder count)account age/[-1(forum posts)]
Cool Factor:
Thunder = 1000
Eby = 500
Red = Pi/-1 (he created the server)
Hector = 499
Brunus = 100
Nosferatu = .001
anyone else pick a number between 1 and 10, that will be your cool factor.
Correction:
Loot= (cool factor + murder count)(account age[faction points+forum posts])
=P
Archived topic from AOV, old topic ID:755, old post ID:4709
to: Someone who's good at math
Posted: Tue Jun 05, 2007 3:44 pm
by dprantl
Ok back to being serious, I have some additional ideas now that you mentioned how the randomizer works. You could make a function that calls rand a certain number of times, then picks the highest value. The number of runs would be dependent on the value returned from my graph above which is based on luck. So:
randRunNum = Math.Round( (Math.Sqrt( luck * 6.67 ) ) / 10 );
So the maximum number of times rand could run is 10, and minimum would of course be 1. I just made 10 up, so some testing could be done to come up with a different max iteration number. The higher the number, the better your chances of getting a higher intensity value.
Archived topic from AOV, old topic ID:755, old post ID:4743
to: Someone who's good at math
Posted: Tue Jun 05, 2007 5:51 pm
by Red Squirrel
The more I look at the loot code, the more I realize I should just leave it alone.
Problem is, its tied in to so many things, if I change any of it, I have to change tons of other stuff too. So I'll just try to improve the current code values instead to force it to give better overall loot.
Archived topic from AOV, old topic ID:755, old post ID:4750
to: Someone who's good at math
Posted: Tue Jun 05, 2007 6:48 pm
by dprantl
Isn't it the case that luck only affects monster loot? If so, then you could just modify that part, leaving the rest alone.
Archived topic from AOV, old topic ID:755, old post ID:4755
to: Someone who's good at math
Posted: Tue Jun 05, 2007 6:59 pm
by Red Squirrel
Actually, it looks like loot gets generated BEFORE the monster dies... I don't understand why this is, but I'm rather shocked. The luck is checked... but the luck of who?! Its not dead yet. I'm experimenting with stuff atm, and I was messing with numbers, might be able to fix the existing code.
Archived topic from AOV, old topic ID:755, old post ID:4756
to: Someone who's good at math
Posted: Tue Jun 05, 2007 7:05 pm
by DOCTOR THUNDER
from how I understood it, there was different loot groups. higher luck bumps the loot up to the next group
Archived topic from AOV, old topic ID:755, old post ID:4757
to: Someone who's good at math
Posted: Tue Jun 05, 2007 7:07 pm
by Red Squirrel
yeah theres superboss and such, I bumped those numbers up, you can specify things like min max, and chance of that item dropping etc. most were already reasonable. I made a custom one and applied it to a custom mob, and none of the stuff is even dropping, so something is messed up somewhere else.
Archived topic from AOV, old topic ID:755, old post ID:4758
to: Someone who's good at math
Posted: Tue Jun 05, 2007 7:27 pm
by Finlander
i bet its related to talismans again, like 99% if the issues.
Talismans, the source of evil.
Archived topic from AOV, old topic ID:755, old post ID:4759
to: Someone who's good at math
Posted: Tue Jun 05, 2007 7:35 pm
by Red Squirrel
nah talismans have nothing to do with it. They actually have their own random property generator built in, and its 100 times better then the loot one because of its simplicity.
Archived topic from AOV, old topic ID:755, old post ID:4760