Page 1 of 1
Is it possible to read achievement status with mods?
Posted: Sat May 17, 2025 1:44 am
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.
Re: Is it possible to read achievement status with mods?
Posted: Mon May 19, 2025 11:18 pm
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.
Re: Is it possible to read achievement status with mods?
Posted: Fri May 30, 2025 7:30 pm
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.