Previous article: Ylialkemisti - The end of The Knower to be
Now despite the gods reveling in Mina's suffering, they do offer the power to face the adversities that the world presents and this power comes in the form of Perks. I know I said it's a list about not relying on having any perk at all so I'm breaking the rule here. It's for a good reason though, this tech doesn't just give Mina any perk, but all of them, many times over. The Wiki does an impeccable job at concisely explaining how to perform this tech so I'd recommend reading it there for a better guide.
This is the best example of bug turned feature I've ever seen and experienced. The gods offer a selection of 3 perks in every Holy Mountain, Mina get's to pick one and the rest dissappear, then on to the next Holy Mountain with the same setup.
The random selection of perks can sometimes have no perks Mina is is willing to have in that run, the perk reroll machine allows Mina to spend some gold for a different selection of perks, the starting price is 200 gold and doubles on each use. Prices quickly get so high it becomes impossible to afford so Mina get's a few rerolls at best, nowhere near enough to get anything they want, a much deserved nerf as perks trivialize large parts of the experience.
But for a god run we don't care about the old gods intended experience, The old are being replaced and whatnot.
This is where it gets a bit Mathematical; each machine has it's price, butthe increment in reroll price applies universally to all reroll machines this means;
- after a reroll, every new machine Mina comes to will have the new incremented price.
- after a reroll, upon returning to a different reroll machine that Mina has already come across (already spawned in the world), the price of the machine will remain as it was when originally left. Rerolling on this machine will have the price jump to double the value of the last performed reroll, this is what is meant by the increment is universal, the math looks like '200 * (2 ^ reroll_count)'.
The trick is to load enough machines at a low price, and reroll each one of them always doubling the price for the next reroll which we don't have to worry about having to pay for as we only reroll at already loaded in machines with their low price. With enough rerolls the price gets so high that the code handling it fails and prices rerolls at less than 10 gold, this lasts for almost 1000 rerolls.
Technical Break Down (this is where it get's code-y)
Each reroll doubles the previous cost. Starting at 200 gold, the cost grows as 200 * (2 ^ reroll_count), quickly ballooning into the trillions and beyond. The game stores this cost using the number type-IEEE 754 double-precision floats.
Around 14 digits of precision, Lua’s default tostring() function switches to scientific notation. For instance, instead of 109951162777600, you get 1.099511627776e+14.
Noita uses a function, ComponentSetValue(), to store the reroll cost. This function internally converts numbers to strings but truncates everything after the decimal point. So 1.099511627776e+14 is cast to "1" and then parsed back into the number 1.
As a result, after 39 rerolls the game thinks the reroll cost is literally a single digit amount of gold, and accepts your reroll for pocket change. This persists for around a thousand rerolls, enabling nearly infinite perk hunting.
At around 1017 total rerolls, the floating-point value exceeds 1.7976931348623157e+308, the maximum value for a double, and becomes inf (infinity). The value "inf", should crash the logic, the number is parsed into some enormous default fallback, or simply disables rerolling due to failed parsing. Whichever it might be, it does not allow further rerolling, but lucky for Mina, a thousand rerolls is more than enough to get all the perks you'd need for anything.
Read this reddit comment from a PoV of someone who understands the tech and the code behind it better.
Conclusion to the series
At this point, you’re no longer just surviving Noita, you’re shaping it. You’ve crossed the line from wand-slinger to demigod, and that still counts as a god in a physics sandbox. The world responds to your thoughts, your reflexes, your edits.
the world is yours to mold. Hunt for secrets. Go for the achievements. Keep going deeper. Break the systems. Abuse the engine. Then rebuild it in your image.
The game's still trying to kill you. But now, it has to try harder.
com
full time NPC, part time ByteBloomer software developer