You are viewing a potentially older version of this package. View all versions.
Azumatt-Unshamed-1.0.2 icon

Unshamed

Valheim 1.0 blocks achievements for anyone running mods. This unblocks them, and gives back the ones you already earned. No free unlocks.

Date uploaded 7 hours ago
Version 1.0.2
Download link Azumatt-Unshamed-1.0.2.zip
Downloads 3778
Dependency string Azumatt-Unshamed-1.0.2

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2350

README

Unshamed

Valheim 1.0 will not give you achievements if you run mods. Not cheat mods, any mods. BepInEx sets a flag the game reads as "cheated", so a game with nothing but a font fix installed is disqualified the same as one with a cheat menu.

Unshamed stops the achievement system reading those flags. It never clears one. Vanilla still records everything it always recorded, so a spawned item is still a spawned item and a server still sees it that way. It can also hand back what you already earned while the game was refusing to count it.

Client side only. Nothing syncs, nothing is needed on the server.

TL;DR

  1. Drop it in and launch. Achievements work again. That is the whole mod, nothing to configure.
  2. Been playing modded since 1.0 dropped? Open the console with F5 and type unshamed retro. It lists the achievements you already earned but were never given.
  3. unshamed retro apply takes all of them, or unshamed retro apply 2 5 9 takes only the ones you point at. Nothing is granted until you ask.
  4. unshamed status if you just want to check it is working.

Why you were locked out

Everything that credits progress asks Achievements.CanGetAchievements() first, and that leans on Achievements.IsCheatedAtAll():

public static bool CanGetAchievements(bool cheated = false)
{
    return !cheated && !Achievements.IsCheatedAtAll() || PlayerProfile.s_bypassCheatChecks;
}

m_cheatCheckCache = (usedCheats | anyCheatedItem | worldCheated) != 0 || Game.isModded;

Four things ORed, and the last is Game.isModded, which the BepInEx Valheim pack sets itself through a method called SetIsModdedTrue, for every install, whether or not a single mod asked for it. That is why nobody running mods earns anything. The other three are permanent in their own way: m_usedCheats sticks to your character forever after one debugmode, and the world mark lives in the world file.

Unshamed forces CanGetAchievements() true and leaves all four flags on disk untouched. That one method is the only gate. Every PlayerProfile stat writer and the build achievement in Piece go through it, cheated argument included, which is the flag vanilla passes for a spawned item you picked up or a cheated meal you ate. Your character is never finished. Type debugmode, spawn a wolf, eat it, achievements keep counting.

IsCheatedAtAll() itself is left alone on purpose, because the console reads it. More on that below.

What it will not do for you

This is a client mod, so I want to be blunt about where the line is. Unshamed changes one method's answer. It never writes a cheat flag, in either direction.

  • PlayerProfile.s_bypassCheatChecks is never touched. That static is the real switch. Vanilla checks it before it stamps m_cheated on a spawned item, on smelter output, on default container loot, on location spawns, on damage from a cheated weapon. Flip it and none of that gets marked. It stays false.
  • m_usedCheats is never cleared. unshamed audit will still show it true.
  • The Cheats counter is never zeroed.
  • Spawned items still carry m_cheated, and it still travels with the item through ZDO, stacking, containers and cooking. Nothing about spawning on a server changes with this installed.

The one thing that behaves differently is what Achievements.CanGetAchievements() returns. Uninstall the mod and vanilla reads the same flags it always would have, nothing has been laundered.

The warnings tell the truth now

Vanilla has five strings saying achievements are disabled, and with this installed every one of them is a lie. The achievements panel was still telling people "permanently disabled for this character" while they were earning achievements fine.

Unshamed rewrites those five in Localization once, at language load. One rewrite covers the console, the HUD popup and the panel, because all three go through the same lookup. What they say now is that vanilla has you marked and that it is being ignored.

$achievements_cheated_item_inventory, the grey "this item was summoned through cheating means" on an item tooltip, stays exactly as it was. It is true, and it says nothing about achievements.

confirmcheats, and the 1.0.0 loop

Terminal.ConsoleCommand.RunAction gates dev commands on !IsCheatedAtAll(), and setkey does the same. 1.0.0 made that method answer false, which told the console you were clean, which made it demand confirmcheats before every command. confirmcheats works by setting m_usedCheats, and 1.0.0 wiped m_usedCheats right after. Round and round.

Both halves of that are gone. Nothing gets cleared, and IsCheatedAtAll() is untouched, so the console gets the honest answer: Game.isModded is true, you already read as cheated, and vanilla skips the prompt entirely. Which is what modded players saw before this mod existed.

The other half of the damage

Losing the unlocks is not all of it, which is why I bothered with the retroactive part. Your stats live in ten buckets:

this.m_playerStats[0].m_stats.IncrementOrSet(stat, amount);   // always counts
if (!Achievements.CanGetAchievements(cheated)) return;
this.m_playerStats[1].m_stats.IncrementOrSet(stat, amount);   // only if you count as clean

Bucket 0 is everything you ever did. Bucket 1 is what the game was willing to credit, and Achievement.CheckUnlocked() reads that one. So every hour you played modded went into bucket 0 and nowhere else. You were missing the unlocks and building no eligible history at all.

Getting back what you earned

Opt in, look first, pick what you want. Nothing happens on its own unless you deliberately turn it on.

unshamed retro shows you the list:

7 achievement(s) your character already earned:
   1 KillAllCreatures            Hunter
   2 FindAllTrophies             Collector
   3 AllFoodEaten                Gourmand
  ...
'unshamed retro apply' takes all of them.
'unshamed retro apply 1 3 4' or 'unshamed retro apply <id>' takes only those.

