Page 1 of 1

Mod Request: Remove infinite tech

Posted: Fri May 31, 2019 1:14 am
by IVAN_PIDORVAN
Sounds pretty simple, i work hard for balance my modpack for all possible damage values with and without some exact research levels (red+green, red+greed+military, +hitech(utility) etc). But it's kinda have no point cause every damage can scale up infinetly, but enemies stay the same. This fact just bother me, also it make quick tests in creative mode harder, cause console command for enabling all technologies also, for some bizarre reason include 1 level of infinite research, which one i gonna be avoid at any cost during normal game.

Please save me, i want to get rid almost every infinite tech from game, i don't like this, i don't want this to even exist.

List of undesired technologies should be configurable for other players who want to use this mod too

My personal hate list is

Combat:
Stronger explosives
Refined flammables
Energy weapons damage
Physical projectile damage
Artillery shell shooting speed

Utility:
Follower robot count
Worker robot speed
Mining productivity

Re: Mod Request: Remove infinite tech

Posted: Fri May 31, 2019 9:16 am
by darkfrei
IVAN_PIDORVAN wrote: Fri May 31, 2019 1:14 am Sounds pretty simple, i work hard for balance my modpack for all possible damage values with and without some exact research levels (red+green, red+greed+military, +hitech(utility) etc). But it's kinda have no point cause every damage can scale up infinetly, but enemies stay the same. This fact just bother me, also it make quick tests in creative mode harder, cause console command for enabling all technologies also, for some bizarre reason include 1 level of infinite research, which one i gonna be avoid at any cost during normal game.
Place this code into the data-updates.lua:

Code: Select all

for tech_name, tech in pairs (data.raw.technology) do
  if tech.max_level and tech.max_level == "infinite" then
    tech.max_level = 10
  end
end
Set up the info.json and the mod is ready, every infinite technology get limit by level 10.

Re: Mod Request: Remove infinite tech

Posted: Fri May 31, 2019 10:06 am
by eradicator
An "infinite" tech is just another tech (they're not even called "infinite" in-game!), there's nothing bizarre about it being researched if you command the game to "research_all_technologies". If you're worried about balance the best approach imho is to make them standard one-level technologies and include them in your balance. That way both the command and the player experience are equal.

Removing the max_level node seems to work.

Code: Select all

  local forbidden_effects = {
    ['ammo-damage']   = true,
    ['turret-attack'] = true,
    }
  for _,tech in pairs(data.raw.technology) do
    if tech.max_level == 'infinite' then
      for _,effect in pairs(tech.effects or {}) do
       if forbidden_effects[effect.type] then
         tech.max_level = nil
         break
         end
       end
      end
    end