Battery Pack

by mrudat

Changes modular armor batteries to work as removable battery packs able to power armor, vehicles or your factory.

3 years ago
0.17 - 0.18
9

b (Not a bug) Conflict when Angel's refining is loaded along with Bob's Metals, Chem...

3 years ago
(updated 3 years ago)

Updated to the newest version of Battery pack 0.0.11 and OR nodes 0.0.3 released today. Upon enabling them I was met with an error on load of the game. It appears that Battery Pack or OR nodes is conflicting with Angels refining when it is combined with Bob's plates.
https://mods.factorio.com/mod/angelsrefining
https://mods.factorio.com/mod/bobplates

Error ModManager.cpp:1508: Failed to load mod "angelsrefining": angelsrefining/prototypes/override-functions.lua:832: attempt to index field 'unit' (a nil value)
stack traceback:
angelsrefining/prototypes/override-functions.lua:832: in function 'execute'
angelsrefining/data-updates.lua:41: in main chunk

3 years ago

It's failing to process a perfectly valid technology definition that contains the key normal, but does not contain the key expensive. This is to be interpreted as the same as moving all of the keys under normal into the parent table.

I've submitted a bug report against both mods, as I'm not entirely certain where the bug lies.

3 years ago
(updated 3 years ago)

"This is to be interpreted as the same as moving all of the keys under normal into the parent table."
Actually, IIRC, one of the devs told me that if defined that way, it should be interpenetrated that the technology only exists in normal. It's a way to have different recipe chains available on normal vs expensive mode.

Either way, mod responsibility should be to to check if normal and/or expensive exist, and if they do, perform whatever functions they're trying to do on those instead of the base table.

3 years ago
(updated 3 years ago)

There's a number of distinct variations:
* No normal/expensive - same data for both
* Only normal/expensive - same data for both, but read from normal/expensive
* Both normal/expensive - different data for both
* Normal/expensive is false (rather than nil/missing) - doesn't exist for the difficulty which is false.

OR-Nodes is generating a technology where only normal is set, which Factorio thinks is perfectly valid.

It (should, if I got it right) implement full support for recipe/technology difficulty, up to completely divergent recipes/technology effects depending on difficulty.

Edit: Just to be clear, Battery Pack and OR Nodes are both properly parsing perfectly permitted prototypes, it's the fact that they're creating one that's causing issues.

3 years ago

Submitted a patch to angel's that should make this particular problem go away.

New response