Page 1 of 1

Problem toying with infinite tech

Posted: Mon May 19, 2025 2:13 pm
by Stargateur
I would like an infinite tech to activate or desactivate "create-ghost-on-entity-death". I have fail to have the game make it infinite:

Code: Select all

  data:extend({
    {
      type = "technology",
      name = "ghost-entity-on-death-true-1",
      icon_size = 256,
      icon = "__base__/graphics/technology/construction-robotics.png",
      effects = { {
        type = "create-ghost-on-entity-death",
        modifier = true,
      } },
      unit =
      {
        count_formula = "L",
        ingredients =
        {
          { "automation-science-pack", 1 },
        },
        time = 1,
        max_level = "infinite",
      },
    },
  })
I tried several thing and nothing work. Did I do a mistake or does infinite search only work for specific effect that have modifier that is not an number ?

Re: Problem toying with infinite tech

Posted: Sat May 24, 2025 1:59 pm
by Natha
What is the max level you get?
I just saw that max_level must not be inside unit

Re: Problem toying with infinite tech

Posted: Tue Jun 03, 2025 6:50 pm
by Stargateur
Natha wrote: Sat May 24, 2025 1:59 pm What is the max level you get?
I just saw that max_level must not be inside unit
damm I hate lua

Re: Problem toying with infinite tech

Posted: Tue Jun 03, 2025 8:19 pm
by computeraddict
Stargateur wrote: Tue Jun 03, 2025 6:50 pm damm I hate lua
Data structure matters. You will find this everywhere you program.

Re: Problem toying with infinite tech

Posted: Wed Jun 04, 2025 2:30 pm
by Stargateur
computeraddict wrote: Tue Jun 03, 2025 8:19 pm
Stargateur wrote: Tue Jun 03, 2025 6:50 pm damm I hate lua
Data structure matters. You will find this everywhere you program.
Yeah but a better language would have warn me... and I code since 20 years.... so..... and I'm using factorio modding tool kit and somehow it miss it anyway...

Re: Problem toying with infinite tech

Posted: Wed Jun 04, 2025 3:50 pm
by computeraddict
Stargateur wrote: Wed Jun 04, 2025 2:30 pm Yeah but a better language would have warn me... and I code since 20 years.... so..... and I'm using factorio modding tool kit and somehow it miss it anyway...
It's just the norm of dynamically typed languages. They give you a powerful tool and trust you won't point it at your own foot. People not trusting themselves with this power is how we got Typescript.