Electricity autonomous entity ?

Place to get help with not working mods / modding interface.
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Electricity autonomous entity ?

Post by binbinhfr »

Hi,

I need to make a fake radar for a new mod. I will unactivate it, but I don't want it to display the "missing electricity" symbol.
I wonder if there is a way to make an entity autonomous in electricity (i.e. integrate in the entity a hiden free source of energy ? maybe with the new energy_source features ?)
But I did not succeed for the moment...
Any idea ?
My mods on the Factorio Mod Portal :geek:
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5407
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Electricity autonomous entity ?

Post by Klonan »

binbinhfr wrote:Hi,

I need to make a fake radar for a new mod. I will unactivate it, but I don't want it to display the "missing electricity" symbol.
I wonder if there is a way to make an entity autonomous in electricity (i.e. integrate in the entity a hiden free source of energy ? maybe with the new energy_source features ?)
But I did not succeed for the moment...
Any idea ?
In energy source you can use the definition something like this:

Code: Select all

energy_source =
    {
      type = "electric",
      usage_priority = "secondary-input",
      input_flow_limit = "1MW",
      buffer_capacity = "10MJ",
      render_no_network_icon = false,
      render_no_power_icon = false
      
    },
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: Electricity autonomous entity ?

Post by binbinhfr »

Hi Klonan,
s
Thx for the answer, but with your trick , it seems that the derivated radar still needs to be connected to an electric network.
It cannot work autonomous.

I would like an integrated illimited free source of energy.
I want a radar that I can just put alone on the ground and it works. Is it possible ?
My mods on the Factorio Mod Portal :geek:
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Electricity autonomous entity ?

Post by Ranakastrasz »

binbinhfr wrote:Hi Klonan,
s
Thx for the answer, but with your trick , it seems that the derivated radar still needs to be connected to an electric network.
It cannot work autonomous.

I would like an integrated illimited free source of energy.
I want a radar that I can just put alone on the ground and it works. Is it possible ?
If you set the power consumtion to 0, does it work?

Also, the Render booleans are something I really wish I had a while ago.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: Electricity autonomous entity ?

Post by binbinhfr »

Ranakastrasz wrote:If you set the power consumtion to 0, does it work?
On the radar, a 0kW consulmption is not accepted.
I suppose the behaviour of the radar is calculating the frequency of the scans on the consumption and cost of one scan. So it would create a /0 error...
My mods on the Factorio Mod Portal :geek:
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2179
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: Electricity autonomous entity ?

Post by Ranakastrasz »

binbinhfr wrote:
Ranakastrasz wrote:If you set the power consumtion to 0, does it work?
On the radar, a 0kW consulmption is not accepted.
I suppose the behaviour of the radar is calculating the frequency of the scans on the consumption and cost of one scan. So it would create a /0 error...
Hmm. Set it to 1 Watt, and script on placement, give it a gigawatt of power. That would last several years. Real life years.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: Electricity autonomous entity ?

Post by binbinhfr »

Yes good idea, but the problem is that I cannot set the energy of this entity : it accepts the command (under LUA or under console), I see teh electricity bar jumping and coming immediatly back to 0. I put 1GJ buffer ! and the entity consumes only 10kW... I wonder if we are allowed to tweak energy variable on any type of derivated entity...
Infact on the info of teh derivated radar, there is an electricity bar, but no energy bar (like on accus).
My mods on the Factorio Mod Portal :geek:
ratchetfreak
Filter Inserter
Filter Inserter
Posts: 952
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: Electricity autonomous entity ?

Post by ratchetfreak »

IIRC there was a new energy type that is just a infinite source
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1525
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: Electricity autonomous entity ?

Post by binbinhfr »

maybe you are talking about the electric-energy-interface ?
but it's an entity type by itself.
I wonder if there was a way to integrate an hidden infinite source directly into an entity. Klonan seems to think that there is... Klonan, do you have any clue ?
My mods on the Factorio Mod Portal :geek:
Post Reply

Return to “Modding help”