this post was submitted on 30 Oct 2024
221 points (97.8% liked)

Stardew Valley

564 readers
36 users here now

Welcome to Stardew Valley Lemmy and Mbin Community.

This community is for the game Stardew Valley, which is developed and published by ConcernedApe. Feel free to post Arts, Question or Your farm. Also make sure you read our rules before posting.

Rules:


Official Links

Purchase Links

Tools and Resources

founded 1 month ago
MODERATORS
221
submitted 3 weeks ago* (last edited 3 weeks ago) by sag@lemm.ee to c/stardewvalley@lemm.ee
 
you are viewing a single comment's thread
view the rest of the comments
[–] clay_pidgin@sh.itjust.works 7 points 3 weeks ago (3 children)

Are achievements basically just variables like "beat_final_boss", and you expose them somehow to steam?

[–] Mozingo@lemmy.world 21 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

It's a little different for steam/xbox/ps, but generally there's two kinds of achievements. Trigger achievements and value achievements.

The trigger type ones are the ones that fire once, like when you beat a level or get a certain item or something. These basically have an api call like TriggerAcheivement(achievementID).

The value type ones are the ones like collect 1000 gold or kill 500 enemies. You could choose to handle this manually, and then just fire an achievement trigger, but this usually becomes complicated with multiple saves or crossplay, etc. So instead, there's an api call like IncreaseStat(statID, 1). And you call that when you kill an enemy or whatever and once it's been called 500 times, the achievement activates.

You usually set all the achievements/stats up in the steam/xbox/ps backend and then your game is just responsible for calling those api functions when appropriate.

[–] knova@infosec.pub 5 points 3 weeks ago

I’ve always been curious about this myself.

[–] Voyajer@lemmy.world 3 points 3 weeks ago* (last edited 3 weeks ago)