Page 1 of 1

Power Consumption without production?

Posted: Mon Oct 14, 2013 3:24 am
by midnight109
Ok, with the new Pollution aspects, I am working on a mod that does work, sorta.
The Idea is the make a new form of a power pole, that will filter the air. The poles wouldnt be cheap, so would only put them in areas where pollution would be a issue like replacing the small electric power poles supplying a smelting area with these new ones, each Pole would consume some power, and in turn filter some pollution.
As it stands, the power pole works, it cleans the air, but dosent seem to consume any power.
Looking at the power grid, it dosent show as using any power.
Here is a code sniplet, I am trying to make always consume when power is availible, but seems like it wants to consume to do something, like with a factory, only using its full power while its producing items, otherwise uses almost nothing.
I would like it always consume around the same power as a small assembly plant 1.
Yes the Emmisions are pretty high >.> but the idea is just to test the thing atm, not make it balanced :P

Code: Select all

	    {
      type = "electric",
      input_priority = "secondary",
      emissions_per_tick = -0.0050,
    },
	energy_usage_per_tick = 1.5,

Re: Power Consumption without production?

Posted: Mon Oct 14, 2013 3:48 am
by FreeER
tried testing this and it doesn't seem like they will use power anymore than they would give off light :) Basically you can give it an energy_usage_per_tick or light and while it doesn't give errors, it doesn't use it either (because the C++ code doesn't know to look for anything that the devs didn't expect an electric pole to use). From my understanding of the game anyway.

Re: Power Consumption without production?

Posted: Mon Oct 14, 2013 3:55 am
by midnight109
Well maybe I should just make a new entity all together, was working on a few aspects but they all seem to do the same thing, unless thier 'doing something' they dont seem to consume anything >.>

Re: Power Consumption without production?

Posted: Mon Oct 14, 2013 4:11 am
by FreeER
I think raising/lowering effectivity would might change the resting energy use, but I'm not certain

Re: Power Consumption without production?

Posted: Mon Oct 14, 2013 7:09 am
by Nirahiel
I think the power poles don't emit pollution no matter what you code, because of the way they are made. They can't consume the energy because they're transmitting it.
Make an entity that's not a power pole :)

Re: Power Consumption without production?

Posted: Tue Oct 15, 2013 3:48 pm
by slpwnd
Electric poles don't have an energy source = they don't consume the electric power. You can try to use an assembling machine instead.

Re: Power Consumption without production?

Posted: Tue Oct 15, 2013 6:07 pm
by ficolas
Make an invisible (with no bounding/selection box) laser turret that doesnt shoot, with a high power consumion, then add the pole.
When the pole is placed, the script automatically saves the pole, and creates an invisible laser turret, and save it in a variable (you can make it have the icon that the pole haves so it is shown correctly on the energy consumion), when the power pole is destroyed, the script automatically destroys the invisible turret.

Re: Power Consumption without production?

Posted: Tue Oct 15, 2013 7:06 pm
by Math3vv
some machines use power even when not active so if you have for exsample :
15W and it only uses 1,5w (becaus it doesnt do anything) you sould make it use 150 W when active so it uses 15 W inactive
i hope this was usefull