Advanced Combinator

by zomis

Make combinators great again! One combinator to rule them all.

Content
4 years ago
0.16 - 1.1
1.46K
Circuit network

i Energy satsfaction

5 years ago

Would be nice if you could add two more readings to the "super combinater" read the Percent of Energy Satisfaction and the Percent of Energy Production.

That will make so much easier to make combinator that controls stations and substation. you don't need to try go guess why your draining energy.

5 years ago

Hmm.... I like the idea, I just gotta figure out how to do it :)

It seems to be possible with the Lua-Api: https://lua-api.factorio.com/0.17.4/LuaEntity.html#LuaEntity.power_production
It requires a "ElectricEnergyInterface" type entity though, so it will not be possible to use just about anywhere, but I can see what I can do.

5 years ago
(updated 5 years ago)

Oh, thanks! Can't wait for that. Don't know if its possible but if is, try not to output the reading as a total value, in 0.16 we have other mods that output the numbers it's not very useful. Cause if you look at your energy numbers production and satisfaction they are the same always. So the % value would tell if you are missing energy or not, like the accumulator logic signal does, with % value.

I didn't find a Total production capacity in the lua api. :(
I think the game update an internal value when you place / remove an power generator entity, that update the max power output that you can produce. Not sure :(

5 years ago

there is also a bar for current accu storage where the current storage can be seen as percentage and as absolute value with numbers. when doing it myself (by reading values from an accu) i can only see the percentage. it would be nice if i can either see the max storage or current storage of all accus in the network (or both). then i would know how much energy reservere is left or already used, or i could compute that myself. but having only the percentage is only partially helpful.

5 years ago
(updated 5 years ago)

Yah, more info more power hahahhaa.

I don't know if it's possible, but if is, you could in the "first load" of the mod, run that upgrade script to scann all generator entity, and add up the max output power to some variable, than, i think you could add a listner to the on entity placed/removed to keep it update. And using the current value from the function to calculate the %. Same for the accumulators.

MaxOutput = 0.00;//updated from script and onplace/remove event
current_val = call the function "power_production or power_usage".
usedCapacity = (current_val * 100.00) / MaxOutput;
Than we could have a signal "Max power output" reading from MaxOutPut and "Current % Usage" reading from usedCapacity

The accumulator seems to do the % value already but it doesn't tell the Total Capacity that you have.
So i think if we approach both the same way we can have all values.

But I don't know how we would calculate the needed power, since with those values we would have that we are using 100% of 100%. The game knows, some how, how much you need to update the energy bars that goes red.

Only if "power_production, power_usage" have different values that would make things way easier. dunno why they put 2 functions that will always return the same value.

New response