Locate specific items "missing the material for construction " on the map

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Annihilannic
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sun Feb 28, 2021 10:13 pm
Contact:

Locate specific items "missing the material for construction " on the map

Post by Annihilannic »

I often have this situation where I have a few items that are missing the material for construction:

Image

The mines are intentional, I lay out my mines in advance and allow robots to build them as the AutoDeconstruct mod dismantles the empty ones. But because of all those missing mine alerts, I can't just click on the icon to locate the missing substations on the map... is there any other trick or mod to do this?

As the factory grows... and Grows... and GROWS...... this becomes more and more difficult! :D

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Locate specific items "missing the material for construction " on the map

Post by DaveMcW »

Code: Select all

/c for _, ghost in pairs(game.player.surface.find_entities_filtered{name="entity-ghost"}) do
  if ghost.ghost_type ~= "mining-drill" then
    game.player.print(ghost.ghost_name.." [gps="..ghost.position.x..","..ghost.position.y.."]")
  end
end

Annihilannic
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sun Feb 28, 2021 10:13 pm
Contact:

Re: Locate specific items "missing the material for construction " on the map

Post by Annihilannic »

That's perfect, thanks! Can I bind that to a key somehow?

Pi-C
Smart Inserter
Smart Inserter
Posts: 1648
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Locate specific items "missing the material for construction " on the map

Post by Pi-C »

Annihilannic wrote:
Sun Jul 18, 2021 7:42 am
Can I bind that to a key somehow?
I've made you a mini-mod. It's too specialized, so I won't upload it to the mod portal -- just download it here and put it in your mod folder! Also, I didn't define a key-binding yet, you must set it yourself (Settings --> Controls from the main menu). Alternatively, you can enter this command in the chat window:

Code: Select all

/find_ghosts
Attachments
find_ghosts_0.0.1.zip
(2.28 KiB) Downloaded 76 times
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Annihilannic
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sun Feb 28, 2021 10:13 pm
Contact:

Re: Locate specific items "missing the material for construction " on the map

Post by Annihilannic »

Perfection packaged! :-) Thanks!!

Pi-C
Smart Inserter
Smart Inserter
Posts: 1648
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Locate specific items "missing the material for construction " on the map

Post by Pi-C »

Glad I could help out … :-D
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Locate specific items "missing the material for construction " on the map

Post by Qon »

I made a mod that I never released that gives buttons, timers and maybe hotkeys for running commands. I don't have access to it right now (...because I didn't release it basically) but I guess this request is a perfect argument for actually finishing and releasing it.

Pi-C
Smart Inserter
Smart Inserter
Posts: 1648
Joined: Sun Oct 14, 2018 8:13 am
Contact:

Re: Locate specific items "missing the material for construction " on the map

Post by Pi-C »

Qon wrote:
Mon Jul 19, 2021 10:31 am
I made a mod that I never released that gives buttons, timers and maybe hotkeys for running commands. I don't have access to it right now (...because I didn't release it basically) but I guess this request is a perfect argument for actually finishing and releasing it.
Seems like it. My mini-mod really is very specific, for running just one hard-coded search. Something a bit more general (perhaps even allowing users to add/remove their own commands and key bindings?) could be quite useful.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!

Qon
Smart Inserter
Smart Inserter
Posts: 2119
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: Locate specific items "missing the material for construction " on the map

Post by Qon »

Yes that is exactly what it was. Some buttons with a textfield (for code) and a timer each, and some hotkeys that would activate those same codes. And you can just write any lua command in those boxes. And if you set a timer then you can run commands periodically.

Post Reply

Return to “Gameplay Help”