K2_TurretsFixed

by GLaDO5

This mod adds three large and powerful turrets and one small building that acts like a radar and opens up a small section of the map without scanning far sectors, but at the same time consumes a small amount of energy.

Content
5 months ago
2.0
1.67K
Combat

b Crash on startup with K2 Steel Pipes + K2 Fluid Storage

2 months ago

Lol, sorry for being here again, but this was a fun one. A three directional mod incompatibility? Yikes, "never before in my 20 years of factorio modpack creation-" okay I'll just get on with the report.

Issue:
When loading these three mods together:
- k2-fluid-storage (1.2.1)
- k2-steel-pipes (2.1.0)
- K2_TurretsFixed (2.0.4)

This error occurs during startup.

Failed to load mods: __k2-fluid-storage__/prototypes/fluid-storage-1/entity.lua:142: attempt to index field 'storage-tank' (a nil value)
stack traceback:
    __k2-fluid-storage__/prototypes/fluid-storage-1/entity.lua:142: in main chunk
    [C]: in function 'require'
    __k2-fluid-storage__/prototypes/fluid-storage-1/index.lua:8: in main chunk
    [C]: in function 'require'
    __k2-fluid-storage__/data.lua:12: in main chunk

Mods to be disabled:
• k2-fluid-storage (1.2.1)

Notes:
The crash only happens when all 3 are active. You can use them alone or in groups of 2 and it loads fine.

I also sent a report to the k2-fluid and k2-steel author on their GitHub (made by the same person, optional dependency on eachother, they are meant to work together), as I thought it was very much in their area to solve as this exact error with a different item has occurred previously with their mod. But after seeing that there are currently issues from Oct/Nov 2024 still open with no response on the k2-steel GitHub, I'm not sure if the project is being maintained anymore so I'm just sending it to everybody.
I'm pretty sure its 100% in their area to solve, as the issue has occurred before with their mod like I said, but if some compatibility workaround could be made, then, it could? What a sentence!

If this isn't solvable from your end, I'd understand, but I just don't see a point in waiting to make the report to you as well when the other author has been unresponsive already, I'm just impatient lol.

2 months ago
(updated 2 months ago)

Update:

To fix the error, in the archive with the mod "k2-fluid-storage" you need to find the file "entity.lua" along the path:

(1). k2-fluid-storage_1.2.1.zip!\k2-fluid-storage_1.2.1\prototypes\fluid-storage-1\entity.lua

At the end of the file, find the line and delete it:

circuit_wire_connection_points = circuit_connector_definitions["storage-tank"].points,

There you also need to correct the line:

circuit_connector_sprites = circuit_connector_definitions["storage-tank"].sprites,

to the line:

circuit_connector = circuit_connector_definitions["storage-tank"],

(2). k2-fluid-storage_1.2.1.zip!\k2-fluid-storage_1.2.1\prototypes\fluid-storage-2\entity.lua

At the end of the file, find the line and delete it:

circuit_wire_connection_points = circuit_connector_definitions["storage-tank"].points,

There you also need to correct the line:

circuit_connector_sprites = circuit_connector_definitions["storage-tank"].sprites,

to the line:

circuit_connector = circuit_connector_definitions["storage-tank"],

It turns out that you need to delete 2 lines, and fix 2 more lines in these 2 files along the path above. In the current version of Factorio, this parameter is not used when creating entities.

2 months ago
2 months ago

Oh haha you're awesome!

I saw this when you first responded, and went to change the initial 2 lines, but saw those other lines nearby with the same "circuit_connector" thing I've seen before (that causes errors like you said) and was unsure of needing to change those too, so I got distracted and continued writing some other comment on the portal. Come back and it turns out you've not only completely figured it out but also uploaded it for me?

Just loaded up my old modpack where I was getting smoked by rampant, and now I can actually use the turrets! I'll mention in the K2 Steel/Fluid authors GitHub posts that a fully corrected version was made here, so if they ever see it they'll know how to fix it too. If I was smart I'd figure out how to set up a pull request for it but that's for me to learn at another time lol- Thank you again for the super quick responses!

2 months ago

Glad to help, have a nice game :)

15 days ago

Вы обновили мод, ошибка снова появилась. Может сделаете проверку на этот мод для совместимости?

14 days ago

Вы обновили мод, ошибка снова появилась. Может сделаете проверку на этот мод для совместимости?

Какой мод обновил?
Какая ошибка?
Совместимость с каким модом?

New response