Someone's LUA-Console


Run lua commands without losing achievements. Now remembers input-script. "game.player" works. By default opens with CONTROL + RIGHTBRACKET. Execute last input-script with CONTROL + ENTER (keybindings configurable).

Utilities
a month ago
0.17 - 2.0
7.03K
Cheats

g ediitor nill

1 year, 1 month ago

When I try activate map editor, game writes "nil" and doesn't run editors mode
Is it possible to run editor with this console?

1 year, 1 month ago
(updated 1 year, 1 month ago)

This is a LUA console and NOT the ingame console.

Its basically executing what you type after /c in the ingame console.

But it actually is possible to change the controller to editor, just not by typing /editor.

try:

game.player.set_controller({type=defines.controllers.editor})

1 year, 1 month ago
(updated 1 year, 1 month ago)

Thank you alot! It works!

But how to close editor? :)
Executing command again dosen't close editor

1 year, 1 month ago

Start by setting yourself to the god controller:

game.player.set_controller({type=defines.controllers.god})

Then mouse-over your body and:

game.player.set_controller({type=defines.controllers.character, character=game.player.selected})

1 year, 1 month ago
(updated 1 year, 1 month ago)

A very non-obvious solution for me :)
Thank you for your help!

1 year, 1 month ago
(updated 1 year, 1 month ago)

Yeah, its more of a tool for modders (and server admins).

2 months ago

I've lost my character's body, is there a way to find it quickly?)

2 months ago

Only if you know what you did to lose it.

Like if you deleted it, its gone. If you switched controllers, its still somewhere, ...

You can try to do a find entity in area and loop over everything and if its your body print its location.

a month ago
(updated a month ago)

Try this (should list all characters on all surfaces; So it should show you where you left your body)

for _, surface in pairs(game.surfaces) do
  for _, entity in pairs(surface.find_entities_filtered({name="character", force=game.player.force})) do
    game.print(entity.name.." found @ "..surface.name.." ("..entity.position.x..", "..entity.position.y..")")
  end
end

New response