God mode off? [Solved]

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
DiVi最強
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Dec 08, 2020 4:23 pm
Contact:

God mode off? [Solved]

Post by DiVi最強 »

Hi, I was playing in a world with cheat enabled to try some design. I activated god mode without thinking too much, but now my character is invisible.
How do I make the character reappear and/or turn off god mode?
Last edited by DiVi最強 on Tue Dec 08, 2020 8:53 pm, edited 1 time in total.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: God mode off?

Post by Jap2.0 »

/c game.player.cheat_mode = false

90737
There are 10 types of people: those who get this joke and those who don't.

Loewchen
Global Moderator
Global Moderator
Posts: 8320
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: God mode off?

Post by Loewchen »

and /c game.player.create_character()

DiVi最強
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Dec 08, 2020 4:23 pm
Contact:

Re: God mode off?

Post by DiVi最強 »

Loewchen wrote:
Tue Dec 08, 2020 5:14 pm
and /c game.player.create_character()
I disabled cheat mode but nothing change. If I also use this command, it does give me an error "Can't set character for non player with non god controller"
I think the character is there but the god mode is enabled.

Loewchen
Global Moderator
Global Moderator
Posts: 8320
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: God mode off?

Post by Loewchen »

How did you enable "god-mode"? What exact command did you use?

DiVi最強
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Dec 08, 2020 4:23 pm
Contact:

Re: God mode off?

Post by DiVi最強 »

Loewchen wrote:
Tue Dec 08, 2020 5:25 pm
How did you enable "god-mode"? What exact command did you use?
/c game.player.character=nil found on the wiki
I likely did some random command without been sure of what it does :shock:

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: God mode off?

Post by Jap2.0 »

DiVi最強 wrote:
Tue Dec 08, 2020 5:48 pm
Loewchen wrote:
Tue Dec 08, 2020 5:25 pm
How did you enable "god-mode"? What exact command did you use?
/c game.player.character=nil found on the wiki
I likely did some random command without been sure of what it does :shock:
Ah, in that case you would want "/c game.player.create_character()" (as found on the wiki). The command above would be if you had used the command "/cheat".
There are 10 types of people: those who get this joke and those who don't.

DiVi最強
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Dec 08, 2020 4:23 pm
Contact:

Re: God mode off?

Post by DiVi最強 »

Jap2.0 wrote:
Tue Dec 08, 2020 7:47 pm
DiVi最強 wrote:
Tue Dec 08, 2020 5:48 pm
Loewchen wrote:
Tue Dec 08, 2020 5:25 pm
How did you enable "god-mode"? What exact command did you use?
/c game.player.character=nil found on the wiki
I likely did some random command without been sure of what it does :shock:
Ah, in that case you would want "/c game.player.create_character()" (as found on the wiki). The command above would be if you had used the command "/cheat".
I tried this one but i have the same error I mentioned before.

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

Re: God mode off?

Post by eradicator »

Code: Select all

/c local p = game.player p.set_controller{type=defines.controllers.character,character=p.surface.create_entity{name='character',force=p.force,position=p.position}}
Your original character is probably still standing around somewhere though if you didn't kill it with fire :p.
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.

DiVi最強
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Dec 08, 2020 4:23 pm
Contact:

Re: God mode off?

Post by DiVi最強 »

eradicator wrote:
Tue Dec 08, 2020 8:39 pm

Code: Select all

/c local p = game.player p.set_controller{type=defines.controllers.character,character=p.surface.create_entity{name='character',force=p.force,position=p.position}}
Your original character is probably still standing around somewhere though if you didn't kill it with fire :p.
Ok, thank this worked! My old character reappeared and I became a new one. I'll live the old one there and play with the new one.

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

Re: God mode off?

Post by eradicator »

DiVi最強 wrote:
Tue Dec 08, 2020 8:53 pm
Ok, thank this worked! My old character reappeared and I became a new one. I'll live the old one there and play with the new one.
You can just shoot + loot it.
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.

DiVi最強
Burner Inserter
Burner Inserter
Posts: 6
Joined: Tue Dec 08, 2020 4:23 pm
Contact:

Re: God mode off?

Post by DiVi最強 »

eradicator wrote:
Tue Dec 08, 2020 9:28 pm
DiVi最強 wrote:
Tue Dec 08, 2020 8:53 pm
Ok, thank this worked! My old character reappeared and I became a new one. I'll live the old one there and play with the new one.
You can just shoot + loot it.
I did it in the end, the only thing is it was annoying having to set all the logistic again.

Post Reply

Return to “Gameplay Help”