Selected recearch
Selected recearch
Could you add the opportunity to open technology gui on the technology passed as an argument to the function.
Or add the ability to install the selected recearch.
For example player.selected_recearch = "assembling-machine"
Or add the ability to install the selected recearch.
For example player.selected_recearch = "assembling-machine"
Re: Selected recearch
There already is_npo6ka_ wrote:Or add the ability to install the selected recearch.
For example player.selected_recearch = "assembling-machine"
Code: Select all
player.force.current_research = "automation-2"
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Selected recearch
Yes, research is force specific, not player specific.
Re: Selected recearch
bobingabout wrote:Yes, research is force specific, not player specific.
current_research refers to player.force, but I would suggest adding saving the last selected item in the technology tree. Then the next time the player opens the technology tree, he will see the last research shown.daniel34 wrote:There already is_npo6ka_ wrote:Or add the ability to install the selected recearch.
For example player.selected_recearch = "assembling-machine"Code: Select all
player.force.current_research = "automation-2"
This research is unique for each player.
I would just like to open a technology tree on a certain technology.
My old topic: viewtopic.php?f=25&t=49599
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Selected recearch
The research screen always opens on the currently researched technology. You could thus try faking what you want by:
1) store current technology
2) set player.force.current_research to the tech you want to open the gui for
3) open the gui
4) set player.force.current_research back to 1)
This ofc assumes that you can actually force open the technology gui. And probably that the tech you want to open has all prerequisites fullfilled because otherwise you can't set it in 2) D:.
1) store current technology
2) set player.force.current_research to the tech you want to open the gui for
3) open the gui
4) set player.force.current_research back to 1)
This ofc assumes that you can actually force open the technology gui. And probably that the tech you want to open has all prerequisites fullfilled because otherwise you can't set it in 2) D:.
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.
Re: Selected recearch
This works much harder than you described.eradicator wrote:The research screen always opens on the currently researched technology. You could thus try faking what you want by:
1) store current technology
2) set player.force.current_research to the tech you want to open the gui for
3) open the gui
4) set player.force.current_research back to 1)
This ofc assumes that you can actually force open the technology gui. And probably that the tech you want to open has all prerequisites fullfilled because otherwise you can't set it in 2) D:.
player.force.current_research installs on the study one of the open technologies needed for the specified in the parameter.
That is, if the technology does not have open the prerequest, it can not be set in current_research.
For example:
I'm trying to install player.force.current_research = "research 2", the game mechanic sets the player.force.current_research to "research 1"
P.S. I already found a bad way to solve this problem, I would like to draw the attention of developers to this problem.
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Selected recearch
I did mention that in the post above._npo6ka_ wrote: This works much harder than you described.
player.force.current_research installs on the study one of the open technologies needed for the specified in the parameter.
That is, if the technology does not have open the prerequest, it can not be set in current_research.
Not entirely true. The game will research up to "research 2" automatically, but for that it has to first finish "research 1". And there is no GUI indication of the game being in "auto-research" mode._npo6ka_ wrote: For example:
I'm trying to install player.force.current_research = "research 2", the game mechanic sets the player.force.current_research to "research 1"
---------------------------------------------------------------
So i'd like to extend/second the request for:
- A method to open the technology GUI on a specific page. (Used for "hyperlinking" the player there from mod GUIs)
- An ingame indication that the game is currently auto-resolving prerequesite technologies to get to force.current_research.
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.
Re: Selected recearch
Up.
Unfortunately, I did not receive any comment on my proposal
Unfortunately, I did not receive any comment on my proposal
Re: Selected recearch
0.17 changelog wrote:Added LuaForce::previous_research read/write.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Re: Selected recearch
Can you describe in more detail what will be stored in this field? Based on the name of the field, this is not exactly what started the discussion of this topic.Bilka wrote:0.17 changelog wrote:Added LuaForce::previous_research read/write.
Task: The mod should open a technology tree for the player and establish from the variable which technology should be displayed now (not as a current research, but simply to view information about it, that is, it can be a closed technology).
Request: Add the ability to display a specific technology when opening technology gui. (This parameter is unique for each player, everyone can see their technology).