Enchant simulator and the Korean random

Enchanting in the old chronicles, back when the “random numbers” came from a 2003 generator: it produces a number, and if the number is below the chance the enchant succeeds — if not, here are your crystals. The wheel shows where the number landed, and the chart beside it shows the very sequence it was taken from.

What we enchant
Generator

Every step

StepSuccess chanceFailure chance Reach it from +0 On failure

How it worked

The formula out of Visual Studio

Under enchanting sat the ordinary function rand() from the Microsoft library (2003–2005) the game was built with:

state = state × 214013 + 2531011 roll = (state >> 16) & 32767 → 0…32767 chance = roll ÷ 32767 × 100 → 0…100 %

The seed is the number of ticks since the machine started. The same seed gives the same chain from the first number to the last: the “Korean random” was written not by Koreans but by the developers of Windows.

A mage weapon costs twice as much

Fighter and mage weapons enchant off different tables: from +3 to +14 a fighter weapon has 70 % per attempt, a mage weapon 40 %. Armour works differently: there is no flat shelf at all, every next plus is harder than the last — 66.67 %, 33.33 %, 25 %, 20 %, 16.67 % and further down to 7.69 % at +14.

And at +15 the same thing happens to all three: the chance is halved. For fighter weapons 70 % becomes 35, for mage weapons 40 becomes 20, and for armour 7.69 % becomes 3.57 and then down to 2.78 % at +19. Above +20 nothing lifts it at all: that is zero. Full-body armour has the ladder shifted by one step (safe up to +4), but its halves after +15 are its own, so it is not simply a shifted armour row.

The myth of the flat 66 %

“Armour enchants at 66 % per plus” is the most persistent claim about enchanting, and it was born in emulators, not in the game. In the aCis (Interlude) sources the step chance is computed as 0,66current − 2 with the setting EnchantChanceArmor = 0.66: 66 % at +3, 43.6 at +4, 28.7 at +5. Other builds go further still and take one flat number for every step.

But 0,66n — that is not the chance of a step, that is the cumulative chance of reaching that step if every step is worth 66 %. In other words the emulator put the “reach it from +0” curve in the role of the per-step chance. Amusingly, the comment right above that very code describes the correct retail ladder — “2/3 at +4, 1/3 at +5, 1/4 at +6…”, exactly the one in the table above.

Telling the two models apart is easy from the “Reach it from +0” column: with the real ladder it falls faster than two thirds to the power of n, because the step itself gets harder, not just the number of steps.

One generator for the whole world

Numbers are not rolled afresh for each action: the server walks one sequence, and every event — a hit, a critical check, a spoil, an enchant — takes the next value from it. So the number that is “yours” could have been pulled by anyone: while you hover over the scroll, other people's hits move the queue along. On the chart that is the background running by itself.

Where the waves come from

The same amount — about two and a half million — is added to the previous value every time, and the tail is cut off. Such a generator is cheap but uneven: the numbers come in waves, and after several high values in a row the next one tends to be low. Hence both known tactics: rack up failures on purpose (high numbers) and enchant on the way down — or watch your criticals, which need low numbers instead, and enchant while the streak lasts.

Neither gives a guarantee: the queue is shared, and the “bottom of the wave” goes to whoever clicked first.

Why nobody does it this way today

Modern games use generators with no predictable waves at all: PCG, Xoshiro, and where real money is at stake — cryptographic ones (ChaCha20, AES-CTR) seeded from system entropy. Neighbouring rolls are independent, and there is no wave to catch. Switch the generator above to see the difference: the chart stops being a line and becomes noise, and the “rack up failures” and “catch the dip” tactics stop working altogether.

None of that adds a guarantee: enchanting stays a single roll either way, and the insurance in Lineage 2 was always something else — safe steps and blessed scrolls that do not destroy the item.

The chances are not eyeballed and not taken from an emulator: this is script/itemenchant.txt from the MyExt64 extender that patches the retail l2server (Gracia Final) — it has four groups: fighter weapons, mage weapons, ordinary armour and full-body armour. Jewellery follows the armour group — necklaces, earrings and rings enchant off its ladder, which is why they share one button. Event scrolls are a separate group with a flat 80 % all the way to +23; they are not here. In the l2j datapack (High Five) the same ladder is written without the halving after +15 — the emulator is twice as generous as retail on the top pluses; we show retail.