Keniras Random Recipes

by Kenira

Randomizes recipes (amount of ingredients and products, crafting time) as well as many other things that can be toggled individually like belt speed, crafting speeds, energy consumption, weapon damage...

a month ago
0.15 - 1.1
950

g Error on loading .17.69 and v1.5.3

4 years ago

Failed to load mods: zKenirasRandomRecipes/functions.lua:309: Kenira'sRandomRecipes: unexpected nil variable
stack traceback:
[C] in function 'error'
zKenirasRandomRecipes/functions.lua:309: in function 'randomize_number_unit'
zKenirasRandomRecipes/data-final-fixes.lua:735: in main chunk

I forgot to post on it when I first installed your mod. Line 735 is:
item.transfer_distance = randomize_number_unit(item.transfer_distance, 3, rand_min, rand_max, 1/diff_fac)

I commented out the line and am playing without issues as far as I know

4 years ago

Works fine for me. If you are using any mods, please post the mod that causes this issue.

4 years ago

Disabled all other mods, still had the error. Checked the log and a line was there that wasn't shown in-game:
5.023 Error ModManager.cpp:1323: Error in assignID, recipe-category with name 'crafting' does not exist.

A Steam "discussions" post suggested it's a corrupted download, so I deleted all the game files, re-downloaded, but it still doesn't work. There's an older post by Reika on github, closest thing I could find:

https://github.com/ReikaKalseki/Reika_FactorioMods_Issues/issues/115

4 years ago

You're also definitely using factorio version 0.17.69? I'm sorry but i just can't replicate it, i downloaded it fresh and i still can't reproduce it, and without being able to reproduce it there's not much i can do.

4 years ago
(updated 4 years ago)

I get this exact same error. 0.17.74. No other mods, just set it to the Randomize All setting and changed the seed, then after it reloaded the game I now always get this error when the menu loads.

Edit: reproduced several times by deleting the mod settings file. Even just manually activating all the checkboxes and using the Custom setting produced the error, however, I was able to activate all of them by slowly enabling them and repeatedly reloading, in an attempt to find out what caused the issue. At the end of it, I tried Randomize All instead of Custom and it caused the error again.

4 years ago
(updated 4 years ago)

With a little more lua experience I figured out what it is.

    error("KenirasRandomRecipes: unexpected nil variable")

You're using the error function, and for whatever reason, transfer_distance isn't a value in my robots (don't know if it was removed or whatever).

If it is changed to log, it won't cause an error, or if you figure out if the variable was renamed, then it'd work.

Edit: I'm running Data Raw Serpent (my own modding) and transfer_distance doesn't exist anywhere

4 years ago

Closest I can find, 7 months ago it may have existed because it's in someone's mod, but doing a search for construction robot "transfer_distance" brings up references to version 14 and 15 of Factorio

https://git.omkov.net/Jamozed/JamozedsFusionRobots/commit/671dd4c1f1a451e2ea3275fb5d104c9a728b410f?style=unified

4 years ago

Huh, interesting. I wonder how that happened.
Also, it still works for me when deleting the mod settings file. I really wonder why i am just not getting the error.

Anyway, please try the new version, should be fixed.

4 years ago
(updated 4 years ago)

To change my phrasing, I had meant "during the time in which I was trying out your mod", not on first load. It sounds like it should only have cropped up if one modified robots, which are probably off by default

Edit: and thank you :)

4 years ago

Ah, yeah i only tried loading up the game, not playing.

Well, update is out now, so hopefully this'll be fixed. Let me know if you continue to experience issues.

4 years ago

For me too, the issue only occurred after I selected "Randomize Everything" and reloaded the game. Seems to work now after the update!

Thanks!

New response