Page 1 of 1
Adding more methods to manipulate scripted achievements
Posted: Thu Jul 06, 2017 3:30 am
by Gangsir
Rseding91 asked me to post this here, so I'd like to request the following methods to manipulate achievements, if possible:
- LuaPlayer::disable_achievement() - Takes an achievement, and disables/fails it, showing the failed achievement icon, and preventing it from being unlocked through script or internal means, could be limited to just 'achievement' type or all types, either or.
- (Bonus) Add a way to revert the previous, something like LuaPlayer::enable_achievement()
- (Bonus) Add some way to read if an achievement is already earned by a player, something like an 'achievements' table for each player listing their achievements and status.
I'm sure most of these are done internally, but exposing it to modders for their own achievements would be great.
Thanks so much to whoever ends up implementing this, I'd really appreciate it.
Re: Adding more methods to manipulate scripted achievements
Posted: Thu Jul 06, 2017 6:33 am
by Bilka
Some more bonus points:
- The order parameter, to determine the order of achievements in the achievement list
- The ability to add a description to achievements of the type "achievement" in the locale
Re: Adding more methods to manipulate scripted achievements
Posted: Thu Jul 06, 2017 9:32 am
by Rseding91
Bilka wrote:Some more bonus points:
- The order parameter, to determine the order of achievements in the achievement list
- The ability to add a description to achievements of the type "achievement" in the locale
Unless I'm reading something wrong the order string is already used to order things in the achievements list. After the unlocked/locked status is accounted for.
Re: Adding more methods to manipulate scripted achievements
Posted: Thu Jul 06, 2017 9:56 am
by Bilka
Rseding91 wrote:
Unless I'm reading something wrong the order string is already used to order things in the achievements list. After the unlocked/locked status is accounted for.
I must have missed it when reading through the code, oops.
Re: Adding more methods to manipulate scripted achievements
Posted: Thu Jul 06, 2017 10:34 am
by nucleargen
Bilka wrote:[*] The ability to add a description to achievements of the type "achievement" in the locale[/list]
i think this may be treated as bug, since all other achievements type has description.
Re: Adding more methods to manipulate scripted achievements
Posted: Sun Oct 08, 2017 7:20 am
by Rseding91
I fixed the inability to set the name/description through the prototype for 0.16.
Re: Adding more methods to manipulate scripted achievements
Posted: Sun Oct 08, 2017 9:12 am
by eradicator
Being a bit "paranoid" i'll voice my concerns: If LuaPlayer::disable_achievement() is actually implemented i think it should only work on achievements that the calling mod implements itself. Disabling other mods or vanilla achievements just invites "hardcore" focused mod authors to force their standards on everyone :P. And players would only notice this when it's already too late. Oh, on that issue...it'd be nice if there was some sort of warning message when an achivement is permanently failed (a simple text message would suffice).
Also LuaPlayer::enable_achievement() sounds weird... i'd like to hear an example for a situation where you can post-factum un-fail a condition for an achievement?
Re: Adding more methods to manipulate scripted achievements
Posted: Sun Oct 08, 2017 9:26 am
by Bilka
eradicator wrote:Being a bit "paranoid" i'll voice my concerns: If LuaPlayer::disable_achievement() is actually implemented
No need to voice your concerns, this won't be implemented
Re: Adding more methods to manipulate scripted achievements
Posted: Fri Oct 20, 2017 11:48 am
by eradicator
I'd still kinda like the ability to read the achivement status of a player.
Something like:
game.player.achivements = {'blabla' = true, 'foobar' = false}
Re: Adding more methods to manipulate scripted achievements
Posted: Fri Oct 20, 2017 11:55 am
by Bilka
eradicator wrote:I'd still kinda like the ability to read the achivement status of a player.
Something like:
game.player.achivements = {'blabla' = true, 'foobar' = false}
I don't think that will happen since it's not deterministic
Re: Adding more methods to manipulate scripted achievements
Posted: Tue Jun 25, 2019 5:09 am
by Gangsir
Bumping post per Bilka's request.