r/valheim • • Oct 17 '26

Discussion Namescumming 2: Electric Boogaloo

I am the author of the yesterday's post that exploded on how to exploit the names to reach any quality level, as long as you have idols.

The tool in question: https://melichor.github.io/ValheimSaveParser/

Let me clear one thing up. This tool allows you to find upgrade paths indefinitely, as long as you have idols, you can upgrade without a chance of breaking, if you do everything correctly.

Since the first post was sort of brief and changed as people pointed out things that made me realize the exploit goes even further than I originally thought. So this post explains how it works internally, the bug that is there, and my thoughts onto how to fix it so that the devs might be satisfied and how I think it should be fixed so that the game is actually fun.

How random works in games:
True random is really hard to do, and if the universe is deterministic, you can't achieve true random, so we fall back to pseudorandom, and if needs be, we have "true random" in form of quantum patterns and data from space. But that is highly impractical so pseudorandom is definitely the way to go in games. Pseudorandom works by performing math operations, that transform a number so that the results seem random. The big issue is how to determine the starting point of this, this is called "Seed". The issue with seeds, is that once you know the seed, you know every RNG roll that is sequential to this. This can be mitigated (please note, mitigated, not countered), by using a current time as a seed, however a case can be made for using seeds that are not time dependent and are deterministic.

For ease of understanding, you can imagine a seed as a sequence of numbers that you can reference, that seem random. They are NOT a sequence of numbers, seed is a singular number, but functionally it works like a sequence of numbers for this purpose.

I didn't investigate how it worked before exactly, just that there wasn't a seed stored in the save file. But since it was completely random, some seed was probably initialized internally and used to determine the RNG rolls of not only the forge, but of other things as well, making it appear random.

Let's discuss a hash function. A hash function takes a sequence of letters (string in programming) and transforms it into a number. This is extremely useful for multitude of reasons, but for this purpose it is useful, because you can use a string to create a seed. In Unity the seed is started as a 32-bit number (the most common size in programming, I would have reservations against using 32-bit for hashes and seeds, using 64-bit would probably be better, and it is actually possible with Unity, although a bit unintuitive, but the bug that is there would be resolvable with 32-bit as well). Later it is transformed into a 128-bit number that can be modified.

Credit where credit is due, they at least wrote their own GetStableHashCode function, because GetHashCode from .NET is not stable between runs, on the other hand, if they used that function, it would make everything more complicated, not impossible, but complicated.

Now, we are getting to the interesting part.

Everytime you attempt to upgrade a weapon, the game looks into your character, if the seed exists for the item name and the quality you're trying to reach. If not, it generates one. That means that for every step of the upgrade path, the randomness does not influence other upgrades, but it influences subsequent retries for the same quality upgrade.

Let's assign them a numbers so that you understand what I am saying

Upgrade 3->4 gets a sequence of numbers [1, 2, 3]
Upgrade 4->5 gets a sequence of numbers [4, 5, 6]
Upgrade 5->6 gets a sequence of numbers [7, 8, 9]

That means, that if you attempt upgrade 3->4 the first number is extracted and used for probability, and you are left with:

Upgrade 3->4 gets a sequence of numbers [2, 3]
Upgrade 4->5 gets a sequence of numbers [4, 5, 6]
Upgrade 5->6 gets a sequence of numbers [7, 8, 9]

Meaning the other probabilities weren't touched at all.

The intent behind it was obvious, make save scumming impossible. Except it didn't succeed in preventing save scumming either and it made the new method possible.

How can you still save scum? As I said, the seeds are saved to the character, so if you duplicate an item, you are bound to get a successful roll for that quality eventually. You just must be sure to not reload the character, just dupe the item.

How the exploit works? Pretty easily, knowing how the seed is generated I can try a lot of combinations of seeds to find which one I want. So let's get how the seed is generated.

You hash the character name into a 32-bit number, you hash the item name into a 32-bit number and you add the all together along with the target quality
seed = hash(character_name) + hash(item_name) + quality + 1

So once I know the seed, I can just try many different combinations to find out the longest sequence of successes. But hold on, why does it allow only 8 sequential successes until you break an item for the first time? Because there is a bug. In Unity sequential seed numbers used for random are correlated, and if you look at the seed generation, the only difference between seeds for the same item type and character is quality, that increases by one. This is a bug, and very easily fixable, they just need to use a seed mixer first, that would remove this correlation.

