Page 1 of 1

Make Science User Related Instead of Server Related

Posted: Tue Jan 09, 2018 3:42 pm
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.

Re: Make Science User Related Instead of Server Related

Posted: Tue Jan 09, 2018 6:04 pm
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

Re: Make Science User Related Instead of Server Related

Posted: Wed Jan 10, 2018 9:24 am
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)

Re: Make Science User Related Instead of Server Related

Posted: Wed Jan 10, 2018 11:54 am
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

Re: Make Science User Related Instead of Server Related

Posted: Thu Jan 11, 2018 9:41 am
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.