Momo +(30)Science Mod deprecated


Add more complex crafting for science. An overhaul mod make for 30 new Science Pack(MSP) Bob's, Angel's. Reintroduce Bob'sExtended Item. >> Include MOD PACK <<

5 years ago
0.16 - 0.17
17

b bob's tech not set as dependency = "attempt to index field 'logistic-science-pack'(nil value) crash.

6 years ago

bob's logistic-science-pack is added by bob's tech not bob's revamp,. logistics or other.
so bob's tech needs to be set as either a required dependency..or appropriate item checks/mod checks need to occur before attempting to call/reference the item.

6 years ago

bob's tech extend logistic-science-pack on data.lua
I first call it on data-update.lua so there must be no problem
but include it in dependency would be great

6 years ago

no, the problem is you assume it's existence when you call it in data-update, without doing a proper check for the item. a check is required since bob's tech is the mod that adds the pack and you haven't added a dependency for the mod that adds it. Thus, a crash if the player loads momo+ without bob's tech.

6 years ago

there's another crash related to optional mod config but i haven't sourced it yet. something dealing with a chem lab 2

6 years ago

logistic science pack is added by the mod "Bob tech",
you can ignore the need for any hard-dependencies if you use a check for the item's existance before any call: ie:
if data.raw.item["logistic-science-pack"] then .....do stuff....

or: you can set a hard dependency in info.json.

6 years ago

similarly: angel's refining without angel's petrochem results in momoTweak__/data-updates.lua:26__momoTweak__/prototypes/recipe/sandclay.lua:13:attempt to index field 'solid-coke' (a nil value)

use: if mods["angels-refining"] and mods["angels-petrochem"] then.....
or: if data.raw.item["solid-coke"] then.....

6 years ago

and lastly: crash without bob's assembly (lack of item check without dependency):

failed to load mods momotweak/data-final-fixes.lua:51:attempt to index field 'chemical plant-2' (a nil value)

mod assumes bob's assembly enabled (and thus, that chemical-plant-2 exists.
use if mods["bobassembly"] and data.raw.item["chemical-plant-2"] then .....do stuff....

6 years ago

Thank you for helping me spot some possible bugs

New response