How to fix this so that the devs are satisfied? Tie the seed to the item, not to the character. This sucks, but achieves what the devs were attempting to do. Basically once you upgrade the item once, the game will essentially lock the potential of the item, it will still be readable, so you still know exactly how far you can take the item (That part isn't avoidable if they want to avoid save scumming), but it won't allow you to infinitely upgrade the item. You still need to change the seed generation for that one. Drop the entire seed per quality, just one seed per item, and make it dependent on time, not on any static text.

Now we move onto my opinion:

Do I want it to be fixed that way? No. I want FoP to be completely reworked, and there are many ways to do that.

My favorite one is Weapon XP. It goes along with the core idea of the grind in the game, you use a weapon, the weapon gathers weapon XP, and once it reaches enough XP, you can take it to the FoP, use an idol and upgrade it. You may or may not have a maximum level for that. It may also take increasing number of idols and weapon craft resources to reach higher levels. This exactly serves what FoP was meant to do, allowing you to carry your FAVORITE items you created before to higher biomes. The best part is that the moment you take it to the FoP is a grand moment of accomplishment, not to mention finding the totems wouldn't be: "Eh, there's something I found for a mechanic I don't want to use." it would be: "Oh, I wanted to upgrade my weapon, and now I found what I was missing to do that."

427 Upvotes

84 comments sorted by

42

u/cok3noic3 Oct 17 '26

This sounds like cool information. Can I get an ELIgreyling?

38

u/Melichorak Oct 17 '26

They create RNG seeds with predictable patterns, allowing this exploit. They also have a bug there, that makes the random not truly random. They can fix the bug, they can try to patch the exploit (not completely), but they should rework the FoP instead.

9

u/17scenes Oct 17 '26

I'm going to assume that you're a developer of some sort in school/in your career. You clearly know what you're talking about. Are you going to consider making a mod for your suggestion? Based on historic evidence, there's a high likelihood that the devs are going to ignore/reject your suggestion. If you're not going to do it, I might do it.

20

u/Melichorak Oct 17 '26 • Bravo

Yes, I am indeed a developer in my career :)

And yes, I thought about making the mod, I think I will do it this weekend.

3

u/Akitiki Oct 17 '26

The weapon XP thing is honestly great, I'd use that over other mods.

I'd also propose the ability to craft idols, but have them be relatively expensive as you get into later materials. It's just hard to find them, and on multiplayer servers there isn't enough to go around to be useful since you need quite a few extra levels in order for stuff to compete into later biomes. Only found one wood one and I'd love to upgrade my hammer more! Maybe with trophies; deer, shaman/brute, draugr, wolf (multiple, the rest of them are too rare), mosquito, gjall... haven't gotten to the last two biomes yet!

4

u/Melichorak Oct 17 '26

I already made a system for it :) I want to test it locally and then I will make a small test, probably on r/Valheim discord or something like that

10

u/17scenes Oct 17 '26

I'll keep an eye out. I think what's so infuriating to me is that not only did they double down on such a half-baked feature, their solution to people savescumming on their PvE game is another half-baked, lazily thought out, duct-tape solution of creating deterministic probabilities not only on a character, but of all things, a character's name to be used as a hash (or part of the one used as you noted). It just doesn't feel right to seed it from something that is input by the user, and I don't know, it just seems insulting to me that their solution for stopping players to reach for a cookie jar on a countertop is to move the cookie jar to a different countertop and calling it a day.

4

u/kkngs Oct 17 '26

You do realize they're gonna start salting the hash if they ever read your post, right?

For your weapon xp id... they could  probably tie the item xp id to adrenaline earned while its equipped. This would work with both weapons and armor, then.   I'm not sure the devs are gonna be keen on adding additional state variables to every equipable object in the game, though. They'd also need new UI elements for how the forge works then,  too. 

3

u/Melichorak Oct 17 '26

Salting the hash does nothing though? I can just use the same salt as well. Salting the hash happens on passwords, so that it wouldn't match common password dictionaries when leaked...

1

u/kkngs Oct 17 '26

