[2.1.12] Script trigger technology inserted itself into research queue after calling force.script_trigger_research().
Posted: Sun Jul 26, 2026 7:31 pm
What did you do?
Issue 1: I have a scripted trigger technology with upgrade set to true and max_level to 5. I called it by force.script_trigger_research(tech-name), then i noticed the tech was added to research queue.
Issue 2: Script trigger tech seems not work well with upgrade and max_level.
What happened?
Issue 1:
When I call force.script_trigger_research(tech-name), the tech inserts itself to the first item of research queue. It's blocking other items in the queue.
Issue 2:
force.script_trigger_research ignores subsequence calls. The call triggered once and ignore the rest. I also tried to use tech.level. But it can't fully leveled. it stuck at max_level - 1.
What did you expect to happen instead? It might be obvious to you, but do it anyway!
Issue 1:
I think it should not to insert it into the research queue because it's supposed to be triggered by script.
The current workaround is that I have to remove the scripted trigger tech from the research queue after calling force.script_trigger_research().
Issue 2:
There should be a way to advance the scripted trigger tech to max level.
Does it happen always, once, or sometimes?
Always.
Update #1: I added a test mod in attachment. You can run the test scenario to try it.
Issue 1: I have a scripted trigger technology with upgrade set to true and max_level to 5. I called it by force.script_trigger_research(tech-name), then i noticed the tech was added to research queue.
Issue 2: Script trigger tech seems not work well with upgrade and max_level.
What happened?
Issue 1:
When I call force.script_trigger_research(tech-name), the tech inserts itself to the first item of research queue. It's blocking other items in the queue.
Issue 2:
force.script_trigger_research ignores subsequence calls. The call triggered once and ignore the rest. I also tried to use tech.level. But it can't fully leveled. it stuck at max_level - 1.
What did you expect to happen instead? It might be obvious to you, but do it anyway!
Issue 1:
I think it should not to insert it into the research queue because it's supposed to be triggered by script.
The current workaround is that I have to remove the scripted trigger tech from the research queue after calling force.script_trigger_research().
Issue 2:
There should be a way to advance the scripted trigger tech to max level.
Does it happen always, once, or sometimes?
Always.
Update #1: I added a test mod in attachment. You can run the test scenario to try it.