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?] Electric network UPS issues with Bio Farm poles

1 year, 1 month ago
(updated 1 year, 1 month ago)

Hi,
would it be possible to make the pole of the bio farm optional (as in having an option to disable it in the mod settings)? Currently it seems that it somehow doesn't connect properly to electric networks and thus I get one additional electric network per bio farm (see e.g. puppy-ups-tools). This decreases performance with lots of bio farms.

Tested version: 1.1.15 (but according to the changelog this should not have changed until 1.1.18 at least unless I overlooked something)

(Currently, I use a locally modified version as a workaround: [Note for end users like me: WHICH WILL VERY LIKELY BREAK UPDATES, so don't use this unless you can fix that! (or if you don't plan to ever update the mods and the game for the affected savgames I guess)]

diff -r Bio_Industries_1.1.15/info.json Bio_Industries_101.1.15/info.json
3c3
<   "version": "1.1.15",
---
>   "version": "101.1.15",
diff -r Bio_Industries_1.1.15/prototypes/compound_entities/main_list.lua Bio_Industries_101.1.15/prototypes/compound_entities/main_list.lua
85,91d84
<       pole = {
<         -- name = "bi-bio-farm-hidden-pole",
<         -- type = ret.HE_map.pole,
<         -- base_offset = {x = 1.0, y = 1.0},
<         base_offset = (script and script.active_mods["_debug"] or mods and mods["_debug"]) and
<                       {x = 1.0, y = 1.0} or {x = 0, y = 0},
<       },
)
Pi-C
11 months ago

I don't remember why I decided to add the hidden pole and the connector (which also is a hidden pole). During testing (in debugging mode), the two poles connect to each other, so having an extra electric network wasn't an issue. However, checking the connections with gvv when debugging mode had been turned off, it seems the two poles don't actually connect.

Your fix should work, meaning it shouldn't break the compound entity. However, if you look at prototypes/compound_entities/hidden_poles.lua you will find that connector and hidden pole have different wire reach and supply area:

-- Connector
pole.supply_area_distance = 1
pole.maximum_wire_distance = 10 -- inherited from the definitions for h_entity at the top of the file

-- Hidden pole
pole.maximum_wire_distance = 2
pole.supply_area_distance = 5

If you remove the hidden pole, you should increase supply_area_distance of the connector to 5 so that inserters placed next to the BioFarm will get power.

Pi-C
8 months ago

Please try version 1.1.19!

New response