hello,
i try to export energy stats to file (so i can use them for my led strip), i want something like a satisfaction bar in reallive .
unfortunately my solution causes fpsdrops (1 each 60 tick).
do u know a "better" method to read values like produced energy and "used" energy?
i have only 2.3k Accumlators, 1.8k solar panels and 53 steamengines, without my mod its fine.
attached my "mod".
export energy stats to file
export energy stats to file
- Attachments
-
- energy_stats_0.0.3.zip
- (1.46 KiB) Downloaded 120 times
- olafthecat
- Filter Inserter
- Posts: 476
- Joined: Fri Jul 07, 2017 4:37 pm
Re: export energy stats to file
You know.
Here's a reply.
Might get someone else to fix your problem.
Issue is, I have no idea what you are are talking about.
Good luck!
Here's a reply.
Might get someone else to fix your problem.
Issue is, I have no idea what you are are talking about.
Good luck!
Gonna start playing again with 0.16 build.
That's all.
That's all.
Re: export energy stats to file
Well, for me it doesn't really work because, firstly, you try to iterate over dictionary (non-number keys) with `ipairs`, secondly, because solar panel has `energy` equal to zero always. I've fixed first issue below, for the second one I don't know workaround.
Code
Maybe you should make a request, so that devs would export the energy_production_statistics per force, like they do for item_production_statistics.I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: export energy stats to file
thx for ur reply.
adding new generators didnt work, cause "global.energy_sources[entity.type]" has the keys 1 2 3 4 changed to global.energy[entity.type]
HUGE thx, using entity.unit_number resolved the performance problem, next: stupid solar panels
attached my current version, if interrested.
adding new generators didnt work, cause "global.energy_sources[entity.type]" has the keys 1 2 3 4 changed to global.energy[entity.type]
HUGE thx, using entity.unit_number resolved the performance problem, next: stupid solar panels
attached my current version, if interrested.
- Attachments
-
- energy-stats_0.0.4.zip
- (3.07 KiB) Downloaded 117 times
Re: export energy stats to file
really looking forward to this one. cause i too wanted to react a ledstrip with factorio.
If you someone could help would be awesome
If you someone could help would be awesome