God mode to player mode

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
omicronus
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Sep 13, 2015 10:43 am
Contact:

God mode to player mode

Post by omicronus »

Hello,

Okay so I've searched Google for this problem naturally. Using version 0.12.6 with Bobs mods, autofill, morelight, landfill. I've basically created a map. Played it as a character. Then decided to do some changes, so edited the map and now when I load it up I'm just a God thingy. I tried a few commands I've seen from Reddit such as /c game.players[1].character = game.createentity({name="player", position={0,0}}) in lua command console but just comes back as 'LuaGameScript doesn't contain key createentity

Am I doing something wrong here? Is that even right? Tried looking on the wiki but it's a blank page for some reason.

Any help appreciated!
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: God mode to player mode

Post by prg »

Not sure if it will help in your case, but in 0.12 underscores got added everywhere so it's now create_entity.
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
omicronus
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Sep 13, 2015 10:43 am
Contact:

Re: God mode to player mode

Post by omicronus »

Thanks but just tried that and still says the same; 'LuaGameScript doesn't contain key create_entity.'
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: God mode to player mode

Post by prg »

Oh, right. Also in 0.12, different surfaces were introduced, so try something like

Code: Select all

/c game.players[1].character = game.surfaces.nauvis.create_entity({name="player", position={0,0}})
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
omicronus
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Sep 13, 2015 10:43 am
Contact:

Re: God mode to player mode

Post by omicronus »

Thank you! That worked! Except now I can't pick up anything, says 'Can't open enemy structures'. Anyway to fix that?
User avatar
prg
Filter Inserter
Filter Inserter
Posts: 947
Joined: Mon Jan 19, 2015 12:39 am
Contact:

Re: God mode to player mode

Post by prg »

Try /c game.player.force="player"
Automatic Belt (and pipe) Planner—Automate yet another aspect of constructing your factory!
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5406
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: God mode to player mode

Post by Klonan »

Or try

Code: Select all

/c game.local_player.force = game.forces.player 
omicronus
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Sep 13, 2015 10:43 am
Contact:

Re: God mode to player mode

Post by omicronus »

Thanks so much! Appreciate the help! Just need to reset my research now since my toolbelt is back to one bar again.

But thanks again! :D
Post Reply

Return to “Technical Help”