Infinite Researches

This is the place to request new mods or give ideas about what could be done.
Mecejide
Fast Inserter
Fast Inserter
Posts: 171
Joined: Mon Sep 23, 2019 8:12 pm
Contact:

Infinite Researches

Post by Mecejide »

Is there a mod that makes all infinite researches require production science packs? If not, can somebody make one?
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Infinite Researches

Post by darkfrei »

Mecejide wrote: Tue Oct 22, 2019 11:36 pm Is there a mod that makes all infinite researches require production science packs? If not, can somebody make one?
Only production spacks?
Mecejide
Fast Inserter
Fast Inserter
Posts: 171
Joined: Mon Sep 23, 2019 8:12 pm
Contact:

Re: Infinite Researches

Post by Mecejide »

Those and the ones they already require.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Infinite Researches

Post by darkfrei »

Mecejide wrote: Wed Oct 23, 2019 7:22 pm Those and the ones they already require.
The code that you need, place it into the data.lua (not tested):

Code: Select all

local all_science_packs = {
    {"automation-science-pack", 1},
    {"logistic-science-pack", 1},
    {"chemical-science-pack", 1},
    {"military-science-pack", 1},
    {"production-science-pack", 1},
    {"utility-science-pack", 1},
    {"space-science-pack", 1}
  }
  
for tech_name, tech in pairs (data.raw.technology) do
  if tech.max_level and tech.max_level == "infinite" then
    tech.unit.ingredients = table.deepcopy(all_science_packs)
  end
end
Post Reply

Return to “Ideas and Requests For Mods”