GhostPlacerExpress

by unhott

Early game blueprints now have a use! No more meticulous placement, pipetting, or rotating! Just hover over a ghost and it will be placed. Toggle on/off with SHIFT Y.

Utilities
4 years ago
0.16 - 1.1
8.96K

b Compatibility with other mods

6 years ago

Thanks for this cool mod. I noticed 1 bug. When an assembler is placed it won't have Bottleneck status dot. Maybe some API event is not triggered when assembler is build?

6 years ago

Interesting. I will try and reproduce this and see if I can get it to work. Thanks for the feedback!

6 years ago

Could this have something to do with the bottleneck mod not detecting that the assembly table has been placed by the player (or bot)?

6 years ago

bottleneck is using (per control.lua:361 and on)

--[[ Setup event handlers ]]--
script.on_init(init)
script.on_configuration_changed(on_configuration_changed)
script.on_load(on_load)

local e=defines.events
local remove_events = {e.on_player_mined_entity, e.on_robot_pre_mined, e.on_entity_died}
local add_events = {e.on_built_entity, e.on_robot_built_entity}

----essentially, it only checks entities created by a player placing it down, or a bot placing it. a script that is creating the entity from it's own control.lua will not trigger the status icon for that assembly machine/miner/etc.

6 years ago

on_built_entity i believe only applies to items the player physically places. since GPE is using a script to create the entity and remove the item from the player's inventory it's not triggering that.

5 years ago

I was able to communicate to other mods the on_built_entity event that other mods look for, so the 0.1.1 update should fix mod compatibility issues with bottleneck. Thanks for the feedback and help.

5 years ago

Love the mod. so far it works extremely well. (not tested in multiplayer but i'm sure there are others out there)
I've been troubleshooting an issue i think is primarily related/caused by bob's logistics mod (inserter overhaul enabled)
I'm not quite sure how to explain what's going on. Hovering over inserters that aren't the basic yellow one or the burner inserter don't get replaced with the inserter-overhaul option enabled: primarily red and blue inserters, not tested on stack inserters yet.)
I'm sure it probably works just fine in vanilla or no-bob's logistics setup, and still works for things like assemblers, etc.
I think it's probably due to a naming-issue. Perhaps adding an optional dependency pointed at bob's logistics would fix?

5 years ago
(updated 5 years ago)

(also: not sure if he makes his changes to inserters during data-updates or data-final-fixes stage, so that probably matters, too...)
I tried "correcting" blueprints by using upgrade planner to change the vanilla-variety of inserters that have their recipe disabled or unattained/replaced by bob's with a different variety of inserter, but the ones bob's adds still don't auto-place. it's wierd)

5 years ago

I talked with Bob to see what his mod was doing.
I installed bobs logistics, bob function library, and creative mode so I could just go straight to testing it out. I had a couple other mods running that I didn't bother disabling, but none that I think would impact this.
I couldn't figure it out. It took me a couple of game reloads, testing back and forth to find the inserter overhaul is a main menu setting.
Then I finally got the issue to appear! Or so I thought... I had just forgotten to enable GPE this time. It seemed to be working fine with various inserter types in the overhaul.
I updated the mod just before you posted this, so I want to make sure you're also on v0.1.1
If you still have this issue in v0.1.1, let me know. I can't really see the update having affected this particular issue, but it would be useful to rule it out.
When you hover over the inserters that give you issues, do any other mod names show up as having altered the item? A full mod list may help out, too.

0.17 is definitely going to mess with this mod. I also need to update the main logic of my mod (it is super inefficient!) due to some recent things I've learned from the API site.
I'd like to figure this out before then!

5 years ago

i did update to 1.1.
ugh...
And now i'm noticing something else odd: even if i'm not pressing the mouse-down button, occasionally my player will place the item i'm holding as i move around the map (not over a ghost and with the GPE disabled), or on occasion open up a GUI as if i clicked the mouse but i KNOW i didn't. (removing the mod and starting a new map doesn't have this occur ever, but as soon as i re-add GPE, it happens every so often.

not sure if this is directly caused by the update, but it's never done this before.

5 years ago
(updated 5 years ago)

can't figure this out), sometimes my guy goes crazy placing items or opening inventories when i don't press the mouse button, other times i can't seem to reproduce the issue to isolate what's causing it. but only started after updating.

5 years ago

did you change the logic of when/how it auto-places?

5 years ago

also: modification info for inserters:
"Bob's logistics mod > bob's adjustable inserters > natural evolution enemies"

5 years ago
(updated 5 years ago)

---could be a personal issue issue /hardware related. i'll buy another mouse when i'm out this weekend. :[
edit: confirmed my house is cause of this. ugh.

5 years ago

It could be an issue where if your mouse button is down due to the hardware malfunction then GPE won’t place items. Did the new mouse seem to resolve the inserter issues as well?

5 years ago

Well it stopped the erratic behaviour i was having (didn't realize it wasn't mod related till it was affecting chrome and the rest of my computer, accidentally "click-and-dragging items when i never clicked), Took care of that, but certain inserters were still not being placed (even with a different mouse). looked into the code a bit after double-checking the modification string that referenced bob's mods and natural evolution, and decided, on a hunch to try adding those as optional dependencies and that corrected MOST of them. (express inserter and express stack inserters still won't auto-place) other varieties that hadn't been before now do (with the edit/inclusion of the optional dependencies below)...not sure why there are still some that aren't... Looking into it some more...

new info.json dependency line:
"dependencies": ["base >= 0.16", "? boblogistics", "? bobinserters", "? Natural_Evolution_Enemies"],

5 years ago
(updated 5 years ago)

i'm still pretty confident this is related somehow to bob's inserter-overhaul option in startup settings but i don't understand WHY exactly it's occuring even after tellling GPE to load after those mods when some inserters are corrected by this but others aren't...

I found something in bob's logistic's control.lua file that may be related to it, but not sure...

Beginning line 367 of bob's logistics's control.lua file
it even changes the inner_name /internal name-string of ghost entities specifically for the red and blue inserters (the ones that aren't working).
I think this is likely due to the fact that the inserter overhaul also renames the items, so this "trick" may be required to make it possible for bots to place the inserters.

Ummm, may still need to include the author of bob's logistics in on this to figure out of the change needs to occur on his end or GPE's.

5 years ago

I found something that i thought might work-- but after testing it still doesn't.

Bobs logistics will change the item-place-result from item prototypes as well as the mine-result of prototypes from entities.
Normally you want the item's 'place result' to be the entity that has the 'mine result' equal to the original item, but I think Bob had to disrupt that to achieve a certain functionality.

Originally my mod was looking to match the item-name with the entity ghost-name, which I thought was maybe the cause of this problem. So I rewrote my mod logic to check all items that have the 'place result' for the selected entity, and this still doesn't seem to quite fix whatever is going on with bob's logistics.

5 years ago

what i found odd was that adding an optional dependency corrected SOME of the inserters, but not all of them.

New response