Industrial Revolution 3 Patchset for 2.0 (Unofficial IR3)

by Shemp

Deadlock989's classic overhaul IR3 with a unique art-style and age-based progression. This is a command-line script which installs additional code and patches into the original files to make them compatible with Factorio 2.0. Requires manual assembly.

Overhaul
13 days ago
2.0
1.38K
Transportation Logistics Environment Mining Fluids Manufacturing Power

i [Third-party add-on] Air pipe changes.

a month ago
(updated a month ago)

Hello again! Ok so I have a few suggestions regarding air pipes. Here’s my pitch:

  • Make air pipes able to carry all gases (nat. gas, sour gas, etc). Currently, they’re restricted to only compressed air, which isn’t very useful…
  • Make regular pipes unable to carry gaseous fluids (except maybe steam/sour gas). This would incentivize the player to actually use air pipes.
  • Replace the iron components they use with steel components (it would make sense considering gas manipulation is unlocked with steel).

It would be neat if you could implement this, but if not I’d like some advice to do it myself. Is this feasible?
(I don’t have much time to chat right now, so I’ll write a little more about it tonight.)

a month ago

Large balance changes like this won't be added to the Patchset. (The things that I have changed are to implement 2.0 features or for third-party mod compatibility.)

The fluid_box on pipes have a "filter" property, but you can assign only a single fluid, which is why IR3 has the water, steam and air pipes.

I think connection_category is a new feature in 2.0, which is how Space Age is able to prevent fusion plasma from entering standard pipes.

