Ability To Play A Custom Map Without A Player

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
ShadowBlades1
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Apr 28, 2015 3:38 am
Contact:

Ability To Play A Custom Map Without A Player

Post by ShadowBlades1 »

Hey all, I haven't played Factorio in a while and I was wondering if you were still able to play a custom map without the player. Sort of like "God Mode" where you just control the camera and have the functionality of the player. I re-downloaded, launched, started making a custom map, and was unable to find a player entity as I did before, but instead a spawn point flag.
I'm not sure if it was because multiplayer was implemented or something else.

Before you were able to place a player entity and edit options about the player (that's where the setting was to play in "God Mode").

El-Lobo
Inserter
Inserter
Posts: 23
Joined: Mon Dec 29, 2014 8:56 am
Contact:

Re: Ability To Play A Custom Map Without A Player

Post by El-Lobo »

- create map "insertnamehere"
- copy the files and folders from "C:\Program Files\Factorio\data\base\scenarios\sandbox" (or your installation path) to
C:\Users\"yourname"\AppData\Roaming\Factorio\scenarios\"insertnamehere"
- map can now be found under custom scenarios

Maybe there is another way to do it, but this way works for me. :)

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5221
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Ability To Play A Custom Map Without A Player

Post by Klonan »

You can kill the player character and act as a god by adding something like thi sin the control.lua of your scenario/savegame

Code: Select all

game.onevent(defines.events.onplayercreated, function(event)
  local player = game.getplayer(event.playerindex)
  local character = player.character
  player.character = nil
  if character then character.destroy() end
end)

ShadowBlades1
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Apr 28, 2015 3:38 am
Contact:

Re: Ability To Play A Custom Map Without A Player

Post by ShadowBlades1 »

Hmm, and maybe it's because I suck but I was unable to get either of these solutions to work.

The map never showed up after copying it to the Roaming/Factorio/... directory. (There was not one to begin with if that matters).

And I didn't have a control.lua file in my scenario, just a blueprint.dat
I tried copying the one from the sandbox directory since that type of control is what I'm looking for, but it didn't do anything.

Thanks

gabrieljaghnoun
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Oct 11, 2015 10:42 pm
Contact:

Re: Ability To Play A Custom Map Without A Player

Post by gabrieljaghnoun »

doing this by El-Lobo
- create map "insertnamehere"
- copy the files and folders from "C:\Program Files\Factorio\data\base\scenarios\sandbox" (or your installation path) to
C:\Users\"yourname"\AppData\Roaming\Factorio\scenarios\"insertnamehere"
- map can now be found under custom scenarios

Maybe there is another way to do it, but this way works for me. :)
worked for me
the Appdata id hidden so you have to unhide it in order to do this

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: Ability To Play A Custom Map Without A Player

Post by Adil »

Saves and custom maps can be located in factorio own folder as well, depending on your settings. Check scenarios folder as well. If you find the right place copypasting sandbox control.lua should work, it's where Klonan's code comes from (albeit from outdated version).

Also it may be worth it to wrap you scenario in a mod (make a mod folder and put scenario folder in it). This way you'll have the ability to use migration functionality to update and fix your map scripting.

If you want to make something funny with your custom map, consider getting acquaintanced with modding interface as the editor alone might be a little too limited.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

terie
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Oct 13, 2015 10:17 pm
Contact:

Re: Ability To Play A Custom Map Without A Player

Post by terie »

Hello everyone I am just new here. I have no idea yet with custom map and so far I am reviewing some of the posts here to give me inputs that might help me in the nexr few days.

__________________
nunchucks

Post Reply

Return to “Gameplay Help”