Helmod: Assistant for planning your factory

by Helfima

Assistant for planning your factory. Can calculate required ingredients, products, machines, modules, and beacons. Can also calculate power production / consumption.

Utilities
5 days ago
0.14 - 2.0
508K

b [Fixed] [2.0.16] error on new game

11 months ago

I got an error trying to start a new game. Loading a save is fine, tho there are different mods and... yeah, would be hard to pinpoint what's wrong
factorio 2.0.41 - message:

Error while running event helmod::on_init()
helmod/model/Player.lua:1276: attempt to index local 'plant_prototype' (a nil value)
stack traceback:
helmod/model/Player.lua:1276: in function 'getAgriculturalRecipes'
helmod/selector/RecipeSelector.lua:119: in function 'updateGroups'
helmod/selector/AbstractSelector.lua:372: in function 'prepare'
helmod/controller/Controller.lua:137: in function 'on_init'
helmod/controller/EventController.lua:101: in function <helmod/controller/EventController.lua:99>

11 months ago

I also have a similar problem. But I found this error in a bug report when I was looking for a way to fix the complete lack of recipes in Helmod.

11 months ago

revert muluna to 1.27.3. 1.28.0 adds something which breaks hel. there is a fix pending new interface in .42

11 months ago
(updated 11 months ago)

stumbled upon this too; https://github.com/Helfima/helmod/commit/0a7189e22a967980d8667b8c0d8b93e5d8be2bb5 seems to fix it (Helmod dev branch), so probably in upcoming Helmod version 2.0.17...? maybe?

I wonder if Muluna has to do something, too... was about to file a bug there, but not sure (they introduced a "tree-plant" in 1.28.0, I wonder whether that new entity is configured incompletely/incorrectly, or whether Helmod assumes something that somehow mods are not required to obey to... plant_result seems optional, so accessing plant_result maybe should be guarded... https://lua-api.factorio.com/latest/prototypes/ItemPrototype.html#plant_result)

we'll see, I guess...

Edit: ah I guess they'll do that in the next release :-) https://github.com/Helfima/helmod/blob/0a7189e22a967980d8667b8c0d8b93e5d8be2bb5/model/Player.lua#L1267

11 months ago

I got another error like this after rolling back the Muluna mod

---- Error ----
helmod/dialog/RecipeExplorer.lua:92: attempt to index local 'block' (a nil value)
---- Feature Flags ----
expansion_shaders:true
freezing:true
quality:true
rail_bridges:true
segmented_units:true
space_travel:true
spoiling:true
---- Mods ----
AbandonedRuins_updated_fork:1.2.0
base:2.0.41
belt-visualizer:2.0.2
CleanFloor:2.0.0
coloured-tool-icons:0.0.5
common-prototypes-graphics:0.0.1
finely-crafted-graphics:1.1.0
aai-signals:0.7.1
aai-vehicles-chaingunner:0.7.2
aai-vehicles-flame-tank:0.6.2
aai-vehicles-hauler:0.7.3
aai-vehicles-ironclad:0.7.5
aai-vehicles-laser-tank:0.7.4
aai-vehicles-warden:0.6.4
aai-zones:0.7.2
AbandonedRuins-base:0.0.2
AircraftRealism:2.0.3
alien-biomes-graphics:0.7.0
alternative-beacons:1.0.9
ArmouredBiters:1.2.1
ballistic_missile:0.1.17
bullet-trails:0.7.1
calculator-ui:2.0.1
cargo-ships-graphics:1.0.4
color_whole_train:2.0.1
Dectorio:0.13.1
elevated-rails:2.0.41
factorio-crash-site:2.0.3
fdsl:0.1.8
Flare Stack:3.0.5
flib:0.16.2
FluidMustFlow:1.4.2
helmod:2.0.14

11 months ago

AmAzOnKa: Try updating Helmod? You're a couple of versions behind the latest.

I should be able to get a new version of Helmod out this weekend, fixing the other issue. Factorio devs were kind enough to do a base game update already, implementing my request that will make this a lot cleaner fix! 🙂

10 months ago

New version of Helmod released (2.0.17). Bug should be fixed here. Note that this requires Factorio 2.0.42

10 months ago

can confirm, seems to work! thanks a lot for your very quick reply!

10 months ago

I'm not sure why this crash occurred, but I have a theory: Muluna's "Tree" item is identical to Space Age's "Tree seed," except it grows in one tick and can not be placed by an agricultural tower. I wonder if Helmod failed to start because it failed to find an automated avenue to produce this plant from. Very interesting bug.

10 months ago

I'm not sure why this crash occurred, but I have a theory: Muluna's "Tree" item is identical to Space Age's "Tree seed," except it grows in one tick and can not be placed by an agricultural tower. I wonder if Helmod failed to start because it failed to find an automated avenue to produce this plant from. Very interesting bug.

Helmod was assuming that any item that has a place_result of type tree would also have a plant_result defined. Trying to index plant_result caused a crash as it was nil.

In the recently released Factorio v2.0.42, the devs were kind enough to add "plant-result" as a new type of ItemPrototypeFilter. The big could have been fixed without this but it does make it a lot cleaner!

New response