vmangos / core

Progressive Vanilla Core aimed at all versions from 1.2 to 1.12
GNU General Public License v2.0
690 stars 491 forks source link

Not quite a bug so much as a design error... #1753

Closed wdstudios2 closed 11 months ago

wdstudios2 commented 1 year ago

On Blizzard servers, a particular recipe's chances of giving you a skillup slowly slide from 100% to 0%, with all values between 50% and 100% being yellow and all values between 50% and 0.00001% being green. For example, with a First Aid skill of 30, Linen Bandage has (I believe) a 100% of giving a skillup; this drops to:

96.67% at level 31 93.33% at 32 90% at 33 86.67% at 34 83.33% at 35 80% at 36 70% at 39 60% at 42 50% at 45 40% at 48 30% at 51 20% at 54 10% at 57 6.67% at 58 3.33% at level 59 and finally a 0% chance of a skillup at a First Aid level of 60

In vMangos, yellow is a flat 75% and green is a flat 25%. Are there any plans to correct this?

heyitsbench commented 1 year ago

Is there a source on this?

FlagFlayer commented 1 year ago

The formula describing the chance to gain a skill level, given your current skill level, the level at which the pattern you are using turns "yellow", and the level that it turns "grey", appears to be:

chance = (greySkill - yourSkill) / (greySkill - yellowSkill)

This means that a recipe that has just turned yellow will still be guaranteed to grant a skill point for its next craft (in the above formula, if yourSkill and yellowSkill are the same, the result is 1). It can be observed that the level at which recipes turn green is the point where the chance of a skill-up is 0.5. Thus, yellow recipes have a skill up chance tending from 1 to 0.5 as the recipe approaches green. The number of crafts of a recipe required to get 1 skill-up is geometrically distributed, thus the expected number of crafts is given by 1/chance. This may help in which recipe is the 'cheapest' to use to level up regarding material cost.

From: https://vanilla-wow-archive.fandom.com/wiki/Profession citing this Wowhead comment from 3.0.3. Not sure if this is actually the behaviour in vanilla though, can probably review some vanilla footage to check for it.

FlagFlayer commented 1 year ago

Also please use a more descriptive title like: 🐛 [Bug] Incorrect profession skillup implementation

FlagFlayer commented 1 year ago

Okay I did a quick review from footage from Joana's speedrun:

Skillup 30-32 (2 crafts): At https://youtu.be/FaV6oAteJGI?t=11251 Which we will add to the following Skillups for 32-50 (23 crafts): At https://youtu.be/FaV6oAteJGI?t=12938

Skill Sequence (yellow, 30-40): 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 (12 crafts for 10 skillups) Skill Sequence (green, 40-50): 1 + 1 + 1 + 1 + 1 + 0 + 1 + 0 + 0 + 1 + 1 + 1 + 1 (13 crafts for 10 skillups)

Expected number of crafts according to vmangos implementation (yellow): (1/0.75)*10 = 13.33 -> 14 crafts Expected number of crafts according to 3.0.3 implementation (yellow): 30/30 + 30/29 + 30/28... + 30/21 = 11.92 -> 12 crafts

Expected number of crafts according to vmangos implementation (green): (1/0.25)*10 = 40 -> 40 crafts Expected number of crafts according to 3.0.3 implementation (green): 30/20 + 30/19 + 30/18... + 30/11 = 20.06 -> 21 crafts

Pretty low sample size so far, but the 3.0.3 implementation seems vastly more correct in this sample (either way Joana got lucky with 40-50 though).

EDIT: Also interesting to note that Joana decides to not train Heavy Linen Bandage until skill 50. In vmangos it would be very likely to waste Linen Cloth, but in the 3.0.3 implementation it basically wouldn't matter, with Linen Bandages only being very slightly less efficient than Heavy Linen Bandages (by 0.06 crafts on average).

Skillup 50-60 (10 crafts): At https://youtu.be/FaV6oAteJGI?t=13053 Skill Sequence (yellow, 50-60): 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 (10 crafts for 10 skillups) Same numbers as before for vmangos, predicting 14 crafts. Expected number of crafts according to 3.0.3 implementation (yellow): 50/50 + 50/49 + 50/48... + 50/41 =11.03 -> 12 crafts

Worth noting that though this 12 crafts number is the same as the Linen Bandage result, the lower value (11.03 vs 11.92) does mean that it is more likely to take less crafts than the Linen Bandage is.

wdstudios2 commented 1 year ago

Cooking Brilliant Smallfish and Slitherskin Mackerels (they have the same yellow->gray level range)

