placing + setting parameters for electric-energy-interface

Post all other topics which do not belong to any other category.
Post Reply
someone1337
Fast Inserter
Fast Inserter
Posts: 133
Joined: Wed Apr 26, 2017 11:29 pm
Contact:

placing + setting parameters for electric-energy-interface

Post by someone1337 »

Im trying to place a electric-energy-interface from the console and set its parameters.
The idea is to add a basically infinite accumulator for an enemy force I can store store energy overproduction from the early game to be able to use it when in need, without having the ability to change the interface parameters to like make it produce energy.

The working part: Place a electric-energy-interface rom console as enemy faction to prevent changing its parameters, works.

Code: Select all

/c  game.surfaces[1].create_entity({name="electric-energy-interface", position={-10, 0}}) 
The part that i cannot seem to figure out: how do i set the parameters for the electric-energy-interface using the console?

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5152
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: placing + setting parameters for electric-energy-interface

Post by Klonan »

someone1337 wrote:Im trying to place a electric-energy-interface from the console and set its parameters.
The idea is to add a basically infinite accumulator for an enemy force I can store store energy overproduction from the early game to be able to use it when in need, without having the ability to change the interface parameters to like make it produce energy.

The working part: Place a electric-energy-interface rom console as enemy faction to prevent changing its parameters, works.

Code: Select all

/c  game.surfaces[1].create_entity({name="electric-energy-interface", position={-10, 0}}) 
The part that i cannot seem to figure out: how do i set the parameters for the electric-energy-interface using the console?

Code: Select all

/c  local interface = game.surfaces[1].create_entity({name="electric-energy-interface", position={-10, 0}})
  interface.electric_drain = 123456
  --Etc

someone1337
Fast Inserter
Fast Inserter
Posts: 133
Joined: Wed Apr 26, 2017 11:29 pm
Contact:

Re: placing + setting parameters for electric-energy-interface

Post by someone1337 »

oh nice! Thx! <3

Post Reply

Return to “General discussion”