Add prototype definition?

Place to get help with not working mods / modding interface.
Post Reply
ss_Baum
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Wed Apr 04, 2018 10:58 am
Contact:

Add prototype definition?

Post by ss_Baum »

Just a short question.

Is it possible to add a prototype definition to a prototype like energy-usage to a belt?
Or do I have to create a ElectricEnergyInterface that is placed on the same position of the original entity, so that there are two entities placed.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Add prototype definition?

Post by DaveMcW »

No.
Yes.

ss_Baum
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Wed Apr 04, 2018 10:58 am
Contact:

Re: Add prototype definition?

Post by ss_Baum »

Thank you for your fast reply.

User avatar
bormand
Fast Inserter
Fast Inserter
Posts: 201
Joined: Fri Jun 05, 2020 9:59 am
Contact:

Re: Add prototype definition?

Post by bormand »

DaveMcW wrote:
Tue Jan 26, 2021 9:26 am
Yes.
Are they optimized like solar panels or accumulators? Or every EEI is calculated separately?

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2248
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Add prototype definition?

Post by boskid »

bormand wrote:
Tue Jan 26, 2021 10:01 am
Are they optimized like solar panels or accumulators? Or every EEI is calculated separately?
EEI works as normal active entity: they will take their time in entity update to refill/use their energy buffer, and they are visited one by one by electric network update when distributing energy. Solar panels and accumulators do not take time in entity update and in electric network update the whole group is taken as a single record (in case of accumulators there are extra group conditions like the same state of charge).

ss_Baum
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Wed Apr 04, 2018 10:58 am
Contact:

Re: Add prototype definition?

Post by ss_Baum »

Actually one more question,

because I can't place to entities at the same time (I think) I probably have to use create_entity in my control.lua.
Is there a special thing I have to consider?
Like should I use the target definition for the create entity?

API I used: https://lua-api.factorio.com/latest/Lua ... ate_entity

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Add prototype definition?

Post by darkfrei »

ss_Baum wrote:
Tue Jan 26, 2021 9:24 am
Just a short question.

Is it possible to add a prototype definition to a prototype like energy-usage to a belt?
Or do I have to create a ElectricEnergyInterface that is placed on the same position of the original entity, so that there are two entities placed.
See mod: https://mods.factorio.com/mod/PoweredBelts

Post Reply

Return to “Modding help”