Page 1 of 1

[0.16.25] Couldn't find suitable position to put the player

Posted: Fri Feb 23, 2018 12:01 pm
by Jon8RFC
While setting up a sandbox scenario, I set all of the terrain settings to "none" (just to make it simple for my old computer), and this happened.
Couldn't find suitable position to put the player in the perimeter of 200 tiles from the point {0.0000000000,
0.0000000000}
I guess you could force something to be created even if the user picks "none" for everything, but maybe a blank/black background would work as well.

Re: [0.16.25] Couldn't find suitable position to put the player

Posted: Fri Feb 23, 2018 12:21 pm
by mrvn
While by setting everything to none you deserve what you get I have to wonder: It's a sandbox. There is no player.

Re: [0.16.25] Couldn't find suitable position to put the player

Posted: Fri Feb 23, 2018 1:46 pm
by boskid
mrvn: look at this part of sandbox script:

Code: Select all

script.on_event(defines.events.on_player_created, function(event)
  local player = game.players[event.player_index]
  local character = player.character
  player.character = nil
  if character then
    character.destroy()
  end
  -- [..]
end)
This means game always spawns player character, but in sandbox it is then immediately removed. Before it is removed, it must be placed somewhere

Re: [0.16.25] Couldn't find suitable position to put the player

Posted: Fri Feb 23, 2018 1:54 pm
by mrvn
I wish the sandbox would ask before removing the player or have a button to create/destroy it.

Re: [0.16.25] Couldn't find suitable position to put the player

Posted: Fri Feb 23, 2018 2:50 pm
by posila
mrvn wrote:I wish the sandbox would ask before removing the player or have a button to create/destroy it.
Just do

Code: Select all

/c game.player.cheat_mode = true
/c game.player.force.research_all_technologies()
/c game.player.surface.always_day = true
in freeplay and you have sandbox with player character.

Re: [0.16.25] Couldn't find suitable position to put the player

Posted: Fri Feb 23, 2018 3:18 pm
by Jon8RFC
Not a bug, so this is working correctly?

The reason I know why it didn't work, is because I spent a few minutes figuring it out before posting the report to save you time on providing a fix or correction to prevent the issue. I certainly didn't know why it didn't work, but assumed it must've been one of the MANY options I selected. So, I went through and loaded a bunch of different games to determine what exactly was causing it. If that's the expected procedure, then I'm pretty disappointed.

For example, if you give the user an option to "make the background a factorio logo, or none" and I choose none, and the game doesn't work, is that considered working correctly?

Re: [0.16.25] Couldn't find suitable position to put the player

Posted: Fri Feb 23, 2018 3:34 pm
by mrvn
It's doing what you told it to so in a sense it's working correctly.
It's not doing what would be best, so in that sense it's not working correctly.

Here is what the problem is:

The map generator generates a map. The game then sets a spawn point (x=0, y=0 in your case) and then looks for a place near there to place the player. It only look around for 200 tiles. If none of that tiles in that range allow placing the player it gives up with the error you saw. This really shouldn't happen normally but it might. You might start in the middle of a huge ocean. The game could add some suitable tile to place the player. But then you are standing on a 1x1 island and the game would be unplayable. So instead you get the error message and it gives up.

Now since you disabled all terrain types the map generator doesn't generate anything suitable anywhere and you force the above failure to happen. In this special case of everything turned to NONE it could make sense to add a single grass tile or something. Alternatively the New Game dialog could simply not allow such a collection of settings. (Would that break SeaBlock though?)


But lets wait what the DEVs have to say about this strange case.

Re: [0.16.25] Couldn't find suitable position to put the player

Posted: Fri Feb 23, 2018 3:40 pm
by Aeternus
Have you tried the map preview to see what the map generator is actually trying to generate in this case? i'm kinda curious what happens when you set all terrain to none... No water would definately make power generation... difficult.

[Edit] Also you may misunderstand the terrain settings. The "grass" and "desert" types and so on aren't decals, they are terrain types. Setting them all to none probably generates an all-water map.

Re: [0.16.25] Couldn't find suitable position to put the player

Posted: Fri Feb 23, 2018 3:40 pm
by boskid
garbage in, garbage out. If you set map to generate map containing only nothing, then you will get error. Same goes with "Mods" in main screen - if you disable all mod (by pressing "enable/disable all" and then select "Base mod" and press "toggle" to disable it too, after returning to main menu factorio will reload and welcome you with error message "error loading mods - Failed to load mods: No map settings instance. [disable all mods] [restart] [exit]"

-- edit:
@Aeternus: as you can not disable water, if you choose "water: only in starting area" you will get map with water only. This is valid map, but with no place to put player.

-- edit:
My question is: what will factorio do if you install mod with "water fill", fill land up to 200 tiles from {0, 0] and then force respawn (by train or console) - will map become unplayable for new players (when on multiplayer), or will it crash/desync clients?

Re: [0.16.25] Couldn't find suitable position to put the player

Posted: Mon Feb 26, 2018 8:42 pm
by mrvn
I would say that is the one true way to die, permanently.