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.
Make Science User Related Instead of Server Related
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Make Science User Related Instead of Server Related
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
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Make Science User Related Instead of Server Related
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)
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)
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Make Science User Related Instead of Server Related
The PvP community would probably be knocking on your doors with pitchforks if anything was majorly brokenbobingabout 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)
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.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Make Science User Related Instead of Server Related
I'm going bald and grey as it is without the added stress of that happening over something I do for a hobby.eradicator wrote:The PvP community would probably be knocking on your doors with pitchforks if anything was majorly brokenbobingabout 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)