Deadlock989 / IndustrialRevolution

Industrial Revolution 3 is an overhaul mod for Factorio.
51 stars 0 forks source link

Recursive Blueprints / explosion icons #296

Closed Hasturspex closed 1 year ago

Hasturspex commented 1 year ago

Factorio base ver 1.1.91 (build 61680, win64), IR ver 3.1.7, Recursive Blueprints ver 1.2.7

As stated, IR 3 seems incompatible with Recursive Blueprints. I have a bunch of other mods, most of them QoL, but the crash only occurs when trying to launch the game with both IR3 and RB enabled. With RB disabled, the game launches fine.

This is the error: Error while loading entity prototype "IR-blueprint-deployer-explosion" (explosion): Key "icon_size" not found in property tree at ROOT.explosion.IR-blueprint-deployer-explosion

I've read some of the other issues and read that you don't like marking every single mod that doesn't work with IR as incompatible, but this sounds like an issue that would be at least somewhat easy to fix. Also, I searched the closed issues and haven't found anything about Recursive Blueprints, which is why I created this one.

Have a nice day! :)

Deadlock989 commented 1 year ago

I can't reproduce this error with just IR3 and RB installed - it loads up just fine, although in-game there doesn't seem to be any way to unlock either of the entities that RB adds.

Please supply a full mod list, or a saved game with the mods activated that produce this error.

Deadlock989 commented 1 year ago

Without a way to reproduce this error, I'm limited in what I can do, but I have just made a couple of changes for a future version, which may or may not address the issues.

Deadlock989 commented 1 year ago

Made one further improvement to explosions here. Historically IR has been generating scrap-based "dying explosions" for entities since (I think) IR1, i.e. before Factorio left early access with 1.0, putting an IR- prefix on the explosion name. At some point (maybe for 1.0, I don't know) Factorio gained a great deal many more customised explosions for individual entities. This means that with IR3 there are currently a large number of unused vanilla explosions occupying the raw prototype table and using some RAM. In the next version IR will overwrite the majority of them with its own explosions instead - there are some exceptions where the explosion names don't fit the general scheme that applies to 95%+ of them.

Recursive Blueprints continues to load successfully with these changes but then I couldn't ever reproduce the reported error in the first place. If I get a mod list I can check further but without that I'm going to assume this issue is resolved for now.

Hasturspex commented 1 year ago

Sorry for not replying, I had a busy couple days.

I have reproduced this issue and isolated it - it only occurs when trying to launch the game with IR3, Recursive Blueprints (versions of all mods and Factorio as stated in the original post), and AAI Containers & Warehouses, ver. 0.2.11, and all the other mods I had don't seem to change anything about the error message (when trying to load with only these three mods, the error message is the same as with the full suite I had before, which is in the original message).

It's super weird, since the game loads fine with any two of the mods enabled, but with all three it breaks and blames IR3. If you resolve this issue, could you please update this thread with what was the problem? I'm quite interested in what went wrong.

Have a nice day :)

Deadlock989 commented 1 year ago

Aha. This is one of those situations where three mods all are doing something which works out fine most of the time but produces an illegal result when they all wrestle over the same thing at once.

As background, you need to know that there are two ways of defining icons for items, recipes and entities, summarised by IconSpecification. Either you supply an icons array, which is intended for layered icons, or you must supply both an icon property and an icon_size property to represent a single layer icon. The crucial part here is that if icons is present then icon is ignored, _even if icon_size is missing_. If icons is not present but icon is present and icon_size is missing, the game halts with the kind of error you got.

The three mods were conspiring to produce an illegal result as follows:

This is fixed on IR3's end for the next version (3.1.8) and all three mods will load together. RB would need to address the remaining issue with its entity icons itself.

Hasturspex commented 1 year ago

Thanks a lot for the explanation! That's pretty interesting.