Solar Productivity

by RedRafe

Increase the efficiency of Solar panels and Accumulators by progressing through technology!

Content
9 days ago
1.1 - 2.0
18.9K
Power

g Compatability with Solar Freakin' Roadways.

1 year, 1 month ago

Mod author of Solar Freakin' Roadways here.

Someone posted on my mod page asking about compatibility between the two. They were experiencing a crash that I can't duplicate, but I did notice that your mod doesn't provide any bonuses to the flat panels added by mine. It doesn't look like this is something I can add support for on my end, as your mod copies the entities and has control logic.

Love the idea of solar productivity and I'd love to them compatible. I think it would make most sense for me to add the entities on my end, and for you to trigger the control logic.

1 year, 1 month ago

I went ahead and added all of the entities to the latest version. They will either be named flat-sp-#-[base_item_name] or flat-sp-#-[base_item_name]_ depending on whether users have retractable panels enabled in settings. They are also only generated for the mods that are already supported by my mod.

1 year, 1 month ago

depends, how do you get the flats to work? Do you duplicate the panel prototypes at data stage and switch the regular to the flat (and back) at runtime around the player?

1 year, 1 month ago

No, the flattening is actually handled by a second entity. When a player places a flat panel, they are actually placing a gate entity with custom animations, control script then creates an invisible solar panel above the gate. No on_tick at all, and the flattening is handled by the game's internal C++ gate logic.
Not exactly sure how yours is working. Is your script just swapping out the panel for the correct one when it's placed?

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

Yeah I'm building 50 prototypes tiers for each solar panel, then when a new level of productivity is researched, I swap them all. Which is terrible for UPS. And for data stage. I would have to copy your internal panel, make 50 tiers of it, and still replace it on new tech researched.
But I guess you create a hidden tech for each solar panel on your part too, so I should make 50 tiers of those too... I'm not too happy about all of this, not that any of this is your fault or anything

My response would be: no compatibility at the moment unless we want to definitely tank players' UPS and maybe, when I'll find a less jankier way to implement solar productivity I'll come back to this and see if it can be done in a better way.

Another solution I had was tweaking each surface solar bonus. Which would work very easily at 0 UPS cost (just update a number in "game.forces.player....surface.solar_multiplier = X" and it would be done! But the accumulators would get no productivity at all. Thats why I'm swapping entities. It's not for the solar itself, it's the accus.

But someone on github suggested to use electric-interfaces instead of multiple entities. Which was meh at the time they suggested it, but I could do surface multiplier for solars (and fix both UPS & this compat) and use the interface for the accus (which would again solve UPS)

New response