LUA code to transform pollution in energy.
LUA code to transform pollution in energy.
I'm have an idea to transform the huge polution we make, in energy. Using some kind of "solar panel", modified.
I will create an "greenhouse" to create leafs, and use it to other things.
But, I have no idea how to convert the pollution into energy (the lua code).
Any help will be welcome.
I will create an "greenhouse" to create leafs, and use it to other things.
But, I have no idea how to convert the pollution into energy (the lua code).
Any help will be welcome.
Re: LUA code to transform pollution in energy.
Moved topic from mod-rules to modding help.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Re: LUA code to transform pollution in energy.
You could take a look into this mod: https://forums.factorio.com/forum/vie ... php?t=7548
But from what I could find it basically registered a negative pollution emission (pretty clever hu):
But from what I could find it basically registered a negative pollution emission (pretty clever hu):
Code: Select all
energy_source = {
type = "electric",
usage_priority = "secondary-input",
emissions = -0.2
}
Re: LUA code to transform pollution in energy.
Thanks.luan wrote:You could take a look into this mod: https://forums.factorio.com/forum/vie ... php?t=7548
But from what I could find it basically registered a negative pollution emission (pretty clever hu):
Code: Select all
energy_source = { type = "electric", usage_priority = "secondary-input", emissions = -0.2 }
But, how the game identify that the energy is come from pollution?
Maybe there is a formula, that use "X" emissions (depend on the entity) multiplied with a base number, then the result is the amount of energy produced per tick, second, hour, whaterver.
Thats is there I want to get in.
Any idea?
Re: LUA code to transform pollution in energy.
Something like "emissions * 100", so if emissions are 1.5, then "1.5 * 100" = "150Kw". If the entity is a lvl 2, then it will be "1.5 * 150" = "225Kw". And so on.
Re: LUA code to transform pollution in energy.
No ideas?
Nobody?
Nobody?
Re: LUA code to transform pollution in energy.
what is it that you want to achieve, when you name the 'solar panel' Pollution reënergyefier, it should turn up in the energy view as Pollution reënergyefier. What do you wish to happen?Grandirus wrote:No ideas?
Nobody?
Re: LUA code to transform pollution in energy.
Ok so what you can do,
Power is created by using a generator, and this creates power by consuming a hot liquid,
So you can work out a reasonable conversion of pollurion to energy.
Say you want 1 unit of pollution to equal 1MJ or something,
Write a script to say,
By this entity, remove 1 pollution, and add 1 unit of water at 100 degrees to the generator.
If you look over these two scripts to see some examples to each.
Power is created by using a generator, and this creates power by consuming a hot liquid,
So you can work out a reasonable conversion of pollurion to energy.
Say you want 1 unit of pollution to equal 1MJ or something,
Write a script to say,
By this entity, remove 1 pollution, and add 1 unit of water at 100 degrees to the generator.
If you look over these two scripts to see some examples to each.
Pollution script in diesel generator
Fluid script in wind turbine
I hope this helpsRe: LUA code to transform pollution in energy.
Thanks for all the replys. I will try and tell if I succeed.
-
- Long Handed Inserter
- Posts: 80
- Joined: Sat Jan 10, 2015 3:42 am
- Contact:
Re: LUA code to transform pollution in energy.
My first thought was an endless loop, where the machine continuously puts out power and removes pollution. But eventually, you would run out of pollution, but still make power.
My next idea is make a machine that turns pollution into some kind of fuel, and just feed the fuel into a specific generator. Done!
My next idea is make a machine that turns pollution into some kind of fuel, and just feed the fuel into a specific generator. Done!
Re: LUA code to transform pollution in energy.
Yeah, but to make the machine stop when there's no pollution, we need a code, just like the on I wrote up here. So, if no pollution, no energy.DoctorWho? wrote:My first thought was an endless loop, where the machine continuously puts out power and removes pollution. But eventually, you would run out of pollution, but still make power.
My next idea is make a machine that turns pollution into some kind of fuel, and just feed the fuel into a specific generator. Done!
But I think the game don't have this codes.
Re: LUA code to transform pollution in energy.
Up until now, I'm stop work in the mod, because of a health issue. I need some little time to be good again.