https://www.mediafire.com/file/xkpe3m90uhl513e/WowClassic_smallfish.avi/file https://www.mediafire.com/file/qf8k4t8219a5ehw/199_slitherskin_mackerels.avi/file https://www.mediafire.com/file/vm1swz5qxqdd7da/299_slitherskin_mackerels_part_1.avi/file https://www.mediafire.com/file/31603alo8hadx13/299_slitherskin_mackerels_part_2.avi/file https://www.mediafire.com/file/y5pfgoqlg3a7xpj/slitherskin_mackerels_3_part_1.avi/file https://www.mediafire.com/file/wq1n6qe7wy6w4dx/slitherskin_mackerels_3_part_2.avi/file

Smallfish run 1 level 45-50: 5 fish (106-101) level 50-55: 5 fish (101-96) level 55-60: 8 fish (96-88) level 60-65: 11 fish (88-77) level 65-70: 14 fish (77-63) level 70-75: 19 fish (63-44) level 75-80: 27 fish (44-17) level 80+: 17 fish, 1 skillup

Mackerel run 1 level 45-50: 5 fish (155-150) level 50-55: 8 fish (150-142) level 55-60: 8 fish (142-134) level 60-65: 8 fish (134-126) level 65-70: 11 fish (126-115) level 70-75: 28 fish (115-87) level 75-80: 45 fish (87-42) level 80-83: 34 fish (42-8) Level 83+: 8 fish 0 skillups

Mackerel run 2 level 45-50: 5 fish (255-250) level 50-55: 7 fish (250-243) level 55-60: 12 fish (243-231) level 60-65: 6 fish (231-225) level 65-70: 18 fish (225-207) level 70-75: 21 fish (207-186) level 75-80: 45 fish (186-141) level 80-83: 51 fish (141-90) level 83-85: 63 fish (90-27)

Mackerel run 3 level 45-50: 5 fish (255-250) level 50-55: 6 fish (250-244) level 55-60: 6 fish (244-238) level 60-65: 12 fish (238-226) level 65-70: 16 fish (226-210) level 70-75: 37 fish (210-173) level 75-80: 54 fish (173-119) level 80-83: 30 fish (119-89) level 83-85: 41 fish (89-48)

avg data: level 45-50: (5+5+5+5)/4 = 5 fish; 100% skillup rate level 50-55: (5+8+7+6)/4 = 6.5 fish; 5/6.5 = 76.9% skillup rate level 55-60: (8+8+12+6)/4 = 8.5 fish; 5/8.5 = 58.8% skillup rate level 60-65: (11+8+6+12)/4 = 9.25 fish; 5/9.25 = 54.1% skillup rate level 65-70: (14+11+18+16)/4 = 14.75 fish; 5/14.75 = 33.9% skillup rate level 70-75: (19+28+21+37)/4 = 26.25 fish; 5/26.25 = 19.0% skillup rate level 75-80: (27+45+45+54)/4 = 42.75 fish; 5/42.75 = 11.7% skillup rate level 80-83: 10 skillups / (17+34+51+30 = 132) fish = 7.6% skillup rate level 83-85: 4 skillups / (8+63+41 = 112) fish = 3.6% skillup rate

Chart: https://imgur.com/E00fLvQ

Rough Blasting Powder: https://www.mediafire.com/file/ur7w5t5ommj5fof/85_rough_blasting_powder.avi/file https://www.mediafire.com/file/eil2ljq22fyi6pk/115_rough_blasting_powder.avi/file https://www.mediafire.com/file/vx0tu44i29hidu9/rough_blasting_powder_III.avi/file https://www.mediafire.com/file/3aimtnqq9vsq8di/rough_blasting_powder_4.avi/file https://www.mediafire.com/file/b4f7qa3mn4mnnos/rough_blasting_powder_5.avi/file https://www.mediafire.com/file/tit80zh6r38nf99/rough_blasting_powder_6.avi/file

run 1 level 20-25: 5 rough stone (66-61) (100% skillup rate) level 25-30: 5 rough stone (61-56) (100% skillup rate) level 30-35: 11 rough stone (56-45) (45.5% skillup rate) level 35-39: 22 rough stone (45-23) (18.2% skillup rate) final 23 rough stone produced 0 skillups (0% skillup rate)

run 2 level 20-25: 5 rough stone (95-90) (100% skillup rate) level 25-30: 7 rough stone (90-83) (71.4% skillup rate) level 30-35: 9 rough stone (83-74) (55.6% skillup rate) level 35-39: 8 rough stone (74-66) (50% skillup rate) level 39-40: 17 rough stone (66-49) (5.9% skillup rate)

run 3 level 20-25: 7 rough stone (96-89) (71.4% skillup rate) level 25-30: 8 rough stone (89-81) (62.5% skillup rate) level 30-35: 17 rough stone (81-64) (29.4% skillup rate) level 35-39: 31 rough stone (64-33) (12.9% skillup rate) level 39-40: 17 rough stone (33-16) (5.9% skillup rate)

