Ghost Scanner

by Optera

Adds a combinator reading ghost requests from the logistic network it's placed in.

Content
1 year, 3 months ago
0.16 - 1.1
10.9K
Circuit network

b [Fixed] Some items become undetectable

1 year, 9 months ago

Playing with this mod for a while now and it happens more often now that some ghosts won't be detected for some reason, I can remove the ghost and place it one tile over and it's detected again. if I place it at the same place again, it's invisible to the scanner.

I know that OP won't update it, but maybe if someone else could take on this ... consider this the first bug report.

1 year, 8 months ago

+1. Sorry I can't add more help, other than bumping this up :)

1 year, 8 months ago

1) Are the ghosts within roboport construction zone?
2) Do ghosts exceed setting Scan Result limit?

1 year, 8 months ago
  1. Yes. I was placing a few roboport ghosts side by side. It detected all of the roboports except 2. If I remove an undetected roboport ghost and place it a couple tiles away then it would detect it.
  2. No. I have scan limit at default (1000?) and I was only placing about a dozen new ghosts.

I have a saved game with the repro if you want it.

1 year, 7 months ago

Same problem, just started happening now after using the mod for a week or more.

1 year, 7 months ago

I'm unable to reproduce that.
Please upload a save with only Ghost Scanner where this problem occurs.

1 year, 7 months ago

I can confirm something does happen and scanner stops seeing some buildings. https://cdn.discordapp.com/attachments/419527276875481111/1021074557865570374/unknown.png example in my game, scanner in image was placed after buildings, but same issue was with the one placed before i put blueprint in. As you can see, it only sees ghosts of itself nearby, but two other ghosts it does nothing about.
I did try to reproduce it in a new game, but there it works as expected.

1 year, 7 months ago
(updated 1 year, 7 months ago)

That screenshot shows nothing.
1) Where are the logistic networks ranges, where are the construction ranges?
2) How many other ghosts are there?
3) Since those are modded buildings, are they even placeable by bots?
items_to_place_this has to be set in case multiple or different items are required to build something
items returned by items_to_place_this have to be hidden=false

1 year, 7 months ago

Sorry.
1) Whole area is covered by roboports, they are just outside in picture, it's one giant orange blob and there are no gaps in coverage under those ghosts. everything connected properly and supplied with power. Everything around was placed by bots based on ghost scanner readings.
2) only 3 ghosts were left unplaced, the ones scanner didn't report, thus actual buildings weren't requested.
3) yes, those buildings are perfectly placeable by bots.
i'm no coder, can't comment/reply about it code specific stuff.

It seems to be somehow tied with actual position of a ghost, if i move it around a bit ghost scanner starts seeing it. Small video showing that interaction from my world: https://cdn.discordapp.com/attachments/1021625462759366738/1021626521611407420/ghost_scanner_being_strange.mp4

1 year, 7 months ago

That looks like the ghost is somehow outside the construction area of the network the scanner is in.
Do you have modded roboports where construction area is smaller than logistics area not covering that 1 tile?
Does the scanner find the ghost if you place an unmodded vanilla roboport next to the ghost?

1 year, 7 months ago

those are unmodded roboports

1 year, 7 months ago
(updated 1 year, 7 months ago)

yeah, unmodded roboports, 100% within the range of their construction area. if the item is put into a chest, the bots will build it. it's just not registered by the scanner for some reason.

there is one thing I noted: it happens only with buildings larger than 1x1, at first I thought only modded buildings but now I have a ROW of vanilla chemical plants that aren't registered. https://i.imgur.com/JOIvBsp.png

edit:
here is a savegame: https://www.dropbox.com/s/fblg3yvkcxxnvyw/SE%20bug.zip?dl=0
and you can find the location in question here: https://i.imgur.com/dYiKloh.png
I know it's a bit big save, you can probably crop it with SE features. ... and a lot of mods.

I forgot one thing, I changed the update rate of ghost scanner for my game, you find it here: https://www.dropbox.com/s/q1h4jbrvd38gms8/GhostScanner_2.0.0.zip?dl=0
it might take 2 seconds for a placed ghost to update at the scanner but the fps/ups is 10 higher, which is totally worth it. I still want to try to further increase the performance, but I don't have much time for it.
The bug was there before I did the change, so you could easily just replace it with the original version.

1 year, 7 months ago

Thanks for the save.

I currently hit a wall figuring out why replacing some roboports fixes the problem.
It's even different ones that need to be replaced depending on where the sensor is.

1 year, 6 months ago
(updated 1 year, 6 months ago)

I'm currently in the process of completely reworking the mod and hitting the same bug. it seems to be a genuine vanilla api bug.

the problem is really on what the api returns on
local entities = search_area.surface.find_entities_filtered{area=search_area.bounds, limit=result_limit, type="entity-ghost", force=search_area.force}

interesting: placing a new roboport next to the old one, removing the old one, placing a new on on the same pos -> changes nothing.
removing the roboport in question and having the ghosts out of reach of any other roboport, then replacing it -> fixes the signals (at least from what I tried)

here is a tiny test map with the same bug: https://www.dropbox.com/s/0fjdo5iw9kms9wu/ghost%20scanner%20test%20-%20BUG.zip?dl=0

update: my time usage is terrible xD, just as bad as the original mod but a lot more consistent.

1 year, 6 months ago

Thanks for keeping me informed.
As API bug you should post your findings as bug report to factorio forums if you haven't done so already.

1 year, 6 months ago

haven't done yet, will post it now I guess.

update on my mod changes: my time usage is now on 5.5-6 ... which isn't any better than my previous changes, but at least the time isn't spiking anymore.
changing the update frequency will bring down the time to 3-3.5, which is way better (but can still be improved)

1 year, 6 months ago
(updated 1 year, 6 months ago)

solution:
move found_entities[uid] = true
from line 275 below line 276: if is_in_bbox(e.position, search_area.bounds) then

same in line 303

1 year, 6 months ago

In hindsight I should have seen that.
Anyways fixed in 1.6.6

This thread has been locked.