How can you determine what they combine the item hashes with before feeding the rng? Perhaps I'm underestimating how much you can determine from inspecting the binaries?

I would think this would prevent you from predicting the success up front (name scumming would still work, though)

7

u/Melichorak Oct 17 '26

I reverse engineered it. I know exactly how they construct the hash, otherwise the tool wouldn't work, so if they would include salt, I would just include it as well :)

0

u/[deleted] Oct 17 '26

[deleted] — view deleted comment

5

u/Melichorak Oct 17 '26

Decompiling is one method of reverse engineering :) Reverse engineering doesn't imply black box

6

u/El_Loco_911 Oct 17 '26

Maybe the devs should get help for their mental health problems. Fighting with your customers for what? So some kid doesnt have a level 40 sword? Who cares!

5

u/SuperPursuitMode Oct 17 '26

Love the work and dedication you put into this game, much appreciated!

As for the weapon xp thing, this would just cause meta players to use the same exp farms used for skill maxing more, which would mean even more immersion breaking meta gaming grind.

As for the forge, I would like to see it useable for cosmetic effects in the future. Playing around with glow color and intensity and hopefully being able to change color patterns on existing armor pieces would be awesome and could provide a crafting use for the new gems from the Deep Northand provide us with a money sink for all that endgame gold by maybe having to buy some mats from the traders too.

5

u/Melichorak Oct 17 '26 edited Oct 17 '26

Meta players will meta, that is just fine. The issue is that an optimal route to create an OP gear is an exploit with an infinite payoff, and the main route is very very deterring to use for experienced and casual players. With the weapon XP the casual players can still interact while hardcore players can grind.

2

u/likes_almonds Oct 19 '26

Does this still work?

2

u/Melichorak Oct 19 '26

Yes, no update has been myde since

115

u/whatanHPoP Oct 17 '26

I really like your suggestion for a reworked Forge!

Whatever gets me fighting more is a win in my book.

43

u/Yebi Happy Bee Oct 17 '26

I've heard at least 10 different ideas for the rework, each vastly better than the shit that the devs came up with. At this point I'm convinced that them coming up with such an amazing core gameplay was luck rather than talent

18

u/redmormie Oct 17 '26

tbh core gameplay is just survival craft genre, and in many many cases its worth than the majority of games. The gameplay itself is meh, its the environment (art, setting, music, vibes) that are 11/10 and make it fun to just be hanging out in the game. At least for me, once I start doing things in the game it gets less fun than just chilling at my base or sailing around exploring 

1

u/tenuousemphasis Oct 19 '26

I implemented their idea and added a few extra features. Tried to keep it minimal for smaller breakage surface area.

https://thunderstore.io/c/valheim/p/Nerdtastic/EquipmentExperience/

7

u/[deleted] Oct 17 '26

[removed] — view removed comment

1

u/ctom42 Oct 21 '26

Yeah, NGL that sounds awful. Low chance drops that require you to grind a boss hundreds of times are not good game design. They are just one more way of tricking players into wasting their time chasing a high.

1

u/[deleted] Oct 21 '26

[removed] — view removed comment

1

u/ctom42 Oct 22 '26

Doing the exact same fight hundreds of times is tedious and boring. Yes you fight enemies over and over, but you are typically doing a variety of tasks as you fight them. You encounter them in different scenarios, etc.

There being variety to the boss fights as you describe there does make it better, but I still think super rare drops like a lot of MMOs have are terrible game design that are designed to pad playtime. Obviously a mod creator doesn't have the same incentive as a paid subscription MMO but that type of mechanic just sucks the fun out of any game IMO.

29

u/Figorix Oct 17 '26

Bro casually dropped best rework idea i've seen on this sub at the end of lengthy technical explanation most people wont read 🥲

3

u/hotdiggity22 Oct 17 '26

Your comment made me read it in full lol.

Hopefully the devs see it, because it's great insight into the struggles they will run into if they don't go with a rework. Which they likely already know, but sometimes you need an outside voice to really drive it home.

1

u/tenuousemphasis Oct 19 '26

I hope this doesn't come across as spamming but I've been replying to everyone who liked the XP idea as much as I did letting them know about a new mod I just released.

https://thunderstore.io/c/valheim/p/Nerdtastic/EquipmentExperience/

23

u/tophergraphy Oct 17 '26

