Page 1 of 1

Mod interface request: Research Trigger

Posted: Sat Nov 30, 2024 6:10 pm
by fobar22
I am working on an idea for a mod where core tech is unlocked through actions. I would like to see the "mine-entity" to include an optional attribute of "amount", much like "craft-fluid" and that works with "craft-item". I would also be curious if there can be multiple dependencies for research triggers?

For example, automation-2 requiring both the crafting of 100 "assembling-machine-1" and 100 "fast-transport-belt". Currently this throws an error using the following:

-- Unlock automation-2 after crafting 100 assembling-machine-1
{
type = "technology",
name = "automation-2",
icon = "__base__/graphics/technology/automation-2.png", -- Use the appropriate icon for automation-2
icon_size = 128,
prerequisites = {
"automation",
"steel-processing",
"logistic-science-pack"}, -- Replace with your actual prerequisite tech if needed
effects = {
{type = "unlock-recipe", recipe = "assembling-machine-2"},
},
research_trigger = {
{
type = "craft-item",
item = "assembling-machine-1", -- Item being crafted
count = 100 -- Amount required to unlock the tech
},
{
type = "craft-item",
item = "fast-transport-belt", -- Item being crafted
count = 100 -- Amount required to unlock the tech☹
}
},
order = "a-e"
}


Error message:
Failed to load mods: Error while loading technology prototype "automation-2" (technology): Value must be a dictionary in property tree at ROOT.technology.automation-2.research_trigger
Modifications: Base mod › On the Job Training

Mods to be disabled:
• on-the-job-training (0.1.0)

Re: Mod interface request: Research Trigger

Posted: Wed Dec 04, 2024 9:23 pm
by Koub
[Koub] Moved to Modding interface requests.

Re: Mod interface request: Research Trigger

Posted: Thu Dec 05, 2024 9:14 pm
by protocol_1903
+1, Related post where I'm asking for joint trigger and research technologies, but also mention multi-trigger technologies.

Re: Mod interface request: Research Trigger

Posted: Fri Jan 17, 2025 5:04 pm
by rjdunlap
+1 I would like to see the "mine-entity" to include an optional attribute of "amount"