You might be able to hack this all together to make a new kind of pipe that only takes gaseous fluids from certain machines (and you'd need to change the machine outputs too).

a month ago
(updated a month ago)

Alright. I do understand why you wouldn't add this to your patchset.
I'll look into connection_category. I am aware the factorio devs said they would not make the filter property a list, so abusing that might be the next best thing.

Call a plumber might also be a potential fix to this, but I'd rather depend on the least amounts of mods for mine.
I'll put this on the back burner, and try to implement it to my addon eventually... when it comes out...

a month ago
(updated a month ago)

I can say i remember discussion on the topic back in the old IR3 github. That was the original intention. Having different pipes for gases and liquids. But it wasn't possible api wise, as you said. I think if possible now, it would be a good change, have the current air pipes be gas pipes and move them up the tech tree to where they would be sensible. Either at the same time iron pipes are unlocked or to the first oil processing tech that gives you a gas ( either sour or natural gas). Until then, players can still use copper steam pipes for steam.

EDIT: Wait, if i understand the connection-category. You couldn't have the refinery outputing gases nad fluids on the same port depending on the recipe, because it's the port itself that could connect to a pipe type or the other (or both, defeating the purpose)

a month ago

EDIT: Wait, if i understand the connection-category. You couldn't have the refinery outputing gases nad fluids on the same port depending on the recipe, because it's the port itself that could connect to a pipe type or the other (or both, defeating the purpose)

Yeah, that's the unfortunate part.
However, I think "Call a plumber" might offer a satisfying solution. Then again, Shemp might not implement this into LSA (which is reasonable), I'll try to implement it in my addon eventually. (and maybe special refractory pipes for molten metals)

26 days ago
(updated 26 days ago)

Hey Shemp, I'm trying to code an addon to make call a plumber do what I want with the IR3 pipes, but I'm having trouble with the valves.

I'm trying to remove the filter of the fluid boxes of air pipe entities, but the game doesn't seem to recognize air valves. Whether I call them as "valve" prototypes or "storage-tank" prototype (how IR3 did it before), it returns an error. (To be fair, I'm not even sure that's the correct way to remove a fluid box's filter, but I'm trying.)

Would you know how this could be fixed? Should I call this later, or is there something I forgot?
Below is a snippet of code I'm running in the data stage of my mod (which has your patched IR3 as a dependency).

-- Remove "air" filter from air pipes. Call a plumber will handle this, so the fluid specific filter needs to be removed
data.raw["pipe"]["air-pipe"].fluid_box.filter = ""
data.raw["valve"]["air-valve"].fluid_box.filter = ""
data.raw["valve"]["air-valve-overflow"].fluid_box.filter = ""
data.raw["valve"]["air-valve-underflow"].fluid_box.filter = ""
data.raw["pipe-to-ground"]["air-pipe-to-ground"].fluid_box.filter = ""
data.raw["pipe-to-ground"]["air-pipe-to-ground-short"].fluid_box.filter = ""
26 days ago

Run it in data-updates, this is when the Patchset makes changes to entities.

20 days ago

Well, I'm done making an addon that adds that feature.
It relies on Call a plumber to make pipes burst when they're filled with incompatible fluids.
It's rough around the edges and not entirely foolproof, but it should be working fine enough to work seemlessly on new save files.

20 days ago

Seems to work okay from what I can see. Some points of feedback:

  • You might want to make "Electric derrick" technology depend on "Air filtering".
  • Having pipes repeatedly explode and then get replaced by robots is a bit annoying, I wonder if there is a way to cancel having the pipe ghost appear.
  • I would say that your add-on doesn't respect the "Show short undergrounds" startup setting... if it didn't make the Patchset crash, oops! I'll have that fixed for next time.

Until then, you'll want to do a test for

if settings.startup["ir3patchset-show-short-pipes"].value == "on" then
  -- Declare the short variant
end
19 days ago
(updated 19 days ago)

Thanks for the feedback, I've implemented a few quick fixes in version 1.0.3

  • You might want to make "Electric derrick" technology depend on "Air filtering".

I've decided the simplest solution was to move the gas pipe recipes (including valve and undergrounds) up the tech tree to the steel milestone tech.
That way, you unlock steel pipes with steel just like how you'd unlock regular pipes with iron (and not fluid handling).

Since steel derricks depend on the steel milestone tech, this should fix the unlock order issue.
Air filtering doesn't unlock gas pipes anymore, which is fine since you need steel analysis packs to research it anyway.

  • [...] your add-on doesn't respect the "Show short undergrounds" startup setting [...]

I copied some parts of your code regarding that setting to hide short underground carbide pipes.
Hopefully it'll work fine... once the crash related to that setting is fixed ;-;

  • Having pipes repeatedly explode and then get replaced by robots is a bit annoying, I wonder if there is a way to cancel having the pipe ghost appear.

This is the big one. I'm not entirely sure how to fix this. From what I assume, call a plumber only calls for a "destroy" event on the affected pipe, and that "destroy" event automatically calls for a repair ghost. There's probably a way to fix this, but I'm not knowledgeable enough about it.

Another issue I should look to fix is the fact that "valve" prototypes are ignored by call a plumber, so they don't explode if they receive the wrong fluid, which can be exploited... but I'm not sure how to fix this without having to modify call a plumber's code directly (or rewriting it in my own code)

19 days ago

Hopefully it'll work fine... once the crash related to that setting is fixed ;-;

I did a quick fix on the Codeberg build. The trouble was, I had moved the hiding code out of data-final-fixes so the scrapping recipes don't get made. I want people to be able to scrap their short undergrounds, so I put it back.

From what I assume, call a plumber only calls for a "destroy" event on the affected pipe, and that "destroy" event automatically calls for a repair ghost.

Yes the LuaEntity::die() function creates a ghost if the player force has that technology unlocked.

I paid a little visit upstream, so hopefully we get that sorted out eventually, and perhaps get valves working too!

19 days ago
(updated 19 days ago)

Thanks for the thread on Call a plumber's discussions, I'll follow it. 👍 Hopefully half_a_cat implements these changes.

On my end, I've also added "No Pipes Touching" as a dependency to make it easier to avoid accidentally connecting the different pipe types.
All pipes can still connect to tanks, pumps and all valves (which is useful if you want to connect water pipes and regular pipes, or steam pipes and gas pipes), they just can't connect to eachother.
(I'm also thinking of forcing carbide pipes to only have short underground pipes available...)

Guess I'll get back to working slowly on my IR3 x Space Age addon for now.
Feel free to mention this pipes tweak addon on the patchset's page. :)

New response