Disable creation of ghost after building is destroyed

This is the place to request new mods or give ideas about what could be done.
SimpleCat
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Nov 17, 2020 12:58 pm
Contact:

Disable creation of ghost after building is destroyed

Post by SimpleCat »

I know nothing about programing, my knowledge is limited by wiki page about modding. I know you can remove extending ghost lifetime research from technologies, but i didn't to that in my current playthrough so i wonder if there is any other way.
User avatar
Stargateur
Fast Inserter
Fast Inserter
Posts: 198
Joined: Sat Oct 05, 2019 6:17 am
Contact:

Re: Disable creation of ghost after building is destroyed

Post by Stargateur »

Code: Select all

data:extend({
  type = "technology",
  name = "disable-ghost",
  effects =
  {
    {
      type = "ghost-time-to-live",
      modifier = 0,
    }
  },
  unit =
  {
    count = 1,
    ingredients =
    {
      {"automation-science-pack", 1},
    },
    time = 1,
  },
})
Should work... maybe try `modifier = -60 * 60 * 60 * 24 * 7` if this doesn't work with `0`
alej0
Manual Inserter
Manual Inserter
Posts: 1
Joined: Tue Oct 08, 2024 10:19 pm
Contact:

Re: Disable creation of ghost after building is destroyed

Post by alej0 »

You can disable the ghost with the following command:

Code: Select all

/c game.player.force.ghost_time_to_live = 0
Post Reply

Return to “Ideas and Requests For Mods”