Hello guys,
i play this game in the most time Multiplayer.
What i want ist more Start Options. And friend is in game a Enemy not friendly in Coop Mode set up self a own factory. The Laser tower shoot him and enemy tower shoots to me.
Sorry for my bad english.
With best regards
Maisel16
Start in various fields Multiplayer
-
- Filter Inserter
- Posts: 952
- Joined: Sat May 23, 2015 12:10 pm
- Contact:
Re: Start in various fields Multiplayer
a per force spawn point you mean?maisel16 wrote:Hello guys,
i play this game in the most time Multiplayer.
What i want ist more Start Options. And friend is in game a Enemy not friendly in Coop Mode set up self a own factory. The Laser tower shoot him and enemy tower shoots to me.
Sorry for my bad english.
With best regards
Maisel16
seems like this should be modable
turns out it is: https://forums.factorio.com/wiki/inde ... n_position
the following will set your force's spawn position to your current location
Code: Select all
/c game.local_player.force.set_spawn_position(game.local_player.position, game.local_player.surface);
Re: Start in various fields Multiplayer
Moved from Suggestions to Gameplay Help, cause I don't see this as suggestion (there is nothing specific suggested).
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: Start in various fields Multiplayer
For an arbitrary number of players, this code will create spawnpoint on a 1000 diameter (500 range) circle evenly spread apart for every player in its own force. We used this for our 3 player "space race" type of game.
First you run this: (you can just open the lua console and write /c and then paste this code as it stands here (you can ignore all the spaces)
You can paste this code into a text editor (notepad, word whatever) and edit the value for r to alter the distance between spawns.
Then after everyone is spawned and the map has generated (takes about 20 seconds) use this command:
again, console /c and paste this code, and alter the value for r for the size of the starting area.
You might find one or more players spawning on water, but in our case it only took 2 restarts before we found a useful map.
First you run this: (you can just open the lua console and write /c and then paste this code as it stands here (you can ignore all the spaces)
Code: Select all
game.peaceful_mode = true
r = 500
n_forces = 1
for index,player in pairs(game.players) do
if index > 1 then
local force = game.create_force(player.name)
player.force = force
n_forces = n_forces +1
end
end
n = 0
for name,force in pairs(game.forces) do
if name ~= "neutral" and name ~= "enemy" then
local x = r * math.cos(n*2*math.pi/n_forces)
local y = r * math.sin(n*2*math.pi/n_forces)
force.set_spawn_position({x,y}, force.players[1].surface)
for _,player in pairs(force.players) do
player.teleport({x,y})
end
force.clear_chart()
n = n +1
end
end
Then after everyone is spawned and the map has generated (takes about 20 seconds) use this command:
Code: Select all
r = 100
for _,player in pairs(game.players) do
local enemies = player.surface.find_entities_filtered{area={{player.position.x-r,player.position.y-r},{player.position.x+r,player.position.y+r}}, force = "enemy"}
for _,enemy in pairs(enemies) do
enemy.destroy()
end
end
game.peaceful_mode = false
You might find one or more players spawning on water, but in our case it only took 2 restarts before we found a useful map.
Re: Start in various fields Multiplayer
maybe this code wont work with 0.16?