Krastorio Legacy deprecated


Caution!!! Krastorio 2 is now available! Therefore Krastorio Legacy is no longer supported! This mod expands the endgame, adds 30+ HR buildings, 60+ technologies, new ores, new items and rebalances almost all vanilla game content, making it harder.

Overhaul
4 years ago
0.17 - 0.18
164

g Reverse Factory Optional Dependency?

4 years ago

So just wondering, but is there any particular reason you have reverse factory listed as an optional dependency? Reverse factory is the type of mod that likes to load after every other mod has modified the recipe tables, so any changes that this mod makes to recipes during data-final-fixes won't be properly reflected in reverse factory.

For reference, reverse factory is a recycling machine mod, checking all items for a corresponding recipe of the same name, and creating a reverse recipe.

There was a previous error involving an item and recipe being removed after my mod had created a reverse recipe, and it seems the issue was resolved somehow on Krastorio's end in version 1.2.1

But this should have been solved in the other direction, with reverse factory having an optional dependency to this mod, ensuring that any recipe changes made here would be made before reverse factory tried reversing them.

I bring this up because I've just now gotten around to testing Krastorio with my other mods, and noticed that I couldn't add this mod as an optional dependency to mini machines, as it would cause a circular dependency loop.

Similarly, mini machines likes to run after other mods have edited vanilla machines, in order to properly copy the properties of assembling machines, furnaces, etc. when making the smaller versions of those machines.

So just wondering if you could maybe change that, or if there's any specific reason to have that dependency there.

Linver β˜†
4 years ago

Debug ecos ahah.
I have to update two dependecy, so I will do it now. Look for update 1.2.25

4 years ago

Oooh, sweet. Thanks!

Linver β˜†
4 years ago

U are welcome

4 years ago

Okay, so I'm having another issue now.. it seems that Krastorio has a dependency to Space Exploration Post Process mod, which has a dependency to Reverse Factory, so I can't add Krastorio as a dependency to Reverse Factory without causing a dependency loop.

Is there any particular reason you have the post-process mod as an optional dependency?

4 years ago

AFAIK, you're not supposed to do it like that. Post is meant to finish off Space exploration on other mod stuff, to make sure they have the right collision and such.

Linver β˜†
4 years ago

Because I don't trust in SE post process, when I talk with Earendel for make SE and Krastorio compatible he
didn't give me very precise information.

Krastorio have some script for make SE compatible and work better if Krastorio modify SE when is fully loaded. Krastorio script make consistent the different modifications that SE and Krastorio make on vanilla game, and fix some collision mask and mainly change most of all techologies prerequisites and some related recipes.

I will try to remove that dependency for u, but if will make new bugs I must re insert that inside.

4 years ago

Earendel said this on the Discord for Space Exploration:

"The postprocess mod is designed to load after every other mod. It should not be the dependency of other mods. It does change some recipes but only as part of mod compatibility. If anything that happens in the postprocess mod causes a problem I can disable that code if Krastorio is detected."

It seems like he's willing to communicate about any errors that might appear with the dependency removed. So if he can fix the issues on his end, then you can remove the dependency safely, and then I can add in the Krastorio dependency to my two mods. Hopefully.

Linver β˜†
4 years ago

Let's try

4 years ago

Well... Worse case, you can always make your own post procceses mod. That should prevent the loop.

Linver β˜†
4 years ago

If Earendel become available to proposal we could fix problems togheter, but I will not make another Krastorio dependecy, aswil's already too much, people still hate me for have made a dependecy for Krastorio

4 years ago

people complaining about the aswil dependency are fools.

meanwhile, uh, you can actually set a metatable on data.raw and use that to run code "after" your data-final-fixes. See https://www.lua.org/manual/5.2/manual.html#2.4 for reference ... and be aware you are not the first mod to do this, so you should definitely wrap the existing metatable and call through to it for, eg, newindex or whatever.

so, kryzeth, unless that is revoked, you might want to do that? it'll let you catch new recipe prototypes being added at any stage along the way without needing to have your mod loaded last.

though you should probably depend on something like aswil, a common library, that you add generic support for multiple subscribers to the "new recipe prototype" "event" in. just because wrapping metatables is annoying and bug prone. just sayin'

4 years ago
(updated 4 years ago)

@linver Hm, I recently made a change to both of my mods requiring the use of the Factorio stdlib; I didn't get any backlash at all. Although I did explain my reasoning for it, made an announcement post about it, and put it in the changelog to advise as many users as I could.

You probably have more active users than my mod does, but I think it was just a vocal minority complaining about it, and the majority of users just quietly downloaded the new requirement and moved on.

@slippycheeze Hm, that sounds... complicated. Maybe I'm just not understanding the terminology. I might need an example of another mod that does this, because that would be incredibly helpful, and I wouldn't have to run any optional dependencies in that case.

Is aswil that common? Krastorio is the first (and so far, the only) mod I've downloaded that uses aswil. But then again, it seems every set of mods has its own special library now. Bobs was the first, but it made sense when he had so many optional mods that used similar replacement code. But then Picker fragmented into multiple different mods and created the Factorio stdlib, and then Optera released his library for LTN and Loader Redux. They seem to have exploded in popularity around 0.17 for some reason.

Linver β˜†
4 years ago

The problem is that on mod portal there's many library, but is not well documented (I'm trying too to document aswil but I need time), and stdlib that is the only one readable don't do the same thing that I need, so I have write my own lib. In the aswil description I have specified that is meant for Krastorio compatibility purpose, the aim isn't "make another useless standard". I suggest u to look inside it for understand why I write it, is full of brainless method (like: function a do this, I don't care how u do it I need this result with less line in the main code)

4 years ago

I can understand that. Even the Factorio stdlib doesn't do everything I need, and have to make my own functions to do somewhat simple things.

New response