Page 1 of 1

New Faction Added.

Posted: Mon Aug 03, 2015 2:23 pm
by StoneLegion
I heard in 0.12 you can now properly create a 2nd third fourth etc faction. This way you have your own research etc.

This is not much of a PvP Mod though I assume could be used just as a PvP Mod.

I would like it so when I host I'm on team1 and if my friend joins he is on team2 pretty much. So we have our own you know team.. I have no clue if there is a way to switch off turret damage to other team members as well. As we are playing separate teams but coop as in building a train network etc to each other.



It has been created Thanks to akhiros!

This will make it so you have your own research, map, radars, etc. Also makes it so Turrets don't shoot each other!

Code: Select all

/c local pforces = {}; for _, player in ipairs(game.players) do local fname = "player_" .. player.name; local force = game.forces[fname] or game.create_force(fname); player.force = force; for _, pforce in ipairs(pforces) do pforce.set_cease_fire(force.name, true); force.set_cease_fire(pforce.name, true) end; pforces[#pforces+1] = force end

Re: New Faction Added.

Posted: Mon Aug 03, 2015 2:31 pm
by ratchetfreak
You can set "cease fire" mutually to avoid turrets targeting your allies

game.forces['force 1'].set_cease_fire('force 2', true);
game.forces['force 2'].set_cease_fire('force 1', true);

However you can't access the other's buildings.

Re: New Faction Added.

Posted: Mon Aug 03, 2015 2:45 pm
by StoneLegion
ratchetfreak wrote:You can set "cease fire" mutually to avoid turrets targeting your allies

game.forces['force 1'].set_cease_fire('force 2', true);
game.forces['force 2'].set_cease_fire('force 1', true);

However you can't access the other's buildings.
Thank you for that. Hopefully whoever makes this small script can include that as well inside of it or maybe I can just copy/paste without issue.

Re: New Faction Added.

Posted: Fri Aug 21, 2015 8:26 pm
by provet
And now its only a matter of time before some kind of diplomacy mod appears! ;)

Re: New Faction Added.

Posted: Mon Sep 14, 2015 12:56 am
by StoneLegion
provet wrote:And now its only a matter of time before some kind of diplomacy mod appears! ;)
Would you like to send a 1000 laser turrets as tribute?

Re: New Faction Added.

Posted: Wed Oct 14, 2015 3:03 pm
by Mr Sunol
If you combine this with a mod where you can create your own biters, then each person could put a factory on either end of a round-walled off area and you could have biter fights!!!

Re: New Faction Added.

Posted: Fri Nov 27, 2015 9:50 pm
by Divran
I made a mod inspired by this thread https://forums.factorio.com/forum/vie ... 94&t=18079

Re: New Faction Added.

Posted: Wed Apr 06, 2016 2:16 pm
by tocheeba
This sounds stupid, so please forgive me. This is exactly what I want - I want friends to be able to join, but have their own research tree. I see you posted the code, but I have no clue what I'm supposed to do with this. I'm running a dedicated server on Windows right now. Could you let me know where I'm supposed to put this code?

Thanks

Re: New Faction Added.

Posted: Wed Apr 06, 2016 3:50 pm
by tocheeba
ok, so I ran this code in the console, and I'm still getting shot at by turrets on stuff that I built before. Do I need to make a new map when doing this?

Re: New Faction Added.

Posted: Wed Apr 13, 2016 2:30 am
by Quazil
When you move the force you are in you loose access to anything you plopped down before

Re: New Faction Added.

Posted: Tue May 10, 2016 2:02 am
by Thatpinkwolf
kk

Re: New Faction Added.

Posted: Sun May 29, 2016 3:55 pm
by binbinhfr
You can have a look at my SpaceBook mod : viewtopic.php?f=92&t=25680
Maybe it will help you to play on the same map with different factions.