About Achievements

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
allisonrose
Posts: 32
Joined: Wed Nov 14, 2018 8:27 pm

About Achievements

Post by allisonrose »

Hi there!
I've been working with DS using the visual novel framework and have a couple questions about the achievement system.

1. Can I keep the achievements from saving across multiple games? I only want them to be used in a single playthrough then wiped on a new game.

2. How might I go about setting it up so that an achievement only unlocks after multiple conditions are passed? For example, player must talk to the cat 3 times before they get the achievement "friend of animals" or something like that.


Thanks!
User avatar
Tony Li
Posts: 22099
Joined: Thu Jul 18, 2013 1:27 pm

Re: About Achievements

Post by Tony Li »

Hi!
allisonrose wrote: Sat Jan 19, 2019 12:29 pm1. Can I keep the achievements from saving across multiple games? I only want them to be used in a single playthrough then wiped on a new game.
In the next release, I can add that back as an option. That was actually the way it was first implemented, but the general response was that people wanted it saved independently from individual saved games. It'll be a checkbox on the Achievements component.
allisonrose wrote: Sat Jan 19, 2019 12:29 pm2. How might I go about setting it up so that an achievement only unlocks after multiple conditions are passed? For example, player must talk to the cat 3 times before they get the achievement "friend of animals" or something like that.
Normally you'll use the UnlockAchievement() command in a dialogue entry's Script field, like:
  • Dialogue Text: "Hi, cat."
  • Script:

    Code: Select all

    UnlockAchievement("Cat Lady")
It's a little more complicated, but you can do this:
  • Dialogue Text: "Hi, cat."
  • Script:

    Code: Select all

    Variable["GreetedCat"] = Variable["GreetedCat"] + 1;
    if (Variable["GreetedCat"] == 3) then UnlockAchievement("Cat Lady") end
allisonrose
Posts: 32
Joined: Wed Nov 14, 2018 8:27 pm

Re: About Achievements

Post by allisonrose »

Tony Li wrote: Sat Jan 19, 2019 12:46 pm In the next release, I can add that back as an option. That was actually the way it was first implemented, but the general response was that people wanted it saved independently from individual saved games. It'll be a checkbox on the Achievements component.
Great!
For most games, the way it is now makes sense. But In my case, I am using the achievement system to unlock personality traits (kinda like renegade/paragon in mass effect) so the player won't want them to carry over if they play again.


Tony Li wrote: Sat Jan 19, 2019 12:46 pm It's a little more complicated, but you can do this:
Dialogue Text: "Hi, cat."
Script:
CODE: SELECT ALL

Variable["GreetedCat"] = Variable["GreetedCat"] + 1;
if (Variable["GreetedCat"] == 3) then UnlockAchievement("Cat Lady") end

Awesome! I will test this out, but it looks pretty straight forward.
WhiteDraco
Posts: 2
Joined: Mon Nov 04, 2019 3:14 pm

Re: About Achievements

Post by WhiteDraco »

Sorry to revive an old thread - but I wanted to find out if there was ever a solution for clearing the achievements on every new game? I tried to search but couldn't find anything. Apologies if I missed it!

I'd like my achievements to be cleared whenever a new game is started, but am unsure how to do this manually. Is there a manual command I can use to clear PlayerPrefs for achievements on game start?

Thanks in advance
User avatar
Tony Li
Posts: 22099
Joined: Thu Jul 18, 2013 1:27 pm

Re: About Achievements

Post by Tony Li »

Hi,

I just pushed up version 2.0.4.4, which adds a checkbox to the Achievements component. If it's ticked, the achievements are reset when starting a new game.
WhiteDraco
Posts: 2
Joined: Mon Nov 04, 2019 3:14 pm

Re: About Achievements

Post by WhiteDraco »

Great! Thanks a ton
User avatar
Tony Li
Posts: 22099
Joined: Thu Jul 18, 2013 1:27 pm

Re: About Achievements

Post by Tony Li »

Glad to help!
windwalking
Posts: 6
Joined: Tue Mar 26, 2024 6:31 am

Re: About Achievements

Post by windwalking »

Very sorry to ask on such an old thread. But I can't find any reference to achievement system. Is that part of the dialogue system or a separate asset? I am trying to do something similar and would love to know if its available.
User avatar
Tony Li
Posts: 22099
Joined: Thu Jul 18, 2013 1:27 pm

Re: About Achievements

Post by Tony Li »

Hi,

The VN Starter Framework (available on the Dialogue System Extras page) has a very simple local achievements system. But apart from that, the Dialogue System doesn't have an achievements system.
Post Reply