Pipe flow graphics

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Pipe flow graphics

Post by Deadlock989 »

Is there anyone knowledgeable about how these work? Or is there documentation somewhere? Searched but couldn't find it.

I'm making new pipes and have the sprites for the pipes themselves, including the variant with the window, but I'm struggling with the pipe flow graphics. It's hard to tell what's going on just from data.raw. I could give up and have the window in exactly the same place as the vanilla pipe window but that's a different kind of hassle.

This is what I've figured out so far:

- There are layers: pipe on top, horizontal_ and vertical_window_background at the back, various flow sprites in between
- There's fluid_background - is this the main block of colour?
- There are then four more sprites which must be the moving liquid, drawn additively on top of the colour block - gas_flow, high_temperature_flow, medium_temperature_flow, low_temperature_flow. gas_flow is a different size to the others for some reason
- Outside of the pictures definition, there are then two bounding boxes for horizontal and vertical flow.

The problems:

- It's not clear how the flow sprites are positioned. They don't have a shift attribute in data.raw. fluid_background seems to take its position directly from the bounding box. The flow sprites do something different. If I move the bounding box to match the window (my windows are aligned centrally on the horizontal axis, but higher than central on the vertical axis) then the vertical flow graphics expand outside of the sprite area (see pic below) and outside of the bounding box that I defined.
- How is the fluid_background sized - it depends on how much fluid is in the fluid box, but how exactly? It gets wider and narrower but is it centred on the bounding box or what?

Cheers.
Image
Image

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Pipe flow graphics

Post by Deadlock989 »

Anyone? Anyone? Bueller? Bueller?
Image

Post Reply

Return to “Modding help”