Admin Commands

by Solly

Adds the "/ac" command, which allows admins to run Lua commands without disabling achievements. Intended to be used for admins to control a server. Keep in mind that "game.player" will not work with this mod. Instead, you must use "game.players[Username/ID]".

Content
5 years ago
0.16 - 0.17
14
Cheats

i How to use /editor ?

5 years ago
(updated 5 years ago)

Thank you for nice mod.
Is there a way to use these commands?

/editor
/cheat
/measured-command
/silent-command

and would be nice if mod has locale file to localize print messages.
I hope the mod setting has a option what can start with ./ instead of /ac
(like CommandExecute mod https://mods.factorio.com/mod/CommandExecute)

5 years ago
(updated 5 years ago)

Hello, thank you for being interested in this mod - I will have a look at adding those features.
To enable cheat mode, use "/ac game.players["USERNAME"].cheat_mode=true"
To enable edit mode, use "/ac game.players["USERNAME"].set_controller{type=defines.controllers.editor}", however enabling edit mode WILL DISABLE ACHIEVEMENTS.
Currently the mod does not have measured or silent command functionality.

5 years ago

1.6?

5 years ago
(updated 5 years ago)

0.17, if you mean game version

5 years ago

Does it work on 1.6?

5 years ago

If you mean 0.16, I don't see any reason why it wouldn't. I'll test it and update it to support those versions tomorrow.

5 years ago
(updated 5 years ago)

Thank you for reply.
"/editor" is toggle editor.
How can I disable edit mode using "/ac" command?
and cheat_mode is different to new added "/cheat" in 0.17
Is there a way to use "/cheat" with "/ac"?

5 years ago
(updated 5 years ago)

To disable edit mode, use "/ac local name="USERNAME" game.players[name].set_controller{type=defines.controllers.god} game.players[name].create_character()".
"/cheat" runs lots of smaller cheats at once. Any commands from https://wiki.factorio.com/Console works, as long as you replace "/c" with "/ac" and "game.player" with "game.players["USERNAME"]".

5 years ago

The mod has been updated with silent commands, localisation (Currently only has English locale), and 0.16 support.

5 years ago

Thank you for update and how to disable editor.
Would be nice if mod can automatically convert "game.player" to "game.players[Username]" (if possible).
I expect to be added option for using "./c" instead of "/ac".
normal command: /c <some command>
hope: ./c <some command> (. + same sentence)
ac command: /ac <some command> (/ + a + same sentence)
and also Thank you for added locale.

New response