Adding more methods to manipulate scripted achievements

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
Gangsir
Inserter
Inserter
Posts: 20
Joined: Fri Jul 15, 2016 4:50 pm
Contact:

Adding more methods to manipulate scripted achievements

Post 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.
I'm an administrator over at the Factorio wiki. If you have any questions about the wiki, or concerns, please do not hesitate to contact me. I'm on the subreddit (/r/factorio, /u/Gangsir) as well.

Bilka
Factorio Staff
Factorio Staff
Posts: 3135
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Adding more methods to manipulate scripted achievements

Post 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
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Adding more methods to manipulate scripted achievements

Post 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.
If you want to get ahold of me I'm almost always on Discord.

Bilka
Factorio Staff
Factorio Staff
Posts: 3135
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Adding more methods to manipulate scripted achievements

Post 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.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
nucleargen
Long Handed Inserter
Long Handed Inserter
Posts: 64
Joined: Sat May 07, 2016 4:51 pm
Contact:

Re: Adding more methods to manipulate scripted achievements

Post 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.
The brightest future in the center of a nuclear explosion...2003©nucleargen

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Adding more methods to manipulate scripted achievements

Post by Rseding91 »

I fixed the inability to set the name/description through the prototype for 0.16.
If you want to get ahold of me I'm almost always on Discord.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Adding more methods to manipulate scripted achievements

Post 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?
Last edited by eradicator on Sun Oct 08, 2017 11:44 pm, edited 2 times in total.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Bilka
Factorio Staff
Factorio Staff
Posts: 3135
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Adding more methods to manipulate scripted achievements

Post 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
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Adding more methods to manipulate scripted achievements

Post 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}
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Bilka
Factorio Staff
Factorio Staff
Posts: 3135
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Adding more methods to manipulate scripted achievements

Post 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
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Gangsir
Inserter
Inserter
Posts: 20
Joined: Fri Jul 15, 2016 4:50 pm
Contact:

Re: Adding more methods to manipulate scripted achievements

Post by Gangsir »

Bumping post per Bilka's request.
I'm an administrator over at the Factorio wiki. If you have any questions about the wiki, or concerns, please do not hesitate to contact me. I'm on the subreddit (/r/factorio, /u/Gangsir) as well.

Post Reply

Return to “Modding interface requests”