to: Someone who's good at math
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
to: Someone who's good at math
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
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
Honk if you love Jesus, text if you want to meet Him!
to: Someone who's good at math
That one is super easy: (value / 100) * z.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).
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
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
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
nice
Archived topic from AOV, old topic ID:755, old post ID:4614
Archived topic from AOV, old topic ID:755, old post ID:4614
What?
to: Someone who's good at math
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
x =-b± ______
Öb2-4ac
2a
Nuf said....
Archived topic from AOV, old topic ID:755, old post ID:4617
If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.
to: Someone who's good at math
*is lost*
Archived topic from AOV, old topic ID:755, old post ID:4618
Archived topic from AOV, old topic ID:755, old post ID:4618
What?
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
to: Someone who's good at math
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
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
Honk if you love Jesus, text if you want to meet Him!
- Gaiava Arkkaza
- Posts: 834
- Joined: Tue Dec 12, 2006 10:19 pm
to: Someone who's good at math
lol Those are times where I wish my math teacher was here.
Archived topic from AOV, old topic ID:755, old post ID:4635
Archived topic from AOV, old topic ID:755, old post ID:4635
Brunus
to: Someone who's good at math
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
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
If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.
to: Someone who's good at math
Well, I assumed the graph would be used as a modifier with a randomizer function...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! )
Archived topic from AOV, old topic ID:755, old post ID:4690
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
to: Someone who's good at math
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
Archived topic from AOV, old topic ID:755, old post ID:4691
Honk if you love Jesus, text if you want to meet Him!
- DOCTOR THUNDER
- Posts: 1611
- Joined: Sat Jan 06, 2007 8:34 am
to: Someone who's good at math
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
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
The polite PK.
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
to: Someone who's good at math
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
if(player.Serial == 0x0032F)coolnessfactor+=10;
Archived topic from AOV, old topic ID:755, old post ID:4694
Honk if you love Jesus, text if you want to meet Him!
to: Someone who's good at math
Your formulas are a little off
Archived topic from AOV, old topic ID:755, old post ID:4699
Archived topic from AOV, old topic ID:755, old post ID:4699
What?
to: Someone who's good at math
Correction: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.
Loot= (cool factor + murder count)(account age[faction points+forum posts])
=P
Archived topic from AOV, old topic ID:755, old post ID:4709
If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.
to: Someone who's good at math
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
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
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
to: Someone who's good at math
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
Archived topic from AOV, old topic ID:755, old post ID:4750
Honk if you love Jesus, text if you want to meet Him!
to: Someone who's good at math
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
Archived topic from AOV, old topic ID:755, old post ID:4755
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
to: Someone who's good at math
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
Archived topic from AOV, old topic ID:755, old post ID:4756
Honk if you love Jesus, text if you want to meet Him!
- DOCTOR THUNDER
- Posts: 1611
- Joined: Sat Jan 06, 2007 8:34 am
to: Someone who's good at math
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
Archived topic from AOV, old topic ID:755, old post ID:4757
The polite PK.
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
to: Someone who's good at math
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
Archived topic from AOV, old topic ID:755, old post ID:4758
Honk if you love Jesus, text if you want to meet Him!
to: Someone who's good at math
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
Talismans, the source of evil.
Archived topic from AOV, old topic ID:755, old post ID:4759
┬hẸ ςhadoШlordς ╒ac┬ion
Vai missä se oli?
Vai missä se oli?
- Red Squirrel
- Posts: 29209
- Joined: Wed Dec 18, 2002 12:14 am
- Location: Northern Ontario
- Contact:
to: Someone who's good at math
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
Archived topic from AOV, old topic ID:755, old post ID:4760
Honk if you love Jesus, text if you want to meet Him!