Power Consumption without production?

Place to get help with not working mods / modding interface.
Post Reply
midnight109
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Thu Jun 27, 2013 3:59 pm
Contact:

Power Consumption without production?

Post 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,

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Power Consumption without production?

Post 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.
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

midnight109
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Thu Jun 27, 2013 3:59 pm
Contact:

Re: Power Consumption without production?

Post 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 >.>

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Power Consumption without production?

Post by FreeER »

I think raising/lowering effectivity would might change the resting energy use, but I'm not certain
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net

Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Power Consumption without production?

Post 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 :)

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: Power Consumption without production?

Post 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.

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Power Consumption without production?

Post 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.

User avatar
Math3vv
Long Handed Inserter
Long Handed Inserter
Posts: 99
Joined: Sun Oct 06, 2013 10:47 am
Contact:

Re: Power Consumption without production?

Post 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

Post Reply

Return to “Modding help”