I am not guessing at that list. It copies the stats in, asks vanilla's own CheckUnlocked(), then puts your profile back exactly as it was. Iron Gate's criteria decide what you earned, and I would rather it stayed that way than have me writing my own rules about what counts.

Picking is not cosmetic. unshamed retro apply 1 3 copies forward only the stats and entries those two achievements read, gathered the same way Achievements.ResetAchievement gathers them in reverse. The ones you skipped stay genuinely locked, because the numbers behind them never moved.

Only the Any difficulty bucket gets filled. I am not filling the Hard or Hardcore tiers for you, that would be claiming a run you cannot prove you did, and Any is what most achievements ask for anyway.

If you would rather not think about it, the Enable Retroactive config toggle grants everything once on your next load. It is off by default, and you do not need it for the console command to work.

Commands

Press F5 for the console.

Command What it does
unshamed status Are you eligible, and why. Start here
unshamed retro List the achievements you already earned, numbered. Changes nothing
unshamed retro apply Grant all of them
unshamed retro apply 1 3 4 Grant only those, by number off the list
unshamed retro apply <id> Grant one by id, e.g. unshamed retro apply KillAllCreatures
unshamed list [filter] Every achievement, its id and lock state. unshamed list troph filters
unshamed audit The ten stat buckets, and everything a cheat check could read off your character
unshamed recon Dump the achievement system to BepInEx/config/Unshamed_recon.txt

If retro says you are still cheated

With Ignore Cheat Flags on it will not. Turn that off and you get vanilla's answer, and unshamed status names which of the four tripped: Game.isModded, m_usedCheats, a spawned item in your inventory, or a world whose m_startingGlobalKeys hold something you could not have set through the World Modifiers menu.

unshamed status and unshamed audit print the raw flags either way. Ignoring them is not the same as pretending they are not set, and I would rather you could see them.

Config

Azumatt.Unshamed.cfg

  • Enabled: master switch. Off means the mod touches nothing.
  • Ignore Cheat Flags: the actual fix. On by default. CanGetAchievements() is forced true, so none of the four checks can stop you earning, and the warnings that used to claim achievements were disabled get reworded. Nothing gets cleared. Turn it off and you are back to vanilla, disqualified for having BepInEx, warnings and all.
  • Show Popups: play the vanilla unlock popup for each retroactive grant. Off, because a big backlog is a lot of popups at once.
  • Enable Retroactive: off by default. On means grant everything automatically on next load, without showing you the list. Leave it off and use the console if you want to choose.
  • Force True Methods / Force False Methods: comma separated Type::Method whose bool return gets forced. A hatch for when a game patch moves something and the mod stops working. Point it at the wrong method and you have built yourself a cheat, so keep it empty unless I have told you what to put in it.

Caveats

Achievements are not free. If your character genuinely never did the thing, nothing unlocks, because vanilla is the one checking.

Retroactive only fills the Any bucket, so difficulty-gated achievements still want a real run at that difficulty.

The only thing this mod writes into your .fch is the stats you asked it to copy forward. If you ran 1.0.0, that build did zero out m_usedCheats and the Cheats counter on your character. Nothing brings those back, and no build since does it again.

Retro copies bucket 0 forward, and bucket 0 counts everything, spawned items included. Vanilla keeps no marker on those rows, so I cannot tell them apart and neither can you. Ignore Cheat Flags credits cheated pickups going forward anyway, so retro is consistent with that rather than a loophole in it, but it is worth knowing what the numbers mean.

Granting an achievement has no undo in the public build. Preview first, that is what it is for.



Feel free to reach out to me on discord if you need manual help. AzumattDev on Discord.

CHANGELOG

Version Update Notes
1.0.2 - The cheat warnings stop lying to you. The achievements panel was still saying "permanently disabled for this character" to people who were earning achievements fine, because it reads the raw flags and never asked the cheat check at all. All five of vanilla's "achievements are disabled" strings are reworded, which covers the console, the HUD popup and the panel in one go. The grey "summoned through cheating means" line on an item tooltip stays, that one is honest.
- Cheated items and cheated meals count now. The hook moved to Achievements.CanGetAchievements(), which is what every stat writer and the build achievement actually ask, and it takes vanilla's per-action cheated flag. Before this, spawning an item and picking it up still quietly dropped the stat.
- IsCheatedAtAll() is not patched at all anymore. It is what the console and setkey read, and touching it is what made 1.0.0 loop in the first place. Left alone it keeps saying you are modded, so the console skips the confirmcheats prompt like it always did, and 1.0.1's scoping workaround is gone with it.
1.0.1 - Fixed the confirmcheats loop. The console reads the same cheat check achievements do, so it kept asking and never accepted the answer. The check steps aside for the duration of a console command, and the terminal behaves like an unmodded game.
- Your character is never locked out. All four cheat terms are ignored for achievements, m_usedCheats after a dev command included.
- Nothing gets cleared. 1.0.0 wiped m_usedCheats and the Cheats counter off your character, which caused the loop and hid real cheating. Removed Clear On Load, Clear On Save, Clear After Command, Clear Cheat Stat and the unshamed clear command. Anything 1.0.0 already erased is gone for good, sorry.
- Nothing is hidden from a server. spawn still stamps the item as cheated and that stamp still travels with it. PlayerProfile.s_bypassCheatChecks is the switch that would stop it and this mod never touches it. The flags all stay on disk, they just do not block achievements.
- Ignore Modded Flag is now Ignore Cheat Flags, since it covers all four checks rather than only Game.isModded. Your old setting will not carry over, check the config if you had changed it.
1.0.0 - Initial Release