How could Achievements be wiped but not the Gallery?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
- Newbie
- Posts: 18
- Joined: Fri May 31, 2019 12:16 am
- Completed: The Nine Lives of Nim: Fortune's Fool , Wonderland Nights: White Rabbit's Diary
- Projects: Her Jentle Hi-ness
- Tumblr: skybeargames
- itch: skybeargames
- Location: New Zealand
- Contact:
How could Achievements be wiped but not the Gallery?
Hi all, first time question poster, long time lurker.
I've got a friend I've made on Twitter who has an unusual conundrum with one of my games, and I just cannot figure out what is up with her problem.
The game is The Nine Lives of Nim: Fortune's Fool. This person has played it, unlocked all the achievements, and then updated the game when I released the voice acting update to find that all her achievements are gone in the game's internal achievements record. Steam still has them unlocked though.
BUT, to complicate matters, the galleries in the game are still all filled in!
I'm very confused. I was under the impression that the Achievements API uses persistent data. The only difference I can see in how I programmed my achievements screen and my gallery screen is that the gallery is looking at persistent image unlock variables, and my achievements index is looking at achievement.has. How can one be unlocked, but the other suddenly be locked after an update?
Now, there are a few more complicating factors that I have gleaned from talking to her.
1) It seems another non-Ren'py game is having the same problem for her, internal achievements are showing as locked but Steam says she has them. I asked if she wiped her caches or anything, she can't remember doing so. She's playing on the same machine as before.
2) The game did have a name/branding change after initial release. She unlocked everything before the name change in November last year. I have no idea if this would have any impact. I didn't change any code around the gallery or achievements areas in any of the updates (art upgrade and name change November last year, voice acting update last month).
Does anyone have any ideas? I've tried a bunch of hypotheticals but nothing is working for me. achievements.sync() and achievements.Sync() don't seem to make a difference. Very strange!!
(P.S. I am totally expecting the answer to be something that is going to make me kick myself )
I've got a friend I've made on Twitter who has an unusual conundrum with one of my games, and I just cannot figure out what is up with her problem.
The game is The Nine Lives of Nim: Fortune's Fool. This person has played it, unlocked all the achievements, and then updated the game when I released the voice acting update to find that all her achievements are gone in the game's internal achievements record. Steam still has them unlocked though.
BUT, to complicate matters, the galleries in the game are still all filled in!
I'm very confused. I was under the impression that the Achievements API uses persistent data. The only difference I can see in how I programmed my achievements screen and my gallery screen is that the gallery is looking at persistent image unlock variables, and my achievements index is looking at achievement.has. How can one be unlocked, but the other suddenly be locked after an update?
Now, there are a few more complicating factors that I have gleaned from talking to her.
1) It seems another non-Ren'py game is having the same problem for her, internal achievements are showing as locked but Steam says she has them. I asked if she wiped her caches or anything, she can't remember doing so. She's playing on the same machine as before.
2) The game did have a name/branding change after initial release. She unlocked everything before the name change in November last year. I have no idea if this would have any impact. I didn't change any code around the gallery or achievements areas in any of the updates (art upgrade and name change November last year, voice acting update last month).
Does anyone have any ideas? I've tried a bunch of hypotheticals but nothing is working for me. achievements.sync() and achievements.Sync() don't seem to make a difference. Very strange!!
(P.S. I am totally expecting the answer to be something that is going to make me kick myself )
Re: How could Achievements be wiped but not the Gallery?
Haven't seen your code, could you have defined or make default your persistent achievement variables? It's hard to tell what's wrong this way.
Despite what's causing the problem, you might want to let players regain their achievements in-game by checking them in init:
Somewhere along those lines should make up for their lost achievements.
Despite what's causing the problem, you might want to let players regain their achievements in-game by checking them in init:
Code: Select all
If achievement.has("achievement_name") and not persistent.achievementname:
#Make the persistent variable to true again
-
- Newbie
- Posts: 18
- Joined: Fri May 31, 2019 12:16 am
- Completed: The Nine Lives of Nim: Fortune's Fool , Wonderland Nights: White Rabbit's Diary
- Projects: Her Jentle Hi-ness
- Tumblr: skybeargames
- itch: skybeargames
- Location: New Zealand
- Contact:
Re: How could Achievements be wiped but not the Gallery?
Hey, I appreciate the difficulty with not showing my code, I'll do so if I can think of where it's going to be important because it's a lot of code we're talking about here. But I'll show relevant samples below, thanks.
So I don't have any Achievement persistent values. I was relying solely on the Achievements API to do that. No problems with it up until now. Reading the documentation it says that "By default, the achievement stores information in the persistent file". I'm wondering if the next thing to try is registering the achievements right at the top of the game, rather than immediately before granting them. Maybe if I sync after that, it will make it all pop back in?
Here is how I grant achievements:
$ achievement.grant("My spirits, as in a dream")
$ achievement.register("My spirits, as in a dream")
$ achievement.sync()
Here is how I unlock a gallery picture:
scene bg faerie with fade
$ persistent.unlock_faeriebg = True
Here is how I have coded my achievements screen:
if achievement.has("Fortune's Cat"):
text "{color=#ab944c}You have finished the Friend of Cats storyline.{/color}"
else:
text "You have not finished the Friend of Cats storyline."
For making my gallery I used Dirchansky's Gallery tutorial: https://dirchansky.itch.io/come-for-a-d ... l-tutorial
So I don't have any Achievement persistent values. I was relying solely on the Achievements API to do that. No problems with it up until now. Reading the documentation it says that "By default, the achievement stores information in the persistent file". I'm wondering if the next thing to try is registering the achievements right at the top of the game, rather than immediately before granting them. Maybe if I sync after that, it will make it all pop back in?
Here is how I grant achievements:
$ achievement.grant("My spirits, as in a dream")
$ achievement.register("My spirits, as in a dream")
$ achievement.sync()
Here is how I unlock a gallery picture:
scene bg faerie with fade
$ persistent.unlock_faeriebg = True
Here is how I have coded my achievements screen:
if achievement.has("Fortune's Cat"):
text "{color=#ab944c}You have finished the Friend of Cats storyline.{/color}"
else:
text "You have not finished the Friend of Cats storyline."
For making my gallery I used Dirchansky's Gallery tutorial: https://dirchansky.itch.io/come-for-a-d ... l-tutorial
- Ocelot
- Lemma-Class Veteran
- Posts: 2402
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: How could Achievements be wiped but not the Gallery?
This is something really strange. Are you sure that you don't call achievement.clear_all() anywhere? This is the only thing I can think about. Also it looks like your game does not properly connect to Steam there: achievement.has returns True if achievement is granted in any backend, be it persistent data, or steam.
Syncing achievements tries to grant steam achievements unlocked in persistent data, so it would not help there.
Syncing achievements tries to grant steam achievements unlocked in persistent data, so it would not help there.
< < insert Rick Cook quote here > >
-
- Newbie
- Posts: 18
- Joined: Fri May 31, 2019 12:16 am
- Completed: The Nine Lives of Nim: Fortune's Fool , Wonderland Nights: White Rabbit's Diary
- Projects: Her Jentle Hi-ness
- Tumblr: skybeargames
- itch: skybeargames
- Location: New Zealand
- Contact:
Re: How could Achievements be wiped but not the Gallery?
Nope, no clear_all, but that's a fair call
That is interesting to hear that it's not connecting properly with just achievement.has on the achievements screen. And also, achievement.has is how I grant certain new game plus features. So... the problem is with achievement.has? Do you think? Is there something I have to do to connect it up again? Did something change in a Ren'py update perhaps?
That is interesting to hear that it's not connecting properly with just achievement.has on the achievements screen. And also, achievement.has is how I grant certain new game plus features. So... the problem is with achievement.has? Do you think? Is there something I have to do to connect it up again? Did something change in a Ren'py update perhaps?
Re: How could Achievements be wiped but not the Gallery?
What do you mean you use achievement.has to grant other features? This statement only checks for the achievement, returning true if unlocked. For granting you use achievement.grant, not has... It might help if you could show the codes where you unlock achievements, "grant other features," as well as the code of the screen where you check for them.skybeargames wrote: ↑Tue Jun 08, 2021 11:19 pm Nope, no clear_all, but that's a fair call
That is interesting to hear that it's not connecting properly with just achievement.has on the achievements screen. And also, achievement.has is how I grant certain new game plus features. So... the problem is with achievement.has? Do you think? Is there something I have to do to connect it up again? Did something change in a Ren'py update perhaps?
-
- Newbie
- Posts: 18
- Joined: Fri May 31, 2019 12:16 am
- Completed: The Nine Lives of Nim: Fortune's Fool , Wonderland Nights: White Rabbit's Diary
- Projects: Her Jentle Hi-ness
- Tumblr: skybeargames
- itch: skybeargames
- Location: New Zealand
- Contact:
Re: How could Achievements be wiped but not the Gallery?
No problem, here we go:
Here is how I grant achievements:
Here is how I have coded my achievements screen:
Here is how I grant special bonuses for new game plus:
Here is how I grant achievements:
Code: Select all
$ achievement.grant("My spirits, as in a dream")
$ achievement.register("My spirits, as in a dream")
$ achievement.sync()
Code: Select all
if achievement.has("Fortune's Cat"):
text "{color=#ab944c}You have finished the Friend of Cats storyline.{/color}"
else:
text "You have not finished the Friend of Cats storyline."
Code: Select all
if achievement.has("Fortune's Cat"):
$ KNO += 3
Re: How could Achievements be wiped but not the Gallery?
Hmm I don't immediately see any problem with the code... Just to make sure, if you clear persistent and test these achievements yourself, they work as intended right?
You also said that you changed the game name/branding, where specifically did the change happen in? options.rpy? If so, I wonder if the Renpy achievement module has something to do with the game's name...
We can do some elimination first then ask in the Discord server!
You also said that you changed the game name/branding, where specifically did the change happen in? options.rpy? If so, I wonder if the Renpy achievement module has something to do with the game's name...
We can do some elimination first then ask in the Discord server!
-
- Newbie
- Posts: 18
- Joined: Fri May 31, 2019 12:16 am
- Completed: The Nine Lives of Nim: Fortune's Fool , Wonderland Nights: White Rabbit's Diary
- Projects: Her Jentle Hi-ness
- Tumblr: skybeargames
- itch: skybeargames
- Location: New Zealand
- Contact:
Re: How could Achievements be wiped but not the Gallery?
Yep, my achievements do unlock as expected if I clear persistence and re-unlock them.
Good idea, here is what I have in options.rpy:
The original release:
The latest release:
Not sure about whether the Achievements module relies on them. I do know it needs the steamappid but that's definitely correct in both releases.
Good idea, here is what I have in options.rpy:
The original release:
Code: Select all
define config.name = _("Prince of Cats")
define build.name = "PrinceOfCats"
Code: Select all
define config.name = _("The Nine Lives of Nim: Fortune's Fool")
define build.name = "FortunesFool"
Re: How could Achievements be wiped but not the Gallery?
Maybe experiment by creating a new game. Unlock the achievements with the same code, change those name configurations, then launch the game again and check if the achievements are lost. If you can't replicate it, the problem is most probably on the users side (can't think of anything else that would cause this problem!)
-
- Newbie
- Posts: 18
- Joined: Fri May 31, 2019 12:16 am
- Completed: The Nine Lives of Nim: Fortune's Fool , Wonderland Nights: White Rabbit's Diary
- Projects: Her Jentle Hi-ness
- Tumblr: skybeargames
- itch: skybeargames
- Location: New Zealand
- Contact:
Re: How could Achievements be wiped but not the Gallery?
Thanks emz911, I'll give it a go when I get a chance and post up here how it goes. I'm not sure it will happen for me because it was just that one user experiencing it. But QA life continues
-
- Newbie
- Posts: 18
- Joined: Fri May 31, 2019 12:16 am
- Completed: The Nine Lives of Nim: Fortune's Fool , Wonderland Nights: White Rabbit's Diary
- Projects: Her Jentle Hi-ness
- Tumblr: skybeargames
- itch: skybeargames
- Location: New Zealand
- Contact:
[Solved] Re: How could Achievements be wiped but not the Gallery?
Heya I just wanted to update you guys who were helping me.
I got another bug report from a different user, this time someone who was a brand-new user who wasn't getting the achievements to unlock on Steam. So I knew it had to be something with the connection to Steam itself that was messed up.
Did some reading and realised something had changed between updates: the usage of define config.steam_appid rather than just putting it in a .txt file in your ren'py directory which was the old way of doing it.
So now not only do achievements unlock for the new user, but the achievements page is now fully unlocked for the user who already achieved everything prior to this latest update.
Thanks team, and as my toddler would say "All doney".
I got another bug report from a different user, this time someone who was a brand-new user who wasn't getting the achievements to unlock on Steam. So I knew it had to be something with the connection to Steam itself that was messed up.
Did some reading and realised something had changed between updates: the usage of define config.steam_appid rather than just putting it in a .txt file in your ren'py directory which was the old way of doing it.
So now not only do achievements unlock for the new user, but the achievements page is now fully unlocked for the user who already achieved everything prior to this latest update.
Thanks team, and as my toddler would say "All doney".
Re: How could Achievements be wiped but not the Gallery?
Nice to know!!! I certainly needed this information before updating my game lol. I do wonder if we should post this reminder, as well as updates like being able to download the SDK now directly from the launcher, under the Steam Achievements Guide (somewhat outdated but extremely useful) for others who might need the information: viewtopic.php?f=51&t=50060#p486320
- Bertran
- Regular
- Posts: 33
- Joined: Tue May 02, 2017 12:58 pm
- Projects: Run, Kitty!
- Deviantart: bertranway
- Skype: bertranway
- Contact:
Re: [Solved] Re: How could Achievements be wiped but not the Gallery?
skybeargames wrote: ↑Mon Jun 28, 2021 5:59 pm Heya I just wanted to update you guys who were helping me.
I got another bug report from a different user, this time someone who was a brand-new user who wasn't getting the achievements to unlock on Steam. So I knew it had to be something with the connection to Steam itself that was messed up.
Did some reading and realised something had changed between updates: the usage of define config.steam_appid rather than just putting it in a .txt file in your ren'py directory which was the old way of doing it.
So now not only do achievements unlock for the new user, but the achievements page is now fully unlocked for the user who already achieved everything prior to this latest update.
Thanks team, and as my toddler would say "All doney".
You mean, somewhere in the script of the game I should paste
define config.steam_appid = 1630630
?
Also, if I put .txt file also, it still will work on Mac?
-
- Newbie
- Posts: 18
- Joined: Fri May 31, 2019 12:16 am
- Completed: The Nine Lives of Nim: Fortune's Fool , Wonderland Nights: White Rabbit's Diary
- Projects: Her Jentle Hi-ness
- Tumblr: skybeargames
- itch: skybeargames
- Location: New Zealand
- Contact:
Re: [Solved] Re: How could Achievements be wiped but not the Gallery?
Yes to the first part. I put it in my options.rpy personally.
I can't vouch for the last part sorry as I don't have a Mac to test on, but I did leave the txt file in the folder rather than delete it, just in case it would somehow break something.
Who is online
Users browsing this forum: No registered users