Weapon XP sounds like a decent avenue, but how does armor work?

13

u/QuaintLittleCrafter Oct 17 '26

I really like the idea of weapon XP as a solve. I imagine armor would be based on how long you wore it, how much it has protected you already, and/or would be cool to include dodge rolls in it as well.

4

u/boringestnickname Oct 17 '26

how much it has protected you already

If measured by damage "blocked", that would be pretty easily exploitable. The same, to a certain extent, with dodge rolls.

Maybe some sort of combination of a lot of different things would work, though, to avoid people automating it (ensuring actual use.)

5

u/searing7 Oct 17 '26

If devs stopped maximizing for trivial things like “exploitable upgrades” and focused on fun and player experience we would never be having a meta discussion about the forge and how they fucked it up even more.

-3

u/boringestnickname Oct 17 '26

It's not trivial.

If you communicate a way of optimizing to a player, he/she will go in that direction. It directly informs gameplay.

The entire genre is essentially about traversing soft and hard "locks" to progress. You don't want things to be exploitable. It's not "fun" to make macros that level up things while AFK. It's not "fun" to be able to make items that trivialize content.

The FoP is a perfect example. Just by virtue of knowing how the math behind the feature works, people are now complaining that it's too hard to make lvl50 items, because it's so improbable. That was obviously not the intent of the FoP. The progression (soft limit) was limited by the practicality of beating the math.

It's obviously conceptually bad, but not because of the math or how the math is implemented. The problem is what it communicates (in addition to what it actually entails in terms of gameplay for the player.) Especially to people who have a hard time understanding numbers and interpret intent.

6

u/searing7 Oct 17 '26

Policing how people play a single player game is actually horrible waste of development time people will always exploit the systems. Taking a bad system and making it worse instead of improving it is not a good solution. And this solution is not only technically bad from a programming perspective but it also creates more avenues to exploit the broken system developers seem unwilling to admit is bad

1

u/wasuu Oct 19 '26

how much it has protected you already

In my gameplay I try not to get hit. So that would mean the better I play the less XP I gain.

That leaves the time-based XP left

3

u/ardotschgi Oct 17 '26

Maybe get XP per enemy kill, regardless of the weapon used.

2

u/CaptainDudeGuy Oct 17 '26

I'd have weapon XP work on weapon attacks against valid targets (like skill XP does now) and armor XP work when attacked, regardless of if the attack hit or missed.

Now, for symmetry, I want armor skills. Maybe 1-75 decreases dodgeroll endurance in that kind of armor and 76-100 increases damage mitigation?

I dunno, it's probably moot anyway until a modder decides to mess with it.

2

u/Figorix Oct 17 '26

Should be tied to exp gained for running swimming etc. Even walking. Just not standing (because afk obviously)

76

u/derpster_phil Oct 17 '26

I gave you a hard time on your post yesterday. I'm sorry. You're really putting a lot of work into this.

Your suggestion to improve the forge is the best I've heard, and is definitely a mod I would use if it existed.

1

u/tenuousemphasis Oct 19 '26

I used Claude to make it (my background is software development)

https://thunderstore.io/c/valheim/p/Nerdtastic/EquipmentExperience/

26

u/SuddenBumHair Explorer Oct 17 '26

Very interesting read that went right over my monkey brain.

The weapon xp thing is the best idea ive heard

11

u/Independent_Vast9279 Oct 17 '26

Thanks for the suggestion on a new FoP system. This is a rare actually helpful post. Instead of just saying “don’t like it, don’t use it”, I wish more people could use some imagination to suggest improvements.

Your system would be amazing. RNG applied to crafting is a blight and never works well. Having a goal to work toward and then definitively accomplishing it is the whole of these games. The systems should reflect that. 

Bravo

8

u/0x1f480 Oct 17 '26 edited Oct 17 '26

If they wanted a random chance at upgrade that isn't cheatable (without mods/external software), why worry about a seed at all? Why not just use a pseudorandom math function based on the least significant digits of the computer's clock at the time of upgrade attempt? 

