[0.11.19] setting energy using script is not possible

Bugs that are actually features.
User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 421
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

[0.11.19] setting energy using script is not possible

Post by y.petremann »

Basically, I can't do this on burner machines, the energy is present on one tick, but on the next tick, it revert to the previous value.

Code: Select all

/c game.player.selected.energy = 3000
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.19] setting energy using script is not possible

Post by kovarex »

Yes, because the burner has some small capacity.
User avatar
SHiRKiT
Filter Inserter
Filter Inserter
Posts: 706
Joined: Mon Jul 14, 2014 11:52 pm
Contact:

Re: [0.11.19] setting energy using script is not possible

Post by SHiRKiT »

Have you tried with a lower value? I think that's what the dev means.
User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 421
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

Re: [0.11.19] setting energy using script is not possible

Post by y.petremann »

SHiRKiT wrote:Have you tried with a lower value? I think that's what the dev means.
But for now all I have tested is drain in a single tick ... so the machine can get "infinite energy" for example else than putting energy each tick. I am wrong ?
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.19] setting energy using script is not possible

Post by kovarex »

y.petremann wrote:
SHiRKiT wrote:Have you tried with a lower value? I think that's what the dev means.
But for now all I have tested is drain in a single tick ... so the machine can get "infinite energy" for example else than putting energy each tick. I am wrong ?
You can enhance the capacity of the burner, and then set the energy to very high value: https://forums.factorio.com/wiki/inde ... ergySource
Rseding91
Factorio Staff
Factorio Staff
Posts: 14301
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.11.19] setting energy using script is not possible

Post by Rseding91 »

kovarex wrote:
y.petremann wrote:
SHiRKiT wrote:Have you tried with a lower value? I think that's what the dev means.
But for now all I have tested is drain in a single tick ... so the machine can get "infinite energy" for example else than putting energy each tick. I am wrong ?
You can enhance the capacity of the burner, and then set the energy to very high value: https://forums.factorio.com/wiki/inde ... ergySource
Unless something's changed recently last time I looked at this particular issue burner energy sources dynamically set the buffer size to that of the item they where burning. When they weren't burning anything it was enough energy to run for 1 tick.
If you want to get ahold of me I'm almost always on Discord.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.11.19] setting energy using script is not possible

Post by kovarex »

Rseding91 wrote:
kovarex wrote:
y.petremann wrote:
SHiRKiT wrote:Have you tried with a lower value? I think that's what the dev means.
But for now all I have tested is drain in a single tick ... so the machine can get "infinite energy" for example else than putting energy each tick. I am wrong ?
You can enhance the capacity of the burner, and then set the energy to very high value: https://forums.factorio.com/wiki/inde ... ergySource
Unless something's changed recently last time I looked at this particular issue burner energy sources dynamically set the buffer size to that of the item they where burning. When they weren't burning anything it was enough energy to run for 1 tick.
For some reason, I thought that this logic is only applied when the limit is not specified in the prototype, but I looked it up in the code now, and it isn't true. But it would make sense to do it that way.
Post Reply

Return to “Not a bug”