Page 1 of 3

[MOD 0.12.11+] Burner Generator

Posted: Thu Aug 20, 2015 6:28 pm
by Klonan
Image


**Updated Burner generator available as part of the KS Power mod**


Type: Mod
Name: Burner Generator
Description: Adds a burner powered electric generation option - doesnt require water - Now with technology (0.2.0)
License:Ask me
Version: 0.2.4
Release:2015/08/20
Tested-With-Factorio-Version: 0.12.8
Category: Wall
Tags: Early game, burner, electricity
Latest Release:
Burner_Generator_0.2.6.zip
--Fixed blueprints with burner generators in
(32.21 KiB) Downloaded 6967 times
Pics
Long description
Comparison to boiler ~> steam engine

1 coal in the burner generator produces 2.8MJ of power
1 coal in boiler ~> steam produces 4MJ of power
So overall the generator is 70% as efficient as using boilers and steam engines

Let me know down in the comment any bugs, suggestions irritations or complimentations.
Old releases

Re: [0.12.x] Burner Generator

Posted: Thu Aug 20, 2015 9:46 pm
by Kayser
Awsome. I'm gonna test it.

Re: [0.12.x] Burner Generator

Posted: Fri Aug 21, 2015 5:03 am
by Peter34
How efficient is this, relative to the Boiler/Steam Engine setup?

Re: [0.12.x] Burner Generator

Posted: Fri Aug 21, 2015 1:16 pm
by Klonan
Peter34 wrote:How efficient is this, relative to the Boiler/Steam Engine setup?
Alright so normal boilers are 50% efficient and normal steam engines are 100% efficient, so total efficiency is 50%, ie, for 1 piece of coal you can 50% of its energy as electricity.

This generator works at roughly 32% efficiency, so 18% less efficient than a regular boiler/engine setup

Re: [0.12.x] Burner Generator

Posted: Fri Aug 21, 2015 2:25 pm
by Kayser
Haven't had time to test this yet, but does it use Autofill (https://forums.factorio.com/forum/vie ... =92&t=1612) if available?

Re: [0.12.x] Burner Generator

Posted: Fri Aug 21, 2015 2:36 pm
by Klonan
Kayser wrote:Haven't had time to test this yet, but does it use Autofill (https://forums.factorio.com/forum/vie ... =92&t=1612) if available?
Im not very experience with mod interfaces, but i think you can do it by loading the game with both mods enabled and typing this in the console:

Code: Select all

/c remote.call("af", "insertset", "", "burner-generator", {priority=1, {"coal","raw-wood","solid-fuel"}})
let me know if this works or not :]

Re: [0.12.x] Burner Generator

Posted: Fri Aug 21, 2015 8:04 pm
by Kayser
Klonan wrote:

Code: Select all

/c remote.call("af", "insertset", "", "burner-generator", {priority=1, {"coal","raw-wood","solid-fuel"}})
That worked. Would be nice if it was auto-executed, though. Can I write this command into the mod somehow?

Also, there seems to be a slight issue with the placement. It's possible to place it so that it covers objects above it:
Image

Re: [0.12.x] Burner Generator

Posted: Fri Aug 21, 2015 8:37 pm
by Klonan
Kayser wrote:
Klonan wrote:

Code: Select all

/c remote.call("af", "insertset", "", "burner-generator", {priority=1, {"coal","raw-wood","solid-fuel"}})
That worked. Would be nice if it was auto-executed, though. Can I write this command into the mod somehow?

Also, there seems to be a slight issue with the placement. It's possible to place it so that it covers objects above it:
Image
Yep, you can place it like that :P
Its only a graphical irk, it will still function, maybe i will work on a way to prevent that from happening.

I wrote a quick new control.lua for you, im not 100% sure it will work once again, but it should.

Just delete the current control.lua and replace it with this one:
control.lua
(4.04 KiB) Downloaded 463 times

Re: [MOD 0.12.x] Burner Generator

Posted: Tue Aug 25, 2015 9:44 pm
by Airat9000
I have an idea
1) make the technology to open
2) make more generators with an increase in power
3) technology for each generator

Re: [0.12.x] Burner Generator

Posted: Fri Sep 25, 2015 1:24 pm
by Wyrm
Klonan wrote:
Kayser wrote:Haven't had time to test this yet, but does it use Autofill (https://forums.factorio.com/forum/vie ... =92&t=1612) if available?
Im not very experience with mod interfaces, but i think you can do it by loading the game with both mods enabled and typing this in the console:

Code: Select all

/c remote.call("af", "insertset", "", "burner-generator", {priority=1, {"coal","raw-wood","solid-fuel"}})
let me know if this works or not :]
You can use remote.interfaces to discover if autofill is installed and functioning. If it is, remote.interfaces.af and remote.interfaces.af.insertset will be defined (not nil). Checking for both of those before you make a remote.call will ensure correct behavior.

Re: [MOD 0.12.x] Burner Generator

Posted: Fri Sep 25, 2015 1:41 pm
by Klonan
I have updated the mod with a revised system for handling the fluid stuff... should fix
Kayser wrote:
Also, there seems to be a slight issue with the placement. It's possible to place it so that it covers objects above it
and overall make the mod more congruent in the game.

Hope you all enjoy!

Any issues, bugs etc. let me know

Ps i tried adding the remote.call for autofill for the mod, but kept getting an error any which way i tried it, unless i entered it in the ingame console...

Re: [MOD 0.12.x] Burner Generator

Posted: Fri Sep 25, 2015 3:37 pm
by hitzu
Do you want to make this mod a little bit more complex by moving steam based stuff higher in the tech tree and making offshore pumps electricity dependent?

