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

Bugs that are actually features.
Post Reply
User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 553
Joined: Tue May 10, 2016 3:39 pm
Contact:

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

Post 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.
Attachments
factorio-current.log
(6.46 KiB) Downloaded 83 times
factorio_couldnt.png
factorio_couldnt.png (5.23 KiB) Viewed 2725 times
Image

mrvn
Smart Inserter
Smart Inserter
Posts: 5710
Joined: Mon Sep 05, 2016 9:10 am
Contact:

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

Post 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.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2251
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

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

Post 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

mrvn
Smart Inserter
Smart Inserter
Posts: 5710
Joined: Mon Sep 05, 2016 9:10 am
Contact:

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

Post by mrvn »

I wish the sandbox would ask before removing the player or have a button to create/destroy it.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

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

Post 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.

User avatar
Jon8RFC
Filter Inserter
Filter Inserter
Posts: 553
Joined: Tue May 10, 2016 3:39 pm
Contact:

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

Post 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?
Image

mrvn
Smart Inserter
Smart Inserter
Posts: 5710
Joined: Mon Sep 05, 2016 9:10 am
Contact:

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

Post 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.

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

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

Post 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.
Last edited by Aeternus on Fri Feb 23, 2018 3:41 pm, edited 1 time in total.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2251
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

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

Post 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?

mrvn
Smart Inserter
Smart Inserter
Posts: 5710
Joined: Mon Sep 05, 2016 9:10 am
Contact:

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

Post by mrvn »

I would say that is the one true way to die, permanently.

Post Reply

Return to “Not a bug”