Small Oil Derrick no output, pipe alignment issue

pyanodon's mods are here

Moderator: pyanodon

gwilym_e
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Sep 22, 2019 11:48 pm
Contact:

Small Oil Derrick no output, pipe alignment issue

Post by gwilym_e »

I'm running the full non-alpha suite of Py mods so I'm not 100% sure where this comes in hence the new topic, apologies if that's a faux pas but this seemed worth reporting.

Some recent version change (I'm unsure which right now) caused Small Oil Derricks to cease production on my map because they're no longer connected to their pipes. It looks like their oil output is now 1 tile inside of the building, I can even build a pipe inside the area to reconnect it.

Attached is a screenshot of some Derricks which are not producing, and one Derrick I have fixed manually to the immediate west of the player, which when highlighted you can see the blue and yellow arrows are misaligned.

I can't build the other Derricks yet to confirm but their ghosts suggest others are affected too.

Is this an intentional change that I should go and make pipe corrections for? or a bug to be fixed? If it's to be fixed I might see if I can roll back so I don't have to go placing a bunch of pipes that might cause issues with the fix (colliding entities?).
Attachments
Derricks.jpg
Derricks.jpg (3.13 MiB) Viewed 4197 times
kingarthur
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by kingarthur »

Defeninitly a bug. Please attach a save so I can look into that
gwilym_e
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Sep 22, 2019 11:48 pm
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by gwilym_e »

Here you go, and a big thank you: https://drive.google.com/file/d/11vIi2Z ... zWpVP/view

Let me know if you have issues downloading that. I'll be spending a bit of time today eliminating other mods to see if it's some sort of conflict. The one I thought of immediately was Squeak Through, but disabling that doesn't fix it.

Edit: reduced down to *only* "Py..." mods and the issue persists, of course that breaks the rest of the factory :mrgreen: but at least it doesn't seem to be a third-party conflict.
kingarthur
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by kingarthur »

its likely a factorio base change that broke something. it seemed to download fine and ill look at it in a bit and get it fixed
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3055
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by boskid »

i see it bypasses check for pipe placement, i will investigate...

hint: collision box is changed inside pypetroleumhandling inside data.lua when doing this:

Code: Select all

--((nat-from-oil))--
require("prototypes.functions.Natural-gas-from-oil-well")
-- edit:

Interesting - pypetroleumhandling_1.4.6/prototypes/functions/Natural-gas-from-oil-well.lua:

Code: Select all

--Adjust Oil Derrick Output position
--mk01
data.raw["mining-drill"]["oil-derrick-mk01"].collision_box = {{-1.4, -1.4}, {1.4, 1.4}}
data.raw["mining-drill"]["oil-derrick-mk01"].output_fluid_box.pipe_connections[1].positions = { {0, -2}, {2, 0}, {0, 2}, {-2, 0} }
--mk02
data.raw["mining-drill"]["oil-derrick-mk02"].collision_box = {{-2.4, -2.4}, {2.4, 2.4}}
data.raw["mining-drill"]["oil-derrick-mk02"].output_fluid_box.pipe_connections[1].positions = { {0, -3}, {3, 0}, {0, 3}, {-3, 0} }
--mk03
data.raw["mining-drill"]["oil-derrick-mk03"].collision_box = {{-3.4, -3.4}, {3.4, 3.4}}
data.raw["mining-drill"]["oil-derrick-mk03"].output_fluid_box.pipe_connections[1].positions = { {-1, -4}, {4, -1}, {1, 4}, {-4, 1} }
--mk04
data.raw["mining-drill"]["oil-derrick-mk04"].collision_box = {{-4.4, -4.4}, {4.4, 4.4}}
data.raw["mining-drill"]["oil-derrick-mk04"].output_fluid_box.pipe_connections[1].positions = { {0, -5}, {5, 0}, {0, 5}, {-5, 0} }
kingarthur
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by kingarthur »

ive looked it over and its working as intend for me im not sure what happened as nothing was changed with the derricks at all. picking them up or rotating them should get them working again. does remind me i need to go back and clean them up to better handle the not being able to mix fluids thing now
kingarthur
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by kingarthur »

boskid wrote: Sat Oct 19, 2019 7:38 am i see it bypasses check for pipe placement, i will investigate...

hint: collision box is changed inside pypetroleumhandling inside data.lua when doing this:

Code: Select all

--((nat-from-oil))--
require("prototypes.functions.Natural-gas-from-oil-well")
-- edit:

Interesting - pypetroleumhandling_1.4.6/prototypes/functions/Natural-gas-from-oil-well.lua:

Code: Select all

--Adjust Oil Derrick Output position
--mk01
data.raw["mining-drill"]["oil-derrick-mk01"].collision_box = {{-1.4, -1.4}, {1.4, 1.4}}
data.raw["mining-drill"]["oil-derrick-mk01"].output_fluid_box.pipe_connections[1].positions = { {0, -2}, {2, 0}, {0, 2}, {-2, 0} }
--mk02
data.raw["mining-drill"]["oil-derrick-mk02"].collision_box = {{-2.4, -2.4}, {2.4, 2.4}}
data.raw["mining-drill"]["oil-derrick-mk02"].output_fluid_box.pipe_connections[1].positions = { {0, -3}, {3, 0}, {0, 3}, {-3, 0} }
--mk03
data.raw["mining-drill"]["oil-derrick-mk03"].collision_box = {{-3.4, -3.4}, {3.4, 3.4}}
data.raw["mining-drill"]["oil-derrick-mk03"].output_fluid_box.pipe_connections[1].positions = { {-1, -4}, {4, -1}, {1, 4}, {-4, 1} }
--mk04
data.raw["mining-drill"]["oil-derrick-mk04"].collision_box = {{-4.4, -4.4}, {4.4, 4.4}}
data.raw["mining-drill"]["oil-derrick-mk04"].output_fluid_box.pipe_connections[1].positions = { {0, -5}, {5, 0}, {0, 5}, {-5, 0} }
yes. that intended. had to adjust the collision boxes to get it to work the way i wanted
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3055
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by boskid »

kingarthur wrote: Sat Oct 19, 2019 8:38 am yes. that intended. had to adjust the collision boxes to get it to work the way i wanted
If that is intended, then OP's case was not a bug from start: oil-derrick-mk1 is defined to have entity size of 3x3 (because of collision box). Btw why not move this collision box definition directly to oil-derrick? was it some clever hack to try to make entity 5x5 but with collision box of 3x3?
kingarthur
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by kingarthur »

boskid wrote: Sat Oct 19, 2019 8:42 am
kingarthur wrote: Sat Oct 19, 2019 8:38 am yes. that intended. had to adjust the collision boxes to get it to work the way i wanted
If that is intended, then OP's case was not a bug from start: oil-derrick-mk1 is defined to have entity size of 3x3 (because of collision box). Btw why not move this collision box definition directly to oil-derrick? was it some clever hack to try to make entity 5x5 but with collision box of 3x3?
y its due to the fact that as far as i can tell a pipe connection cannot be inside an entities collision box so i shrank them down by 1 to make room for a assembler type entity inside the selection area that has 2 recipes one that does oil-to-oil and a second that converts oil-to-natural-gas so the player can get both fluids from the same resource patch without me needing to do a bunch of tick based scripting stuff.

the reason i put the collision box changes there is it was so i add them in one place as it was for demonstration purposes to show pyanodon and i never got around to moving onto the entity itself.
gwilym_e
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Sep 22, 2019 11:48 pm
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by gwilym_e »

kingarthur wrote: Sat Oct 19, 2019 8:37 am ive looked it over and its working as intend for me im not sure what happened as nothing was changed with the derricks at all. picking them up or rotating them should get them working again. does remind me i need to go back and clean them up to better handle the not being able to mix fluids thing now
Thanks for looking, but neither picking up and re-placing nor rotating existing buildings fixes them for me :(

When you say working as intended for you, do you mean when my save is loaded in your Factorio? Or do you mean in a new game?

Edit: Oddly, I notice when I place the building down it gets briefly connected to the pipes its placed next to and then disconnected... not something I can easily screenshot.

Another edit: The above disconnect behaviour seems to stop when I reduce my mods to only Py mods so it may well be a conflict which is preventing me from fixing the existing buildings. I'm investigating to figure out which one.
kingarthur
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by kingarthur »

gwilym_e wrote: Sun Oct 20, 2019 12:55 am
kingarthur wrote: Sat Oct 19, 2019 8:37 am ive looked it over and its working as intend for me im not sure what happened as nothing was changed with the derricks at all. picking them up or rotating them should get them working again. does remind me i need to go back and clean them up to better handle the not being able to mix fluids thing now
Thanks for looking, but neither picking up and re-placing nor rotating existing buildings fixes them for me :(

When you say working as intended for you, do you mean when my save is loaded in your Factorio? Or do you mean in a new game?

Edit: Oddly, I notice when I place the building down it gets briefly connected to the pipes its placed next to and then disconnected... not something I can easily screenshot.

Another edit: The above disconnect behaviour seems to stop when I reduce my mods to only Py mods so it may well be a conflict which is preventing me from fixing the existing buildings. I'm investigating to figure out which one.
in a earlier post you said it was occurring even with just py but im not getting that but when i load up the save with all mods im also getting that same disconnect behavior. if you can find which mod that seems to be causing that i can try and sort out what its doing. or ill dig deeper into the mod conflict when im at home as i cant load all those mods right now.
gwilym_e
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Sep 22, 2019 11:48 pm
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by gwilym_e »

Found the conflict at least: Biters Begone! 0.2.0

I've no Factorio modding experience but I can dig into the mod's lua a little ... here's what I found:

This mod destroys biter entities, and it seems as though placing a derrick causes the "on_chunk_charted" event to be emitted shortly after placement. This mod uses this event to clear areas.

The mod uses `surface.find_entities_filtered({force="enemy"})` to find biter entities, and the assembler machine (py-converter-valve) entity built into these oil derricks is considered "enemy" force and is removed. When I game.print out the assembler machine's `entity.force.name` it is indeed "enemy".

I suppose there's a reason for that and this may not be fixable, but at least I know why now so I can remove the conflicting mod for now.
in a earlier post you said it was occurring even with just py
Yeah, my bad: all I did was load the save with only Py mods enabled and observed that the buildings were not immediately fixed; when trying with only Py mods I never tried removing and re-placing them. This symptom makes sense given the conflict detailed above: the entities are simply gone.
kingarthur
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by kingarthur »

gwilym_e wrote: Sun Oct 20, 2019 2:40 am Found the conflict at least: Biters Begone! 0.2.0

I've no Factorio modding experience but I can dig into the mod's lua a little ... here's what I found:

This mod destroys biter entities, and it seems as though placing a derrick causes the "on_chunk_charted" event to be emitted shortly after placement. This mod uses this event to clear areas.

The mod uses `surface.find_entities_filtered({force="enemy"})` to find biter entities, and the assembler machine (py-converter-valve) entity built into these oil derricks is considered "enemy" force and is removed. When I game.print out the assembler machine's `entity.force.name` it is indeed "enemy".

I suppose there's a reason for that and this may not be fixable, but at least I know why now so I can remove the conflicting mod for now.
in a earlier post you said it was occurring even with just py
Yeah, my bad: all I did was load the save with only Py mods enabled and observed that the buildings were not immediately fixed; when trying with only Py mods I never tried removing and re-placing them. This symptom makes sense given the conflict detailed above: the entities are simply gone.
ok. thats not that big of an issue then. i was not aware the game defaults script placed entities to the enemy force. ill specify the force to the player and it should fix that problem. no need to remove that other mod as ill get it edited and upload a fix asap. be up in like a hour max
gwilym_e
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Sep 22, 2019 11:48 pm
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by gwilym_e »

Brilliant! No rush on my behalf though, wouldn't want you to inadvertently cause a bug due to the force change just to fix my edge case... I temporarily patched the other mod to not remove the valves :mrgreen:
kingarthur
Smart Inserter
Smart Inserter
Posts: 1463
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by kingarthur »

gwilym_e wrote: Sun Oct 20, 2019 3:11 am Brilliant! No rush on my behalf though, wouldn't want you to inadvertently cause a bug due to the force change just to fix my edge case... I temporarily patched the other mod to not remove the valves :mrgreen:
its fine i was already working on other things so its was just a small delay to add that. and it shouldn't break anything as all i did was set the force properly when a new pumpjack is placed. i loaded up the save and tested it with biter begone active and picking up and replacing the pumpjacks fixes the issue and they do not get deleted anymore with pyph v1.4.7 that ive just posted to the mod portal
gwilym_e
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sun Sep 22, 2019 11:48 pm
Contact:

Re: Small Oil Derrick no output, pipe alignment issue

Post by gwilym_e »

Fix confirmed, thanks!
Post Reply

Return to “PyMods”