Re: [MOD 0.12.x] Burner Generator

Posted: Fri Sep 25, 2015 5:07 pm
by Klonan
hitzu wrote:Do you want to make this mod a little bit more complex by moving steam based stuff higher in the tech tree and making offshore pumps electricity dependent?
Yep, I might do that at some point integrating a lot of my 'burner stuff' mods into a larger pack, adding my own tech tree progression among other things :P

But for now it will work just a auxiliary way to make power, good for train stations and things, its not very good for trying to power and entire factory with it

Re: [MOD 0.12.x] Burner Generator

Posted: Fri Sep 25, 2015 9:35 pm
by Kayser
hitzu wrote:Do you want to make this mod a little bit more complex by moving steam based stuff higher in the tech tree and making offshore pumps electricity dependent?
You can't do that without providing a way to generate power for the research. But it's a good idea, and I would suggest that the burner generator should have no technology requirement.

However, if you fix that and then add an entity that pumps water out of the ground, you can add a map option 'No (visible) water'. You are forced to get your power from burner generators until you have the technology to build wells and get water that way.

Re: [MOD 0.12.x] Burner Generator

Posted: Sat Sep 26, 2015 7:59 pm
by Ranakastrasz
Looking at the code, I don't see how you cleanup removed burner generators. It looks like they stay in the table forever, presumably using computer resources.
However, I am only familiar with JASS (Warcraft 3 Script) and mildly familier with C++, and unlike either LUA says it has some level of garbage collection. However, I don't really know how that works, if it even works here. Does it get classified as garbage when the pot and lid units stop existing for whatever reason, and eventually deletes them from the table, as well as shifting downwards the table?

Re: [MOD 0.12.x] Burner Generator

Posted: Sat Sep 26, 2015 8:41 pm
by Klonan
Ranakastrasz wrote:Looking at the code, I don't see how you cleanup removed burner generators. It looks like they stay in the table forever, presumably using computer resources.
However, I am only familiar with JASS (Warcraft 3 Script) and mildly familier with C++, and unlike either LUA says it has some level of garbage collection. However, I don't really know how that works, if it even works here. Does it get classified as garbage when the pot and lid units stop existing for whatever reason, and eventually deletes them from the table, as well as shifting downwards the table?
They stay in the table forever, but im not sure if it makes any large amount of performace issue, since there is a check 3 lines into the check_pots function to check if they are valid, if not the function ends

Re: [MOD 0.12.x] Burner Generator

Posted: Sat Sep 26, 2015 9:30 pm
by Ranakastrasz
Klonan wrote:
Ranakastrasz wrote:Looking at the code, I don't see how you cleanup removed burner generators. It looks like they stay in the table forever, presumably using computer resources.
However, I am only familiar with JASS (Warcraft 3 Script) and mildly familier with C++, and unlike either LUA says it has some level of garbage collection. However, I don't really know how that works, if it even works here. Does it get classified as garbage when the pot and lid units stop existing for whatever reason, and eventually deletes them from the table, as well as shifting downwards the table?
They stay in the table forever, but im not sure if it makes any large amount of performace issue, since there is a check 3 lines into the check_pots function to check if they are valid, if not the function ends
I realize that, but I was a bit more concerned that it could result in the table getting larger and larger. That it has to do a large loop each gametick is something to avoid, especially if it keeps growing, but it isn't a large amount of work compared to other gametick loops i've seen (and written)

Re: [MOD 0.12.x] Burner Generator

Posted: Sun Sep 27, 2015 5:33 pm
by Klonan
Ranakastrasz wrote:
Klonan wrote:
Ranakastrasz wrote:Looking at the code, I don't see how you cleanup removed burner generators. It looks like they stay in the table forever, presumably using computer resources.
However, I am only familiar with JASS (Warcraft 3 Script) and mildly familier with C++, and unlike either LUA says it has some level of garbage collection. However, I don't really know how that works, if it even works here. Does it get classified as garbage when the pot and lid units stop existing for whatever reason, and eventually deletes them from the table, as well as shifting downwards the table?
They stay in the table forever, but im not sure if it makes any large amount of performace issue, since there is a check 3 lines into the check_pots function to check if they are valid, if not the function ends
I realize that, but I was a bit more concerned that it could result in the table getting larger and larger. That it has to do a large loop each gametick is something to avoid, especially if it keeps growing, but it isn't a large amount of work compared to other gametick loops i've seen (and written)
You're right,

I've updated the mod to include a removal of the non-valid pots from the global.pot table

:D

Re: [MOD 0.12.x] Burner Generator

Posted: Mon Sep 28, 2015 1:26 am
by Klonan
Kayser wrote:
hitzu wrote:Do you want to make this mod a little bit more complex by moving steam based stuff higher in the tech tree and making offshore pumps electricity dependent?
You can't do that without providing a way to generate power for the research. But it's a good idea, and I would suggest that the burner generator should have no technology requirement.

However, if you fix that and then add an entity that pumps water out of the ground, you can add a map option 'No (visible) water'. You are forced to get your power from burner generators until you have the technology to build wells and get water that way.

I think you raised a really good point.

I've removed the technology requirement, this opens it up to be used instead of water based power, and can be used on maps where there is no water

I've updated the mod :P

Re: [MOD 0.12.x] Burner Generator

Posted: Mon Sep 28, 2015 1:16 pm
by hitzu
Sorry for offtopic, but maybe you could make a very lowtech (wood and iron) windmill as a weak and unstable but working all the day power source? Also it could be a source of the underground water. For the sake of the balance this water can have lower temperature.