Page 1 of 1

Entity activity, electricity, and production

Posted: Mon Apr 18, 2016 10:19 am
by Quantumtroll
Over in this thread, a few things came up. At least two of us are interested in a few of the following items:
  • Read the effective consumption of an entity? For example, to check if an electric consumer is under-electrified (status of the green electric bar on the entity), i.e. consumes less than it could.
  • Read the actual pollution emission rate of an entity.
  • Read the global electric production and consumption of one network (the values that are displayed in the panel when you click a pole). And also the global accumulator remaining capacity ?
  • Change electric consumption of a device on the fly.
  • On a slightly different topic: an event when a given recipe or item is produced.
The post I linked to provides the context and motivation for these API requests. Personally, I'm trying to find out whether a modified assembling machine is busy producing, so I can use that number to increase the size of a poison cloud.

Re: Entity activity, electricity, and production

Posted: Fri Jul 22, 2016 10:51 pm
by m44v
bumping 'cause I'm interested in having access to the electric network stats.

Re: Entity activity, electricity, and production

Posted: Mon Jul 25, 2016 8:11 am
by binbinhfr
On a slightly different topic: an event when a given recipe or item is produced.
Useful idea that I missed sometimes, but a on_produced event will trigger every time an item is produced, which will be a huge amount of calls...
Because, as any factorio event, the item filtering will occur once the global event is triggered.