run 4 level 20-25: 5 rough stone (265-260) level 25-30: 5 rough stone (260-255) level 30-35: 12 rough stone (255-243) level 35-39: 31 rough stone (243-212) level 39-40: 4 rough stone (212-208)

run 5 level 20-25: 5 rough stone (207-202) level 25-30: 11 rough stone (202-191) level 30-35: 18 rough stone (191-173) level 35-39: 44 rough stone (173-129) level 39-40: 24 rough stone (129-105)

run 6 level 20-25: 5 rough stone (104-99) level 25-30: 7 rough stone (99-92) level 30-35: 7 rough stone (92-85) level 35-39: 30 rough stone (85-55) final 55 rough stone produced 0 skillups

avg data level 20-25: (5+5+7+5+5+5)/6 = 5.33 rough stone; 5/5.33 = 93.75% skillup rate level 25-30: (5+7+8+5+11+7)/6 = 7.17 rough stone; 5/7.17 = 69.8% skillup rate level 30-35: (11+9+17+12+18+30)/6 = 16.17 rough stone; 5/16.17 = 30.9% skillup rate level 35-39: (22+8+31+31+44+30)/6 = 27.68 rough stone; 4/27.67 = 14.46% skillup rate level 39-40: 4 skillups / (23+17+17+4+24+55 = 140) rough stone = 2.86% skillup rate

Graph: https://imgur.com/Eu3gHsX

Smelting Copper: https://www.mediafire.com/file/tqx4hnfw7sofrpa/smelting_copper_1_part_1.avi/file https://www.mediafire.com/file/5tx7am0r2fqjd94/smelting_copper_1_part_2.avi/file https://www.mediafire.com/file/vtvn1w7i7hh6o5l/smelting_copper_2_part_1.avi/file https://www.mediafire.com/file/kp4lq3igz9vksrm/smelting_copper_2_part_2.avi/file https://www.mediafire.com/file/qq9t414jrm6tm7t/smelting_copper_3.avi/file https://www.mediafire.com/file/3mfrkynwdr96sun/smelting_copper_4.avi/file https://www.mediafire.com/file/b800n0asvyra6o4/smelting_copper_5_part_1.avi/file https://www.mediafire.com/file/m1vc51p9ekak8zf/smelting_copper_5_part_2.avi/file

run 1 level 25-30: 534-527 = 7 level 30-35: 527-521 = 6 level 35-40: 521-516 = 5 level 40-45: 516-510 = 6 level 45-50: 510-498 = 12 level 50-55: 498-478 = 20 level 55-60: 478-469 = 9 level 60-65: 469-450 = 19 level 65-70: 450-308 = 142

run 2 level 25-30: 284-279 = 5 level 30-35: 279-271 = 8 level 35-40: 271-262 = 9 level 40-45: 262-256 = 6 level 45-50: 256-249 = 7 level 50-55: 249-237 = 12 level 55-60: 237-221 = 16 level 60-65: 221-177 = 44 level 65-70: 177-99 = 78

run 3 level 25-30: 75-69 = 6 level 30-35: 69-63 = 6 level 35-40: 63-55 = 8 level 40-45: 55-47 = 8 level 45-50: 47-37 = 10 level 50-55: 37-25 = 12

run 4 level 25-30: 95-90 = 5 level 30-35: 90-84 = 6 level 35-40: 84-76 = 8 level 40-45: 76-65 = 11 level 45-50: 65-53 = 12 level 50-55: 53-42 = 11

run 5 level 25-30: 5 copper (257-252) level 30-35: 6 copper (252-246) level 35-40: 6 copper (246-240) level 40-45: 8 copper (240-232) level 45-50: 10 copper (232-222) level 50-55: 8 copper (222-214) level 55-60: 12 copper (214-202) level 60-65: 32 copper (202-170) level 65-70: 140 copper (170-30)

AVERAGE OF FIVE RUNS level 25-30: (7+5+6+5+5)/5 = 5.6 copper (89.3% skillup rate) level 30-35: (6+8+6+6+6)/5 = 6.4 copper (78.1% skillup rate) level 35-40: (5+9+8+8+6)/5 = 7.2 copper (69.4% skillup rate) level 40-45: (6+6+8+11+8)/5 = 7.8 copper (64.1% skillup rate) level 45-50: (12+7+10+12+10)/5 = 10.2 copper (49.0% skillup rate) level 50-55: (20+12+12+11+8)/5 = 12.6 copper (39.7% skillup rate)

AVERAGE OF THREE RUNS level 55-60: (9+16+12)/3 = 12.33 copper (40.5% skillup rate) level 60-65: (19+44+32)/3 = 31.67 copper (15.8% skillup rate) level 65-70: (142+78+140)/3 = 120 copper (4.2% skillup rate)

Graph: https://imgur.com/plscMwo