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 <<

4 years ago
0.16 - 0.17
15

b Crash when using ScienceCostTweakerM

4 years ago
(updated 4 years ago)

line 169 on prototypes.sci.recipe.lua causes a crash. 'ingredients is nil'

momoTweak.get_gen_recipe(itemref).ingredients only exists on some of the itemref items. Other have momoTweak.get_gen_recipe(itemref).normal.ingredients and momoTweak.get_gen_recipe(itemref).expensive.ingredients.

Changing it to:
'for i, ing in pairs(momoTweak.get_gen_recipe(itemref).ingredients or momoTweak.get_gen_recipe(itemref).normal.ingredients) do'
fixes it.

4 years ago

could you give me your mod loadout
this shouldn't happen when have only ScienceCostTweakerM install

4 years ago

The problem seems to be related to omnimatter.
When I use angels, bobs, sciencecosttweakerm and momotweaks it loads but as soon as I enable omnimatter and omnilibrary I get the error.

10.470 Mods to disable:Failed to load mods: MomoTweak/data-final-fixes.lua:5: MomoTweak/prototypes/sci/recipe.lua:169: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
[C]: in function 'pairs'
MomoTweak/prototypes/sci/recipe.lua:169: in function 'clearUp'
MomoTweak/prototypes/sci/recipe.lua:181: in main chunk
[C]: in function 'require'
MomoTweak/data-final-fixes.lua:5: in main chunk
stack traceback:
[C]: in function 'require'
MomoTweak/data-final-fixes.lua:5: in main chunk

4 years ago
(updated 4 years ago)
4 years ago
(updated 4 years ago)

The problem seems to be in omnimatters data-final-fixes.lua #43 'omni.marathon.standardise(data.raw.recipe[eff.recipe])'

It changes recipes that are unlocked through a technology.

data.raw.recipe['momo-sct-2-N1] goes from :

  {
     category = "momo-sci-recipe",
     enabled = "false",
     energy_required = 5,
     icon_size = 32,
     ingredients = {},
     name = "momo-sct-2-N1",
     results = {
        {
           amount = 1,
           name = "sct-2",
           type = "item"
        }
     },
     subgroup = "py-items",
     type = "recipe"
  }

to

  {
     category = "momo-sci-recipe",
     expensive = {
        category = "momo-sci-recipe",
        enabled = "false",
        energy_required = 5,
        ingredients = {},
        results = {
           {
           amount = 1,
           name = "sct-2",
           type = "item"
           }
        }
     },
     icon_size = 32,
     localised_name = {
        "item-name.sct-2"
     },
     name = "momo-sct-2-N1",
     normal = {
        category = "momo-sci-recipe",
        enabled = "false",
        energy_required = 5,
        ingredients = {},
        results = {
           {
           amount = 1,
           name = "sct-2",
           type = "item"
           }
        }
     },
     subgroup = "py-items",
     type = "recipe"
  }

Then it enters momotweak.data-final-fixes like that and it causes problems.

"momo-sct-gun-N1" and momo-sct-high-N1 do not have this problem and do not get changed by omnimatter, I think because they do not have a technology unlock effect?

4 years ago

I added temporary fix for now.

New response