Reset achievements for UMC campaign?
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
- Spannerbag
- Posts: 546
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Reset achievements for UMC campaign?
Apologies if |I've missed something but it seems to me that once an achievement is set, that's it?
I haven't tested this exhaustively but that's been my experience so far.
Is there a way to unset achievements - or are they auto-unset at some point?
I am working on adding achievements to my campaign Leafsea Burning and I also give the player an in-game bonus if they complete an achievement.
However whilst the WML code to monitor and provide (or not) said bonus will be executed every time the campaign is replayed, the achievements don't seem to reset, tho' I haven't actually yet been able to finish the campaign and re-test as it's a work in progress.
I can manually reset achievements by editing the preferences file and simply deleting the relevant entry:
so if all else fails would it be possible to write a lua routine to modify preferences (assuming it doesn't risk adding potential vulnerabilities to the game)?
In my case this could be called in the first scenario's preload event perhaps?
Any thought/comments greatly appreciated and if this can be done and I've missed it please enlighten me!
Thanks in advance,
-- Spannerbag
I haven't tested this exhaustively but that's been my experience so far.
Is there a way to unset achievements - or are they auto-unset at some point?
I am working on adding achievements to my campaign Leafsea Burning and I also give the player an in-game bonus if they complete an achievement.
However whilst the WML code to monitor and provide (or not) said bonus will be executed every time the campaign is replayed, the achievements don't seem to reset, tho' I haven't actually yet been able to finish the campaign and re-test as it's a work in progress.
I can manually reset achievements by editing the preferences file and simply deleting the relevant entry:
Code: Select all
[achievements]
content_for="LSB"
ids="LCT"
[in_progress]
id="HItop"
progress_at=1
[/in_progress]
[/achievements]
In my case this could be called in the first scenario's preload event perhaps?
Any thought/comments greatly appreciated and if this can be done and I've missed it please enlighten me!
Thanks in advance,
-- Spannerbag
- Pentarctagon
- Project Manager
- Posts: 5581
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Reset achievements for UMC campaign?
It's not currently possible aside from manually editing the preferences file.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
- Spannerbag
- Posts: 546
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Re: Reset achievements for UMC campaign?
Pity... oh well at least I know for sure.Pentarctagon wrote: ↑March 10th, 2024, 4:31 pm It's not currently possible aside from manually editing the preferences file.
Thanks for that, very helpful.
Cheers!
-- Spannerbag
- Spannerbag
- Posts: 546
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Re: Reset achievements for UMC campaign?
Further to my last post, does anyone know if there are any plans to add the capability to clear/reset/unset achievements - and if so, how (WML, lua etc.)?
Cheers!
-- Spannerbag
Cheers!
-- Spannerbag
- Pentarctagon
- Project Manager
- Posts: 5581
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Reset achievements for UMC campaign?
A button or a command line option wouldn't be too hard. Doing it via WML/lua wouldn't be hard either, but I wouldn't want to add that functionality there due to the risk of achievements accidentally getting cleared when they shouldn't be due to a bug or someone deciding to intentionally try to wipe other players' achievements.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
- Spannerbag
- Posts: 546
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Re: Reset achievements for UMC campaign?
Ah, understood.Pentarctagon wrote: ↑March 17th, 2024, 6:18 pm A button or a command line option wouldn't be too hard. Doing it via WML/lua wouldn't be hard either, but I wouldn't want to add that functionality there due to the risk of achievements accidentally getting cleared when they shouldn't be due to a bug or someone deciding to intentionally try to wipe other players' achievements.
I was talking about single player campaigns.
No idea which (if any) of the following are feasible but these thoughts come to mind:
- Add to
[achievement]
the tagresettable
that only allows that[achievement]
to be reset.
I assume undeclared variables always evaluate to false, so existing[achievement]
s cannot be reset by default. - As above but for the whole campaign and set within
[campaign]
tag rather than[achievement]
.
Could be restricted totype=sp
and notmp
orhybrid
. - Alternatively (or as well as) the above, have another
[achievement]
tag;auto_reset
which resets achievement(s) every time the campaign is replayed from the start (I assume this would happen regardless of difficulty).
Again this could be implemented within[campaign]
tag or[achievement]
.
This option removes any player intervention and is setup by the campaign designer.
(OK, a player could edit their local copy but without going into more exotic and complex ideas that would surely be more troublesome to code I'll stop here and get feedback on these suggestions first.)
[achievement]
s for a whole campaign rather than specify individual ones?If so I, at least, would be very happy with that.
I.e. within a given campaign all
[achievement]
s can be reset or not; the same logic applies to them all.I understand these are all WML based solutions, but do you think any are viable?
Cheers!
-- Spannerbag
- Pentarctagon
- Project Manager
- Posts: 5581
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Reset achievements for UMC campaign?
Is there a reason that it needs to be a WML-based solution?
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Reset achievements for UMC campaign?
Without WML, the solution is to show error message to user telling to delete the achievement, and [end_level] defeat at start. WML based deletion would provide better user experience.
Re: Reset achievements for UMC campaign?
The main point here is that currently achievement are not supposed to be reset, for example neither steam nor playstation achievements reset when a player restarts a game, and some players would probably be really upset if they did.
If op wants to give the player a certain bonus during a run for doing something he can always just use a wml variable to remember whether something was achieved in that run or not (in particular for 1.18 which is feature frozen and won't get any changes to the achievements api anymore).
If op wants to give the player a certain bonus during a run for doing something he can always just use a wml variable to remember whether something was achieved in that run or not (in particular for 1.18 which is feature frozen and won't get any changes to the achievements api anymore).
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- Spannerbag
- Posts: 546
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Re: Reset achievements for UMC campaign?
Heh, only because your previous post gave me the impression WML/lua wasn't a favoured option.Pentarctagon wrote: ↑March 18th, 2024, 2:35 pm Is there a reason that it needs to be a WML-based solution?
Apologies if I misunderstood your post.
Cheers!Pentarctagon wrote: ↑March 17th, 2024, 6:18 pm ...Doing it via WML/lua wouldn't be hard either, but I wouldn't want to add that functionality there due to the risk of achievements accidentally getting cleared when they shouldn't be due to a bug or someone deciding to intentionally try to wipe other players' achievements.
-- Spannerbag
- Spannerbag
- Posts: 546
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Re: Reset achievements for UMC campaign?
Ah, hadn't realised that Wesnoth's achievements had to be behaviourally compatible with other platforms. My bad.
However, what I'm proposing would not be compulsory, if campaign designers wanted that behaviour then that could be the default.
I wouldn't want to upset other players but by the same token I feel this could add something to game enjoyment.
gfgtdf wrote: ↑March 18th, 2024, 3:29 pm If op wants to give the player a certain bonus during a run for doing something he can always just use a wml variable to remember whether something was achieved in that run or not (in particular for 1.18 which is feature frozen and won't get any changes to the achievements api anymore).
Yep, I've already put a note in the campaign description in
_main.cfg
:Completing achievements in this campaign garners in-game bonuses.
At present there is no official way to reset achievements.
However, regardless of whether achievements are already completed or not, when playing this campaign the in-game bonuses will always be obtained when the corresponding achievement condition is satisfied.
So, as 1.18 is feature frozen I'll remove the struck-through text above.
Alternatively, would it be preferable to not portray these in-game bonuses as "achievements" because they can be obtained every time the campaign is played (and so aren't really achievements in the Wesnoth sense)?
For me, the important thing is the bonus repeatability, not completing the achievement.
Would appreciate some opinions here - I don't want to clash with player expectations.
Cheers!
-- Spannerbag
Re: Reset achievements for UMC campaign?
Maybe. There are some other campaigns which have something like "achievements" but which aren't actually achievements in the Wesnoth sense. You might want to take a look at how they handle things.Spannerbag wrote: ↑March 19th, 2024, 10:21 am Alternatively, would it be preferable to not portray these in-game bonuses as "achievements" because they can be obtained every time the campaign is played (and so aren't really achievements in the Wesnoth sense)?
Some examples:
- A New Order
- A Sanguine Tale
- Pentarctagon
- Project Manager
- Posts: 5581
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Reset achievements for UMC campaign?
Wesnoth doesn't actually have a concept of a specific playthrough for a campaign - it can't tell if you're playing a campaign for the first time or the eighth time, so if you want something that's specific just to the particular playthrough then you would need to implement that yourself.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Reset achievements for UMC campaign?
I mean it doesn't have to be equivalent for technical reasons, but imo most players would simply expect them to behave the same way as they are used to from other platforms.Spannerbag wrote: ↑March 19th, 2024, 10:21 amAh, hadn't realised that Wesnoth's achievements had to be behaviourally compatible with other platforms. My bad.
However, what I'm proposing would not be compulsory, if campaign designers wanted that behaviour then that could be the default.
I wouldn't want to upset other players but by the same token I feel this could add something to game enjoyment.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- Spannerbag
- Posts: 546
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Re: Reset achievements for UMC campaign?
Heh, nothing that complicated.Pentarctagon wrote: ↑March 19th, 2024, 3:10 pm Wesnoth doesn't actually have a concept of a specific playthrough for a campaign - it can't tell if you're playing a campaign for the first time or the eighth time, so if you want something that's specific just to the particular playthrough then you would need to implement that yourself.
All I'm exploring is whether the option exists to reset achievements each time a player selects a campaign.
(Yes there are considerations regarding whether or not the player is currently part way through the same campaign etc.)
But now I know this is unsupported I'll explore other options.
Thanks for your help.
Cheers!
-- Spannerbag