Jump to content

How Do The Chances On An Enchant Work ?


Recommended Posts

Ohai everyone.

The rates are 60% for a success on enchant. I had 5 Weapons +3. I enchanted all weaps from +3 to +4 and all failed.

 If Im not wrong with my math the 5th weap should have had a chance of 99.99% of success. So did the 4th weap should have had a chance of 99.97 to succeed.

Either Im very unlucky or the enchant chances arent really chances but all weaps are already destined. So basically once a weap gets in your inventory it already has an invisible max enchant. The most logical answer I guess is that Im completely wrong since the chances on each weap still are 60% or smth  :D

Thats my thought. Who knows it better and could explain enchantment to me ?

Edited by phyphy
Link to comment
Share on other sites

You're unlucky guy... :happyforever:

I think that might be fake the 60% chance. Or is low in each enchant (and starts from +1 lol).

Do you tried other times?

 

Go throw the weapons in the sea and pick up it again..  
Give +1 enchant. Do the same for 10 times..

hahaha! The top PM from a player before 10+ years when I was playing.

Edited by 'Baggos'
Link to comment
Share on other sites

Depends on if server has random or pseudo random.

 

Pseudo random has a pattern, I think its a function of time. Establishing the pattern is difficult because it depends entirely on how large the range is. Typically random is taken over 1000 subjects.

 

The reason why +3 -> +4 breaks at high enchants is simply probability.

 

500 success and 500 fails is 50% chance over 1000 attempts.

 

But the distribution is 500 success and 500 fails back to back. Take it over the first 500 attempts, success is 100%. Take it over the second 500 attempts - 0% success.

 

Move it to 500 subjects from 250 to 750 attempts is still 50%. 

 

TL;DR bad luck. Establishing pattern is bad way to go. Getting good enchant levels is just a matter of going through a large volume of items and enchants.

 

P.S. What math are you talking about? What you are calculating is probability. 

Chance is always the same.

60% to succeed on +4, +5, +6. The cummilitive chance to get from 0 to +6 might be lower.

Edited by Epiquin
Link to comment
Share on other sites

In order to get more accurate results, you should try with 100 weapons. You can simulate the enchant process like this:

package net.sf.l2j.gameserver.network.clientpackets;

import net.sf.l2j.util.Rnd;

public class EnchantTest
{
	public static void main(String[] args)
	{
		int success = 0;
		int noLuck = 0;
		int enchants = 5; // Enchants per lap.
		double chance = 0.60; // 0.50 = 50% chance, 1 = 100% chance.
		for(int i = 1; i <= 100; i++)
		{
			for(int a = 1; a <= enchants; a++)
			{
				if(Rnd.get() < chance) {
					success++;
				}
			}
			if(success == 0)
			{
				noLuck++;
			}
			System.out.println("Lap: " + i + "; There was " + success + " successful of " + enchants + " enchants!");
			success = 0;
		}
		System.out.println("There was " + noLuck + " total fails!");
	}
}

Test for l2j aCis.

Link to comment
Share on other sites

 You can simulate the enchant process like this

Final lap output from MATLAB

 

>> L2script
Lap: 100.000000 ; There was 301.000000 successful of 5.000000 enchants!There was 199 total fails! 
>> L2script
Lap: 100.000000 ; There was 295.000000 successful of 5.000000 enchants!There was 205 total fails! 
>> L2script
Lap: 100.000000 ; There was 308.000000 successful of 5.000000 enchants!There was 192 total fails! 
>> L2script
Lap: 100.000000 ; There was 295.000000 successful of 5.000000 enchants!There was 205 total fails! 
>> L2script
Lap: 100.000000 ; There was 299.000000 successful of 5.000000 enchants!There was 201 total fails! 
>> L2script
Lap: 100.000000 ; There was 305.000000 successful of 5.000000 enchants!There was 195 total fails! 
>> L2script
Lap: 100.000000 ; There was 297.000000 successful of 5.000000 enchants!There was 203 total fails! 
>> L2script
Lap: 100.000000 ; There was 285.000000 successful of 5.000000 enchants!There was 215 total fails! 
>> L2script
Lap: 100.000000 ; There was 291.000000 successful of 5.000000 enchants!There was 209 total fails! 
 
Statistically, its close to 60%, lowest was 57% and highest 62%. 
500 is still a rather small sample.
 
What this doesn't show is the distribution (median) and the mode (occurrence of value) which I think is what the player perceives, because its unlikely that someone will take 500 attempts in a row in a short amount of time.
 
