Foliax (planet)

by Crethor

No mineable resources, only plant-based resource generation.

Content
3 days ago
2.0
1.47K
Factorio: Space Age Icon Space Age Mod
Planets Enemies Environment Manufacturing

b Error while loading recipe prototype "warm-fire-from-foliax-charged-promethium-asteroid-chunk"

15 days ago
(updated 14 days ago)

I get the following error only after adding your mod to Factorio:

  43.752 Error ModManager.cpp:1764: Error while loading recipe prototype "warm-fire-from-foliax-charged-promethium-asteroid-chunk" (recipe): probability must be in range [0, 1], but 4.000000 was given in property tree at ROOT.recipe.warm-fire-from-foliax-charged-promethium-asteroid-chunk.results[0]
Modifications: Fire Place (Work In Progress) › Cerys

I maintain Fire Place (WIP) but not Cerys.

In the code for probability calculation, the code says:
probability = energy / 1e10

For your asteroid chunk the log file reports:
35.709 Script @__wip-fire-place__/data-final-fixes.lua:9: found fuel to burn: foliax-charged-promethium-asteroid-chunk (40000000000)
while 40000000000 is the value for energy.

The code for getting the energy value states:
energy = item['fuel_value'] and util.parse_energy(item['fuel_value'])

While parse_energy() is the game core's own function from "__core__.lualib.util". Any idea how this can be fixed?

You can find the mod here: https://mods.factorio.com/mod/wip-fire-place

15 days ago

Should I add just some math.min(probability, 1) to the code?

15 days ago

the asteroid is the product of a long chain, so i made it have an energy value equal to fusion, which is one more to the power than the calculation sets as 100%. its 40GJ. if the calculation can be modified to block fuel with a value over the cap, that would be optimal.

14 days ago
(updated 14 days ago)

Ah, so I should rather block not use math.min() instead. Okay, I can change that very quickly.

EDIT: So I need to raise 1e10 to 4e10 and it is fixed?

14 days ago

So far no crash anymore. Only one fuel is now skipped:
30.200 Script @__wip-fire-place__/data-final-fixes.lua:36: Fuel 'mixed-oxide-fuel-cell' has to high energy value: 96000000000 (cap: 40000000000) - skipped!

If that's fine, then I can upload an update.

14 days ago

sounds fine, glad it worked

13 days ago

2.1.4 fixed the issue. Thank you for helping out. :-)

New response