How do I make a power producer?
-
- Burner Inserter
- Posts: 6
- Joined: Wed Jun 24, 2015 9:39 pm
- Contact:
How do I make a power producer?
I'm working on my first mod. What I'm trying to do is make a Wind Turbine. I want it to check to make sure there is wind and then produce a set amount of electricity. I have been looking for a good tutorial for quite some time now and can't find one. So if someone could help me that would be great. Thanks!
AC
Re: How do I make a power producer?
Did you took a look at the modding tutorial?
-
- Burner Inserter
- Posts: 6
- Joined: Wed Jun 24, 2015 9:39 pm
- Contact:
Re: How do I make a power producer?
Yes but it does not say how to make an entity produce power.kiba wrote:Did you took a look at the modding tutorial?
AC
Re: How do I make a power producer?
Power production is not currently supported directly AFAIK.
You need to derive from accumulator and then set it's amount of available energy from script to "produce" power.
You need to derive from accumulator and then set it's amount of available energy from script to "produce" power.
-
- Burner Inserter
- Posts: 6
- Joined: Wed Jun 24, 2015 9:39 pm
- Contact:
Re: How do I make a power producer?
And how do I do that?orzelek wrote:Power production is not currently supported directly AFAIK.
You need to derive from accumulator and then set it's amount of available energy from script to "produce" power.
AC
Re: How do I make a power producer?
Someone who has more experience with those would need to help - or you can find the wind power mod - I don't remember exact name of it tho.Arcanecast wrote:And how do I do that?orzelek wrote:Power production is not currently supported directly AFAIK.
You need to derive from accumulator and then set it's amount of available energy from script to "produce" power.
-
- Burner Inserter
- Posts: 6
- Joined: Wed Jun 24, 2015 9:39 pm
- Contact:
Re: How do I make a power producer?
Thanks I will try to find that mod and look it over.orzelek wrote:Someone who has more experience with those would need to help - or you can find the wind power mod - I don't remember exact name of it tho.Arcanecast wrote:And how do I do that?orzelek wrote:Power production is not currently supported directly AFAIK.
You need to derive from accumulator and then set it's amount of available energy from script to "produce" power.
AC
-
- Fast Inserter
- Posts: 157
- Joined: Fri Jun 26, 2015 11:13 pm
Re: How do I make a power producer?
Can you base your wind turbine on the steam turbine instead, and then automatically supply it with hot liquid "from the wind"? I assume(1) that if you have a connected steam turbine and mess with its fluid box to add hot fluid, it would produce power. See the wiki or my "electric boiler" mod (in signature) for an example of messing with an entity's fluid box.Arcanecast wrote:I'm working on my first mod. What I'm trying to do is make a Wind Turbine. I want it to check to make sure there is wind and then produce a set amount of electricity. I have been looking for a good tutorial for quite some time now and can't find one. So if someone could help me that would be great. Thanks!
1. Not really an assumption, since you can connect a steam turbine to a hot water tank and it will produce power.
Edit: Now that I think about it, you can just have your wind turbine produces hot water, and use steam turbine to generate electricity from that. The mod can then use the onBuild event to place both steam turbine and wind turbine object together when the wind turbine is built.
Re: How do I make a power producer?
What entity type would you recommend to create hot water? Would you be creating it from an onTick event in control.lua?
-
- Fast Inserter
- Posts: 157
- Joined: Fri Jun 26, 2015 11:13 pm
Re: How do I make a power producer?
Anything that has a fluidbox (which is pretty much everything in the game, but a pipe is a good example) can be used to produce water. And yes, I would use ontick() to add water into the fluidbox.GotLag wrote:What entity type would you recommend to create hot water? Would you be creating it from an onTick event in control.lua?