A flag to allow achievements despite commands

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
DoubleThought
Inserter
Inserter
Posts: 48
Joined: Fri Mar 01, 2019 1:14 pm
Contact:

A flag to allow achievements despite commands

Post by DoubleThought »

Part of testing mods is testing if achievements work. However, particularly difficult achievements are difficult to test, as in-game achievements are disabled by when using lua commands, editor mode, or scenarios. For example, if a Pyanodon's developer wishes to test the "Win the game" achievement, they will need to complete a full Pyanodon's runthrough from scratch. This interface requests seeks to ease this difficulty.

This interface request seeks to allow mod developers to be able to test the activation of achievements even when "cheat" tools are used, such as lua commands or editor mode. However, by default, such tools should still disable achievements. A few proposals for how to achieve this are listed below:

- A mod might be able to set a prototype flag to allow achievements with cheat tools.
- The Factorio executable, if launched with a CLI flag, might allow achievements with cheat tools
- A mod might be able to set a flag on scenarios, allowing the scenario to activate achievements
- Instrument mode might make Factorio always display achievements, even if cheat tools are used, or it might be a requirement for enabling this testing mode.

As an ease-of-use feature, perhaps achievements gained this way are only displayed to the screen and stored in memory, not written to disk.

In all cases, Steam achievements should not be able to be granted when achievement testing.
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: A flag to allow achievements despite commands

Post by Bilka »

Use Lua commands/features in the mod or something like https://mods.factorio.com/mod/eradicators-sudo. A simple Lua command worked pretty well when I helped with dev for a mod that added more achievements: https://github.com/Sublimelime/Achiever ... ontrol.lua
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Modding interface requests”