Bio Industries


Provides useful buildings and items, like the Bio Farm for growing trees. Solar Farm and Large Accumulator to make your electric setup easier. Bio Fuel section to produce organic plastic and batteries. Lots of New Wood Products, like the big electric pole, wooden pipes, dart turret. Plant trees using seedlings. Change terrain from deserts to grasslands using Fertilizer - helps trees grow better. And a lot more… Please visit the homepage on the forums for more information and feedback.

Content
8 months ago
0.14 - 1.1
54.3K
Manufacturing

b [Fixed?] Error loading save - Upgrading 0.18.28 to 1.1.7

3 years ago

Hi,

I'm getting an error when I try to load my save after upgrading from BI 0.18.28 (Factorio 1.0) to 1.1.7 (Factorio 1.1)

Help would be appreciated

Error Message:
The mod Bio Industries (1.1.7) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Bio_Industries::on_configuration_changed
The mod Bio Industries (1.1.7) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Bio_Industries::script_raised_built (ID 77)
Bio_Industries/control.lua:439: attempt to index field 'bi_arboretum_radar_table' (a nil value)
stack traceback:
Bio_Industries/control.lua:439: in function 'handler'
stdlib/stdlib/event/event.lua:342: in function 'pcall'
stdlib/stdlib/event/event.lua:362: in function 'dispatch_event'
stdlib/stdlib/event/event.lua:438: in function <stdlib/stdlib/event/event.lua:396>
[C]: in function 'raise_event'
Bio_Industries/common.lua:639: in function 'create_entities'
Bio_Industries/common.lua:513: in function 'register_in_compound_entity_tab'
Bio_Industries/common.lua:535: in function 'find_unregistered_entities'
Bio_Industries/control.lua:192: in function 'init'
Bio_Industries/control.lua:255: in function 'handler'
stdlib/stdlib/event/event.lua:342: in function 'pcall'
stdlib/stdlib/event/event.lua:362: in function 'dispatch_event'
stdlib/stdlib/event/event.lua:438: in function 'dispatch'
stdlib/stdlib/event/event.lua:85: in function <stdlib/stdlib/event/event.lua:83>
stack traceback:
[C]: in function 'raise_event'
Bio_Industries/common.lua:639: in function 'create_entities'
Bio_Industries/common.lua:513: in function 'register_in_compound_entity_tab'
Bio_Industries/common.lua:535: in function 'find_unregistered_entities'
Bio_Industries/control.lua:192: in function 'init'
Bio_Industries/control.lua:255: in function 'handler'
stdlib/stdlib/event/event.lua:342: in function 'pcall'
stdlib/stdlib/event/event.lua:362: in function 'dispatch_event'
stdlib/stdlib/event/event.lua:438: in function 'dispatch'
stdlib/stdlib/event/event.lua:85: in function <stdlib/stdlib/event/event.lua:83>

3 years ago

Rolling Back to 1.0 and Loading/Saving the game with BI 0.18.36 then moving to 1.1 and Bi 1.1.7 seems to work fine

Pi-C
3 years ago

Thanks for the report! The problem is that the code for checking compound entities and recreating the missing parts is run before the global tables have been initialized. I'll fix it for the next release. For now, you can fix the bug locally by editing control.lua:

Remove lines 209f.:

-- Global table for arboretum radars
global.bi_arboretum_radar_table = global.bi_arboretum_radar_table or {}

Move that up and insert it between lines 172 and 173:

-- OLD:
-- Scan all global tables storing data of compound entities
local result
for compound_tab, compound_name in pairs(compound_entity_tables) do

-- NEW:
-- Scan all global tables storing data of compound entities
local result
global.bi_arboretum_radar_table = global.bi_arboretum_radar_table or {}
for compound_tab, compound_name in pairs(compound_entity_tables) do

That's just a quick, untested fix. There may be some other problems I didn't see yet -- please inform me if it doesn't work!

Pi-C
3 years ago

Should be fixed in 1.1.8.

New response