Page 1 of 1

Ability To Play A Custom Map Without A Player

Posted: Tue Apr 28, 2015 3:43 am
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").

Re: Ability To Play A Custom Map Without A Player

Posted: Wed Apr 29, 2015 7:06 am
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. :)

Re: Ability To Play A Custom Map Without A Player

Posted: Wed Apr 29, 2015 12:00 pm
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)

Re: Ability To Play A Custom Map Without A Player

Posted: Wed Apr 29, 2015 10:52 pm
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

Re: Ability To Play A Custom Map Without A Player

Posted: Sun Oct 11, 2015 10:48 pm
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

Re: Ability To Play A Custom Map Without A Player

Posted: Mon Oct 12, 2015 8:18 am
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.

Re: Ability To Play A Custom Map Without A Player

Posted: Tue Oct 13, 2015 10:38 pm
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