Page 1 of 1

[0.11.19] setting energy using script is not possible

Posted: Thu Mar 26, 2015 2:09 am
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

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

Posted: Fri Mar 27, 2015 9:28 am
by kovarex
Yes, because the burner has some small capacity.

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

Posted: Fri Mar 27, 2015 1:45 pm
by SHiRKiT
Have you tried with a lower value? I think that's what the dev means.

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

Posted: Sat Mar 28, 2015 11:37 am
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 ?

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

Posted: Sat Mar 28, 2015 2:54 pm
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

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

Posted: Tue Mar 31, 2015 3:44 pm
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.

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

Posted: Tue Mar 31, 2015 5:43 pm
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.