Is it possible to read achievement status with mods?

Place to get help with not working mods / modding interface.
atarihomestar1
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat May 17, 2025 1:40 am
Contact:

Is it possible to read achievement status with mods?

Post by atarihomestar1 »

I'm working on my first mod and I want to be able to read the status of achievements, specifically to know which ones are pinned by the user. Is this currently supported? I've checked the API docs and haven't been able to find anything, but I thought I'd ask here.
Osmo
Long Handed Inserter
Long Handed Inserter
Posts: 60
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: Is it possible to read achievement status with mods?

Post by Osmo »

There does indeed seem to be no way of reading whether a certain achievement is gained. There is an event for it, but this wouldn't count achievements gained before your mod got added to the save https://lua-api.factorio.com/latest/eve ... ent_gained

You could make an api request to get a per-player read of whether an achievement is gained, however whether they are pinned may not even be part of the game state, in which case its unlikely to be added.
atarihomestar1
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat May 17, 2025 1:40 am
Contact:

Re: Is it possible to read achievement status with mods?

Post by atarihomestar1 »

Osmo wrote: Mon May 19, 2025 11:18 pm There does indeed seem to be no way of reading whether a certain achievement is gained. There is an event for it, but this wouldn't count achievements gained before your mod got added to the save https://lua-api.factorio.com/latest/eve ... ent_gained

You could make an api request to get a per-player read of whether an achievement is gained, however whether they are pinned may not even be part of the game state, in which case its unlikely to be added.
Thanks, after thinking about it what I can do is make mod settings so the player can select the achievements they want the mod to protect, then I can use the on_achievement_gained event to disable the mod setting for that achievement.
Post Reply

Return to “Modding help”