New Faction Added.

This is the place to request new mods or give ideas about what could be done.
User avatar
StoneLegion
Filter Inserter
Filter Inserter
Posts: 687
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

New Faction Added.

Post 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
Last edited by StoneLegion on Mon Aug 03, 2015 11:25 pm, edited 1 time in total.
ratchetfreak
Filter Inserter
Filter Inserter
Posts: 952
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: New Faction Added.

Post 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.
User avatar
StoneLegion
Filter Inserter
Filter Inserter
Posts: 687
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: New Faction Added.

Post 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.
User avatar
provet
Fast Inserter
Fast Inserter
Posts: 133
Joined: Thu Feb 12, 2015 9:49 pm
Contact:

Re: New Faction Added.

Post by provet »

And now its only a matter of time before some kind of diplomacy mod appears! ;)
User avatar
StoneLegion
Filter Inserter
Filter Inserter
Posts: 687
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: New Faction Added.

Post 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?
Mr Sunol
Inserter
Inserter
Posts: 24
Joined: Thu Dec 25, 2014 6:23 am
Contact:

Re: New Faction Added.

Post 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!!!
Divran
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Wed Jan 14, 2015 9:13 pm
Contact:

Re: New Faction Added.

Post by Divran »

I made a mod inspired by this thread https://forums.factorio.com/forum/vie ... 94&t=18079
tocheeba
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Apr 06, 2016 1:54 pm
Contact:

Re: New Faction Added.

Post 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
tocheeba
Manual Inserter
Manual Inserter
Posts: 3
Joined: Wed Apr 06, 2016 1:54 pm
Contact:

Re: New Faction Added.

Post 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?
Quazil
Burner Inserter
Burner Inserter
Posts: 11
Joined: Tue Apr 12, 2016 4:47 am
Contact:

Re: New Faction Added.

Post by Quazil »

When you move the force you are in you loose access to anything you plopped down before
Thatpinkwolf
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue May 10, 2016 1:52 am
Contact:

Re: New Faction Added.

Post by Thatpinkwolf »

kk
Last edited by Thatpinkwolf on Thu Sep 07, 2017 2:18 pm, edited 1 time in total.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: New Faction Added.

Post 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.
My mods on the Factorio Mod Portal :geek:
Post Reply

Return to “Ideas and Requests For Mods”