P.S. Tessa, it seems your code is adding +1 to success variable on every success, and not when there is 5 success in a row. Can you confirm?
Edited by Epiquin
Link to comment
Share on other sites

OP - just unlucky. 5 weapons is too little to say anything statistically. If we were to follow your logic we could toss a coin and say that it will always be heads since it was heads in our test. Try one thousand, ten thousand, a hundred thousand enchants then we can talk.

It seems to me most people who complain about enchants have no clue about statistics. Past events (success or fail enchant, heads or tails when tossing a coin) have no influence on what the next outcome will be.

Link to comment
Share on other sites

its all about luck u may fail 100 times in a row then in a row to success 100 times, but the rule shows that average on the "CHANCE" is the percent u gave which is 50% in our case

 

p.s. 100 tests may never be accurate(ex to get 50 successes with 100 enchants), the tests must be done in millions, cuz there is chance in the chance xD

 

thats a simple tester, just to mention success rate of enchanting isnt 66% its 2/3

 

import java.util.Random;

public class enchantTest
{
    private static final double    ENCHANT_RATE    = (double) 2 / 3;    // ~66.6666%
    
    public static void main(String[] args)
    {
        Random rnd = new Random();
        int total = 1000000;
        int success = 0;
        for (int i = 0; i < total; i++)
        {
            if (rnd.nextDouble() < ENCHANT_RATE)
            {
                success++;
            }
        }
        System.out.println("Success Accuracy: " + (double) success / 10000);
        System.out.println("Success: " + success);
        System.out.println("Failed: " + (total - success));
    }
}
 
Edited by BruT
Link to comment
Share on other sites

I was thinking about the enchant system in L2 as well so I experimented myself some time ago. I don't remember what was the result but I don't mind sharing my application with you.

 

Download link: https://www.dropbox.com/s/a8ax8nuj8gldo9c/EnchantSystem.exe?dl=1

 

Virus total: https://www.virustotal.com/en/file/197dab19013078a6540fb95b1ed7c71780081de418cc240b3d4c183dcf011eea/analysis/1426375597/ (I don't know why it says trojan, you can run it in sandboxie if you're not sure about it)

 

 

JaLtf5o.png

 

Once it finishes it will generate a results.txt in your desktop (and it will open automatically) with all the tries + some detailed info in the bottom.

Edited by N1nj4Styl3
Link to comment
Share on other sites

I don't know why it says trojan, you can run it in sandboxie if you're not sure about it

Dont worry, even system folder of clean install of l2 has "trojans".. :D

Link to comment
Share on other sites

Dont worry, even system folder of clean install of l2 has "trojans".. :D

Yeah I know that, I have had numerous problems with AV's blocking L2.exe and related files.

 

Some AV's are just bad. I assume this happened because I have imported I/O so It can write a text file. I don't really know, meeh.

Link to comment
Share on other sites

Those are nice but all they show is individual success rates. I think the real concern is how many weapons, or how many attempts, will get 5 enchants in a row with 60% success rate per enchant.

 

Out of large samples (1000 or so) you will get your typical 60% trend per enchant, sure. But if you count how many succeeded 5 times in a row, its a lot less than 60%.

Based on Tessa's code, this counts how many weapons will get to +5, no left over enchants are used. Not in Java.

success = 0;
noLuck = 0;
enchants = 5; % Enchants per lap.
chance = 0.60; % 0.50 = 50% chance, 1 = 100% chance.
for c = 1:100;
    for a = 1:enchants;   
        if(rand(1) > chance) % count failures instead of successes
            noLuck = noLuck+1;
            break % if it fails before reaching 5, no point in counting - start new lap
        elseif(a==enchants);
            success = success +1; %if it reaches 5 in a row count as success.
        end        
    end  
    %fprintf('Lap: %1.0f ; There were %1.0f successful attempts of %1.0f in a row enchants! \n',c,success,enchants);
end
fprintf('Lap: %g ; There were %g successful attempts of %g in a row enchants! \n',c,success,enchants);

This counts how many in a row for enchants only (assumes you buy weapons on demand, and you use a limited amount of enchants)

for c = 1:100;
    if (rand < chance)
        x(c) = 1;
        success = success + 1;
    else
        x(c) = 0;
    end
end
fprintf('%g out of %g successes \n',success,c);
success = 0;
counter = 0;
while c > 0
    if (x(c) == 1)
        counter = counter + 1;
        if (counter == enchants)
            success = success + 1;
            counter = 0;
        end
    else
        counter = 0;
    end
    c = c-1;
end
fprintf('Total %g 5 in a row successes \n', success)
Edited by Epiquin
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock