Page 1 of 1

[Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Tue May 16, 2017 2:39 pm
by die_8_
Image


I attempted to complete 16, but the completion is not displayed on 16 and the progress is displayed at 17.

Re: [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Tue May 16, 2017 3:33 pm
by daniel34
This is a follow-up of
[0.15.5] LuaTechnology::researched = true doesn't change top right display [Resolved Problems and Bugs]

Re: [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Thu Jun 01, 2017 4:10 pm
by Klonan
die_8_ wrote:Image


I attempted to complete 16, but the completion is not displayed on 16 and the progress is displayed at 17.
Thanks for the report,
Can you provide direct steps to reproduce the problem?

Re: [Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Sat Jun 03, 2017 3:42 am
by die_8_
1. Apply mod "tesseracts"
2. Just continue researching "mining productivity"

I think that it can reappear by this method.

Re: [Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Sat Jun 03, 2017 2:41 pm
by Rseding91
die_8_ wrote:1. Apply mod "tesseracts"
2. Just continue researching "mining productivity"

I think that it can reappear by this method.
That's not a method to reproduce. I need a save file and a single command I can run where you expect X to happen and it doesn't.

Re: [Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Sun Jun 04, 2017 9:38 am
by die_8_
I can not understand what you are saying for a while.
I found this bug with mod application as reported in the previous thread.

previous thread:
viewtopic.php?f=11&t=45857

Command execution is not done during game.
Mod "tesseracts" contains equivalent content.
Will not it happen immediately in that environment?

Re: [Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Sun Jun 04, 2017 10:50 am
by daniel34
Steps to reproduce:
  • Use the following command (from tesseracts mod) to complete the research when on_research_started triggers:

    Code: Select all

    /c script.on_event(defines.events.on_research_started, function(event)
    	event.research.researched = true
    end)
  • Keep researching Mining productivity
  • You'll notice that groups (1-3, 4-7, 8-11, 12-15) automatically research to complete the group.
  • The infinite group (16-∞) behaves differently, when started it will research level 16 and then start research on 17 and leave it there without progress.
  • The only way to research it (without doing it manually) is to switch to another research, then back to Mining productivity which will also only research the next level.
I'm not sure what die_8_ thinks the expected result is, because the game can't research the whole group since it is infinite. Maybe it should just complete level 16 and then research nothing, so the next level can be researched directly without having to switch to a different research first.

Sidenote: using /c game.player.force.current_research.researched = true will research the current level, but not update the top right display. Repeating it 5 times will still show level x on the top right although in the technology screen it's already x+5.
image

Re: [Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Sun Jun 04, 2017 1:08 pm
by die_8_
I think that it is a problem of execution timing of "on_research_started".
The timing to execute "on_research_started" is faster than displaying the research progress GUI.
As a result, it seems that the result of choosing the next step after the specified research ends.
If this specification is correct, I can not imagine scenes where this specification works effectively.

Re: [Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Sun Jun 04, 2017 1:24 pm
by die_8_
Initially, when researching "Mining Productivity 1" and establishing "Mining Productivity 3", there is no way to establish a progress course.
Since there is no way to research "Mining Productivity 1" and display the result of "Mining Productivity 1", it is impossible to research "Mining Productivity 16" and display the result of "Mining Productivity 16".

Re: [Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Sun Jun 04, 2017 1:29 pm
by Rseding91
Ah i see now what you're talking about. That's working as intended.

If you want to increment levels of the infinite technology you can't set it directly through script at the moment.

Re: [Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Sun Jun 04, 2017 5:45 pm
by die_8_
Are there plans to improve this specification?

Re: [Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Mon Jun 05, 2017 5:10 pm
by Rseding91
I've added technology.level write support for the next version of 0.15.

Re: [Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Tue Jun 06, 2017 5:54 am
by die_8_
thx.
However, the execution timing of "on_research_started" is the same specification.
Do I need to delay execution timing with "on_tick" and "technology.level" if I want to do the above?

Re: [Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Tue Jun 06, 2017 7:10 am
by Rseding91
die_8_ wrote:thx.
However, the execution timing of "on_research_started" is the same specification.
Do I need to delay execution timing with "on_tick" and "technology.level" if I want to do the above?
What?

Re: [Rseding] [0.15.11] LuaTechnology::researched = true, Not complete yet

Posted: Tue Jun 06, 2017 10:03 am
by die_8_
If "technology.level" is to be increased, will the previous "technology.level" be researched?
If so, I thought that if I incremented "technology.level" at the timing when "on_research_started" is executed, it would be the same indication as previously pointed out.

Also, please forgive me that I am poor at English conversation.