But I agree with your overall design critique at the end. The current system is bizarrely badly designed. Weapon exp would be fine. I also like the idea of upgrades that are capped based on the idol + the quality of the item, so  for example silver idols could get frostner to +4 (maybe +6), plains(?) idols could get it to +8, and so on. This would serve the same purpose of letting you keep older weapons relevant. Alongside this, upgrades would always succeed, or have no penalty, or just downgrade 1 level, since finding the idol is most of the challenge and they can't make you really OP.

Nice job with the tool and thanks for the writeups.

2

u/Drayrs Oct 17 '26

Using a fully random number (or a pseudo-random number we can't easily predict) would mean you can save scum to successfully upgrade the item.

1

u/0x1f480 Oct 17 '26

... oh. right. lol

4

u/CCRogerWilco Oct 17 '26

A lot of people are familiar with seeds for a random generator, as the map uses a random seed as well.

Using the same seed gets you the same map.

4

u/half-OP Oct 17 '26

For me , i think the forge of potential place shouldn’t be fixed. It should act like the leviathan. You randomly find it in the ocean while exploring.

If you find the FoP island, you have 1/2 upgrades before the island sinks. It’s always guaranteed! You still need idols!

More exploration = more spawned islands

That’s harder to spam, and requires exploration all whilst being safe.

3

u/ElectricLego Oct 17 '26

Love the weapon XP idea. I hope that gets implemented. At least modded in

4

u/MQ2000 Oct 17 '26

I still like the idea of you have to fight in an arena with enemies to upgrade the item, getting harder each level

2

u/eltarah Oct 17 '26

Would it not be kinda easy to create a mod with the weapon experience idea of how the FoP should work? I really dig that one!

1

u/tenuousemphasis Oct 19 '26

I used Claude to create that mod. Might not be verified by Thunderstore yet.

https://thunderstore.io/c/valheim/p/Nerdtastic/EquipmentExperience/

2

u/Shalvan Oct 17 '26

That's a really cool idea actually

2

u/Curious_Positive7126 Builder Oct 17 '26

Very nice but how do you all have so many idols? I'm still even looking for 1 wooden. I think I've been to every meadows biome and combed them

3

u/Bjeffwoff Oct 17 '26

The idol drop rate is beyond silly tbh We have had over 100 black marble and black metal idols, probably equal flametal but iron/silver and everything else we have barely any... Bronze is the third most we've had a lot of

Edit: 1.5x drop rate. We've explored a ton (3-5 players but mostly 3 of us)

3

u/OrganicSkirt1721 Oct 17 '26

mTfhNEpspm This seed has wood idol very close to spawn point Head east and look for a house with ivy.

3

u/Levithix Viking Oct 17 '26

It’s all RNG in the “we need more RNG” update.

1

u/Hollowed_Orky Hoarder Oct 17 '26

There is a mod out there to craft idols from trophy of the relevant biome, it lack wood idols and troll count toward two tiers for some reason but it's nice, op if combined with safe forge 😅

3

u/BrainFu Oct 17 '26

I like the idea and it would work with a cap on the level improved to.

1

u/ArceusDamnIt Oct 17 '26

I think it’s funny how the answer to most people questions for stuff like this is “just use a mod”

2

u/Fun_Magazine_2671 Oct 17 '26

That’s a fantastic study—I’m really impressed!

I don’t think I’ve fully understood everything, and I don’t think this is the best solution, but what about using the world seed instead of the character name as the seed value?

To ensure that equipment is enhanced, you’d have to switch worlds instead of switching characters—but since that’s more trouble than switching characters, I think it would significantly reduce the number of people who would actually try to do it.

I think this method would make it easy to make corrections, but why do you think they chose not to do that and instead used the character names as seed values?

2

u/ifiwasiwas Happy Bee Oct 17 '26

You're a legend man. Thank you!

2

u/untiedgames Oct 17 '26

Since everyone's posting their ideas for a rework, here's mine.

The idols are already pretty rare, so why not use those as a limiting factor of sorts instead of breaking your weapon/armor? Maybe they could be required for the upgrade but not consumed on success. As you upgrade further, the chance to break the idol goes up. Maybe a gold cost could also be introduced to balance the pacing of the upgrades- Haven't gotten to the deep north myself yet but have heard that players could use a way to spend the gold they're getting.

Some other ideas, take your pick:

  • Place a long cooldown on the equipment instead of breaking it (cannot be equipped or upgraded until cooldown is elapsed)
  • Curse the equipment instead of breaking it, require the player to remove the curse by offering resources (cannot be equipped or upgraded until curse is removed, subsequent failures cost more resources to uncurse)
  • Curse the player instead of breaking their equipment- Start a tough raid on failure
  • Maybe trophies could be used somehow as part of upgrade cost or to make your odds better- There is little-to-no use for most trophies in the game
  • On failure, relocate the forge to one of its other possible spawn points (Perhaps after X failures- Maybe also make other possible spawn locations visibly obvious to the player such as a conspicuous clearing or structure)

The sky is pretty much the limit, I feel like there are tons of unexplored options for an upgrade mechanic here. The way it's implemented now is not making me want to use it at all.

1

u/Piqued_a_Pack Oct 17 '26

Your suggestion is incredibly elegant and flavorful, I truly hope that the development adopt it.  If they don't, I'm sure the fantastic heroes in the modding community will take it up!

1

u/NuclearAnt Oct 17 '26

Good job. Have never used the forge at all since I dont go above tier 2 for most things but I see the work you put into it and appreciate that.

1

u/Ender_arrows Oct 17 '26

I dunno what spurred you to go through such thorough lengths for this post, but good job. Also great forge rework idea.

1

u/Jolly-Potato-7327 Oct 17 '26

You’re a very smart individual. Well done.

1

u/ArvaroddofBjarmaland Oct 17 '26

This is a lovely tool--thank you!

1

u/DigiToss Oct 17 '26

Do you have any idea how invasion locations work, is there some sort of way to manipulate their location?

1

u/Serious-Elderberry65 Oct 18 '26

I also found that you can use new characters and boost an item, then go one upgrade at a time till you are able to check your main character file and see it will get an upgrade on the item. No way to prove you didn’t do it on ur main because it will have ur mains name on the item

1

u/wasuu Oct 19 '26

There is so much ideas for FoP rework. I kinda like the one that depends on amount of bosses defeated - so the further you progress in the game the more max level for weapons/armors from subsequent bioms is raised.

Weapon XP would work great for weapons, but what about armors? They are used passively so thy only way I can think about is accumulating XP with time.

That being said it wouldn't be a bad idea to have some forum or somewhere where different ideas can be submitted, discussed (and updated after discussion) and then voted for.
Reading others ideas is actually a lot of fun for me.

1

u/tenuousemphasis Oct 19 '26

I was inspired by your item XP idea so I vibe coded a mod to implement it:

https://thunderstore.io/c/valheim/p/Nerdtastic/EquipmentExperience/

It's makes minimal changes to the Forge code so that future updates shouldn't break it, but I will fix it if they do.

-3

u/eljimo Oct 17 '26

This is amazing, so you can create an item, look up a name, make a new char to pass item to, upgrade 8 times, then make another new char with specific name to upgrade 8 more items guaranteed using your tool?

It's incredible the length that people that can come up with to not play the way the Devs intend us to play lol.

16

u/Melichorak Oct 17 '26

Honestly, with the way FoP works currently, what even is the intended use of it?

-10

u/lctdmf Oct 17 '26

That's a lotta words

-7

u/BozzoBurgess13 Builder Oct 17 '26

This forge of potential conversation is exhausting.

Im sure gamers just love to complain about something, honestly the game is still awesome, the forge isnt even needed

-12

u/ElBasham Oct 17 '26

I ain't reading all that

I'm happy for you tho

or sorry bout your gay guy diet

1

u/OGXanos Viking Oct 17 '26

The weapon xp idea is perfect. I have one suggestion for it. Xp only comes from kills. Otherwise we'll just end up with people infront of T.W.I.G. like for skills. Xp could scale by mob type, biome, and of course stars.

2

u/Melichorak Oct 17 '26

Yeah, already excluded T.W.I.G. while implementing it :)

1

u/OGXanos Viking Oct 17 '26

OH! You're just doing it then? I thought you meant making a mod to show the name pathing. This is great!

1

u/Melichorak Oct 17 '26

The mod for name pathing isn't exactly necessary when the external tool just works and doesn't need any installations

1

u/OGXanos Viking Oct 17 '26

That 100% makes sense. Morning caffeine hasn't hit the brain yet it seems. Looking forward to this one!