Page 1 of 1

How to setup a non-coop server?

Posted: Tue Dec 22, 2015 2:45 am
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.

Re: How to setup a non-coop server?

Posted: Thu Dec 24, 2015 5:05 pm
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

Re: How to setup a non-coop server?

Posted: Thu Dec 24, 2015 5:58 pm
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

Re: How to setup a non-coop server?

Posted: Fri Dec 25, 2015 4:16 pm
by Neero
Great! Thanks a lot, both of you! ^^

Re: How to setup a non-coop server?

Posted: Sat Jul 01, 2017 9:42 am
by l4m3r
Try mod Spacebook make it easyer for you.

Re: How to setup a non-coop server?

Posted: Thu Aug 24, 2017 5:27 pm
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)

Re: How to setup a non-coop server?

Posted: Thu Aug 24, 2017 5:33 pm
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

Re: How to setup a non-coop server?

Posted: Thu Aug 24, 2017 8:09 pm
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...

Re: How to setup a non-coop server?

Posted: Mon Aug 28, 2017 2:35 pm
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

Re: How to setup a non-coop server?

Posted: Tue Aug 29, 2017 8:45 am
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.