EarendelDevelopers / factorio-mods

This is a public repository for tracking issues with Earendel's factorio mods.
19 stars 3 forks source link

IR3 + AAI Loaders #265

Closed Deadlock989 closed 1 year ago

Deadlock989 commented 1 year ago

Thank you for including built-in support for IR2 and IR3 in AAI Loaders, it's appreciated.

There is currently an oversight in IR3's tech tree generator process which is preventing the first Loader technology from being unlocked (Deadlock989/IndustrialRevolution#131). This was caused by the first Loaders tech being dependent on the logistics-science-pack technology which is hidden in IR3 - the tree generator is supposed to handle this kind of situation automatically, but an oversight in the mapping of vanilla science packs to IR3 techs meant it was failing in the specific case of the logistic-science-pack tech. I have fixed this issue for the next IR3 release. I have also added a soft hidden dependency on AAI Loaders to prevent any future mod order issues.

With that issue fixed, the loader techs are all unlockable, but in IR3 the given prerequisites for the loader techs are a little off, especially in the highest tier - Express Loaders is coming in after blue electronics, about five or six levels down the tree from where it should be. I think this is because the mapping of vanilla science packs to IR "analysis packs" is different in IR2 and IR3 - I can explain in more detail if required but if you're not familiar with the IR3 tech tree (which has only been out for a few days) it would be confusing at this point.

I recommend one of two things:

InappropriatePenguin commented 1 year ago

I just tested out option 1 and it appears to work quite well. In addition to the matching logistics tech, I'm also adding the previous loader tier tech as a prerequisite for fast and express loader techs—I trust that shouldn't be a problem? I'm adding the IR_native field to the loader tech prototypes on our end when IR is detected, so you shouldn't need to bother with that.

Deadlock989 commented 1 year ago

I just tested out option 1 and it appears to work quite well. In addition to the matching logistics tech, I'm also adding the previous loader tier tech as a prerequisite for fast and express loader techs—I trust that shouldn't be a problem?

No, it makes sense.

This is what I see if I also include the previous loader tier:

Untitled-1

My only other thought is conditionally including lubricant tech in aai-loader's prereqs if the mod is in lubricant mode, or just including it regardless if that's a hassle. Lubricant is used in steel motors ("electric-engine-unit") in IR3 so it's implicitly required by the fast and express techs already, but the iron motors ("iron-motor") in yellow loaders doesn't use lubricant.

Deadlock989 commented 1 year ago

Yeah, it definitely works out better including lubricant in aai-loader's prereqs.

image

InappropriatePenguin commented 1 year ago

We do actually already conditionally add lubricant tech as a pre-requisite to the fast-loader tech if the "lubricated" start-up setting is selected. Presumably it's getting removed at some point?

We conditionally also add "oil-processing" as a pre-req for yellow loaders because we optionally add an early-but-quite-bad crude oil-to-lubricant recipe, to allow the loaders to be used. Even when that cheap recipe setting is force-enabled, I don't actually see it, so perhaps it's simpler to just move the conditional lubricant pre-requisite to the yellow loader tech.

Deadlock989 commented 1 year ago

The IR3 tree generator removes redundant prereqs automatically (for techs flagged as native) so if, e.g., fast-loader depends on steel motors and lubricant, the prereq for lubricant is automatically removed because steel motors are already dependent on lubricant.

The tech "oil-processing" isn't used and is hidden in IR3 - it should be mapped to a tech called "ir-crude-oil-processing" automatically, but unknown unlocks in hidden techs aren't currently handled. I think it is still used in IR2 however.

I think it's good to conditionally include lubricant for aai-loader if it's not a hassle - this is the kind of thing the IR tree generator is bad at, it has no way of knowing that lubricant is used as a scripted fuel-like thing, or anything else that isn't explicit in a recipe. I call things like that "conceptual prerequisites" in IR's set up (e.g. the existence of electricity, braking force depending on the existence of locomotives etc.).

The big plus of the generator is that you can change recipe ingredients without having to even think about moving techs around.

InappropriatePenguin commented 1 year ago

The tech "oil-processing" isn't used and is hidden in IR3 - it should be mapped to a tech called "ir-crude-oil-processing" automatically, but unknown unlocks in hidden techs aren't currently handled.

Ah, that explains it.

I think it's good to conditionally include lubricant for aai-loader if it's not a hassle - this is the kind of thing the IR tree generator is bad at, it has no way of knowing that lubricant is used as a scripted fuel-like thing, or anything else that isn't explicit in a recipe. I call things like that "conceptual prerequisites" in IR's set up (e.g. the existence of electricity, braking force depending on the existence of locomotives etc.).

Definitely not a hassle. Should be part of the next release.

The big plus of the generator is that you can change recipe ingredients without having to even think about moving techs around.

That sounds incredibly convenient!

InappropriatePenguin commented 1 year ago

Fantastic work with IR3 by the way. I'm still extremely early in my playthrough, but if it's half as good as IR2, I'll be quite happy. The small assemblers are a wonderful addition.

Deadlock989 commented 1 year ago

Thanks, and thanks for the support with this.

Also, very nice work with the loaders. I had a similar idea for a new take on "stacking beltboxes" - a composite loader/assembler entity that ate lubricant - but never got around to it.

InappropriatePenguin commented 1 year ago

You're welcome and thank you!

Yeah, the fluid usage was entirely Earendel's idea and implementation. Loaders are ludicrously overpowered as is, so anything to make them somewhat balanced is a plus.