Page 1 of 1

Stopping players from selecting research

Posted: Sun Jan 31, 2016 10:55 am
by abregado
Ok, next up. I am writing scenarios in which the first player (host at creation) is a super user. I want all other players to be unable to select research.

I can find a way to disable research for an entire force, but not per player. Before I go in for a hacky solution I thought it best to ask everyone.

If I have to, my hacky solution would be to put the Super User into its own force with Research Enabled, and Disable research for the player force. Then use the on_research_finished callback to add the new tech to the player force tech tree (completed).

Re: Stooping players from selecting research

Posted: Sun Jan 31, 2016 5:29 pm
by DaveMcW
You are correct, there is a force.disable_research(), but not player.disable_research().

Modding factorio is all about the hacks. :D

Re: Stooping players from selecting research

Posted: Sun Jan 31, 2016 9:03 pm
by Supercheese
DaveMcW wrote:Modding factorio is all about the hacks. :D
Ain't that the truth! :mrgreen:

Re: Stooping players from selecting research

Posted: Sun Jan 31, 2016 11:53 pm
by abregado
I was hoping that the on_started_research callback would give the index of the player who started it. Then I could make a voting system for technology. Alas, I will have to find a new way.

Oh woe is me for bringing this on myself.. haha.. a scenario for 26 players is rather an interesting design constraint

Re: Stooping players from selecting research

Posted: Mon Feb 01, 2016 6:20 am
by Koub
You could add an empty force, disable research for the player force, make players vote, start the research in the "empty force" and once research is finished, bring the tech to player force, and restart from beginning ?

Re: Stooping players from selecting research

Posted: Mon Feb 01, 2016 11:36 am
by ratchetfreak
Koub wrote:You could add an empty force, disable research for the player force, make players vote, start the research in the "empty force" and once research is finished, bring the tech to player force, and restart from beginning ?
then you'd also need to auto-move each placed lab to the new empty force and allow the player force to manipulate them.

Re: Stopping players from selecting research

Posted: Thu Feb 04, 2016 5:32 am
by abregado
Its not completely necessary to move the Labs to a controlling force, as the Labs will be controlled by the first player (in this case a teacher). The level is for a class of 25 kids and 2 teachers.

Re: Stopping players from selecting research

Posted: Fri Feb 12, 2016 11:07 pm
by StanFear
I hope you found a way to resolve your problem, if not, what koub sayd could be slightly modified :
instead of a new empty force, put the first player in that force, then all other players go to the next force, disable the lab recipe from the "students" force
and when the teacher force research a tech, add it to the students' one