Make Science User Related Instead of Server Related

This is the place to request new mods or give ideas about what could be done.
Post Reply
MrGuffels
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sun Mar 05, 2017 7:47 am
Contact:

Make Science User Related Instead of Server Related

Post by MrGuffels »

Question for the people who have been writing mods for more than 3 days.

Do you think it would be possible to overhaul the science system so that 2 people could play on the same server and have different levels of research. Like if I wanted to make a mod that would allow 2 people to go head to head on a multiplayer server and compete against each other to reach some arbitrary goal. I am really curious if this is even possible to mod. I have been modding for literally 3 days and have no idea if there is even a good place to start this project or if it is just impossible for 2 players on the same server to have completely separate technology trees that they would have to research through themselves.

My first idea was that you could use the last interacted with field on the labs to check which player gets credit for the research but I have no clue how to separate the research trees by player.

Any suggestions or is this just a pipe dream that isn't worth pursuing.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Make Science User Related Instead of Server Related

Post by eradicator »

Research is stored per "force". A "force" is what factorio calls teams of players. I.e. this is ofc possible, else PvP wouldn't be meaningful :P. Forces can be friendly, neutral or hostile towards each other. Friendly forces entities (assemblers, inserters) can interact with each other.

http://lua-api.factorio.com/latest/LuaForce.html
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Make Science User Related Instead of Server Related

Post by bobingabout »

So the answer is basically Yes. Put the two different players on a different force (team), then they have their own research.

I've not personally experimented with this yes, but my mods should be friendly with people who do change these things (my mods iterate through players/forces rather than assuming anything)
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Make Science User Related Instead of Server Related

Post by eradicator »

bobingabout wrote:I've not personally experimented with this yes, but my mods should be friendly with people who do change these things (my mods iterate through players/forces rather than assuming anything)
The PvP community would probably be knocking on your doors with pitchforks if anything was majorly broken :P
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Make Science User Related Instead of Server Related

Post by bobingabout »

eradicator wrote:
bobingabout wrote:I've not personally experimented with this yes, but my mods should be friendly with people who do change these things (my mods iterate through players/forces rather than assuming anything)
The PvP community would probably be knocking on your doors with pitchforks if anything was majorly broken :P
I'm going bald and grey as it is without the added stress of that happening over something I do for a hobby.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Post Reply

Return to “Ideas and Requests For Mods”