How to setup a non-coop server?

Arrange meetings with other people to play MP, announce your servers.
Post Reply
Neero
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Dec 22, 2015 12:49 am
Contact:

How to setup a non-coop server?

Post by Neero »

I am setting up a server for me and my friends to play together on, but I have a few challenges and could need some tips.

I found a console command that makes it so we are no longer sharing research, by setting up different "teams":
game.create_force('force 1')
game.get_player('friend 1').force = game.forces['force 1']

This also makes us enemies (turrets shoots other players etc), but I found a console command to disable this.

This works great, however, we all start in the same area and re-spawn in the same place. This is a bit hassle as we have to walk back to our base after re-spawning.

1. Is it a way to make players spawn away from each others?
2. Is it a way to set re-spawn point per player (or per "team")?
3. What is the console command to disable turrets from attacking players? (I lost the page where I found it).
4. I found a map for an older version of Factorio that stated that players get a popup to choose a team when they log in. But I cannot find anything like that in the map editor. Is it still possible?
5. Is the whole map loaded and running if only one player is online? Will the other bases continuously get attacked until everyone logs off?


Edit:
I found the answer for #4, which also makes #1 and #2 possible, but with some challenges.
The map is here: https://forums.factorio.com/forum/vie ... 36&t=15052
It is not really a map, it is a lua script that adds the functionality. It was pretty simple to edit it to my liking. When you log in you can choose between two teams, and when you choose one of them you are assigned the team and is teleported to coords x/y. It also sets the spawn point for the team members. The main problem is that you might get teleported into the ocean, or into a large enemy base. The ocean problem is easy to check before you save the map for multiplayer use. He has solved the enemy problem by giving players weapons and armor each time they respawn. However, this can easily be abused.
Checking for oceans is a bit trickier if you want 10 teams instead of 2.

l4m3r
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat Jul 18, 2015 11:31 am
Contact:

Re: How to setup a non-coop server?

Post by l4m3r »

here are the Lua commands For differnt Teams and non Friendly fire
/c game.create_force('force 1')
/c game.create_force('force 2')
/c game.get_player('friend 1').force = game.forces['force 1']
/c game.get_player('friend 2').force = game.forces['force 2']
/c game.forces['force 1'].set_cease_fire('force 2', true)
/c game.forces['force 2'].set_cease_fire('force 1', true)

Instead of Friend 1 type your name or the players name that you want to put in that force
I play with friends so make a map open the chat give this promts in enjoy diffrent teams
To start on diffrent Location is not so easy to make ^^
I said make on the Spawn Point a non buildable Zone then its not the Proplem..
For 5 yes every building is there until its destoryed nothing to do with log off or in

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

Re: How to setup a non-coop server?

Post by Klonan »

You can also set spawn positions using the console.

Code: Select all

/c game.forces['force 1'].set_spawn_position(position = {1000,1000}, surface = game.surfaces['nauvis'])
game.forces['force 2'].set_spawn_position(position = {-1000,-1000}, surface = game.surfaces['nauvis'])

Or something like that

Neero
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Dec 22, 2015 12:49 am
Contact:

Re: How to setup a non-coop server?

Post by Neero »

Great! Thanks a lot, both of you! ^^

l4m3r
Burner Inserter
Burner Inserter
Posts: 16
Joined: Sat Jul 18, 2015 11:31 am
Contact:

Re: How to setup a non-coop server?

Post by l4m3r »

Try mod Spacebook make it easyer for you.

Pascali
Fast Inserter
Fast Inserter
Posts: 170
Joined: Wed Aug 23, 2017 8:24 pm
Contact:

Re: How to setup a non-coop server?

Post by Pascali »

if i wan´t to start a server with 2 fractions - how do i have to do this?

Code: Select all

--start-server saves/TEST.zip --server-settings ./data/server-settings.json /c game.create_force('force 1') /c game.create_force('force 2') /c game.get_player('friend 1').force = game.forces['force 1'] /c game.get_player('friend 2').force =game.forces['force 2'] /c game.forces['force 1'].set_cease_fire('force 2', true) /c game.forces['force 2'].set_cease_fire('force 1', true)

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

Re: How to setup a non-coop server?

Post by Klonan »

Pascali wrote:if i wan´t to start a server with 2 fractions - how do i have to do this?

Code: Select all

--start-server saves/TEST.zip --server-settings ./data/server-settings.json /c game.create_force('force 1') /c game.create_force('force 2') /c game.get_player('friend 1').force = game.forces['force 1'] /c game.get_player('friend 2').force =game.forces['force 2'] /c game.forces['force 1'].set_cease_fire('force 2', true) /c game.forces['force 2'].set_cease_fire('force 1', true)
Setup a save using the PvP scenario in the game, and load the save to start your server

Pascali
Fast Inserter
Fast Inserter
Posts: 170
Joined: Wed Aug 23, 2017 8:24 pm
Contact:

Re: How to setup a non-coop server?

Post by Pascali »

that works, thank you. The standard map size 2000000 or something like that. Ist that huge enough for a huge factory(or two for two player)?

Startet PVP with victory condition: Free Game. But ingame it shows: Goald is: start rocket with satelite thing...

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

Re: How to setup a non-coop server?

Post by Klonan »

Pascali wrote:that works, thank you. The standard map size 2000000 or something like that. Ist that huge enough for a huge factory(or two for two player)?.
2,000,000 is the maximum map size
Free Game. But ingame it shows: Goald is: start rocket with satelite thing...
Thats the standard victory condition in freeplay scenario, but don't worry the game won't end once you launch a rocket

ChoMar
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Sun Aug 07, 2016 2:00 am
Contact:

Re: How to setup a non-coop server?

Post by ChoMar »

l4m3r wrote:Try mod Spacebook make it easyer for you.
Last time i tried spacebook it didnt really work stable for me. Has that changed?
There also is a PvP scenario that sets up teams and stuff. Goal is to destroy enemies rocket silo. I havent managed to get a team together so i dont know that much about it.
Mytronix Entertainment

Post Reply

Return to “Multiplayer”