I use order_upgrade to fast_replace entity with control.lua in my mod. Without reason sometime it's refuse to order the upgrade even if all params are correct and both entity are in the same group, same force. I deconstruct the entity then try again and it's work. There doesn't seems to be any logical reason to this.
This is no error explanation when this function return false. How can I find why it's fail ?
why order_upgrade sometime refuse to accept request ?
- Stargateur
- Filter Inserter

- Posts: 333
- Joined: Sat Oct 05, 2019 6:17 am
- Contact:
- Stargateur
- Filter Inserter

- Posts: 333
- Joined: Sat Oct 05, 2019 6:17 am
- Contact:
Re: why order_upgrade sometime refuse to accept request ?
okay so for weird reason if entity that you want to order_upgrade is hidden in his prototype it's doesn't accept order_upgrade.... is this a bug
that very annoying, order_upgrade is so much convenient then destroy and create.
[2.0.72] order_upgrade doesn't accept to be used on hidden entity
[2.0.72] order_upgrade doesn't accept to be used on hidden entity
Re: why order_upgrade sometime refuse to accept request ?
In that thread Rseding said "source items", not "source entities". Are the buildings placeable by hidden items?Stargateur wrote: Sat Dec 13, 2025 11:55 am okay so for weird reason if entity that you want to order_upgrade is hidden in his prototype it's doesn't accept order_upgrade.... is this a bugthat very annoying, order_upgrade is so much convenient then destroy and create.
[2.0.72] order_upgrade doesn't accept to be used on hidden entity
- Stargateur
- Filter Inserter

- Posts: 333
- Joined: Sat Oct 05, 2019 6:17 am
- Contact:
Re: why order_upgrade sometime refuse to accept request ?
I don't think he used item word thinking about item in the game engine; order_upgrade is only about entities (my mod don't even have one item prototype), that probably just wrong wording. Anyway then how to fast replace an entity that is hidden ? I don't want to use create entity that annoying to clone manually an entity you need to clone modules, fluid, wires... and it's very laggy to use create_entity.Osmo wrote: Sat Dec 13, 2025 1:46 pmIn that thread Rseding said "source items", not "source entities". Are the buildings placeable by hidden items?Stargateur wrote: Sat Dec 13, 2025 11:55 am okay so for weird reason if entity that you want to order_upgrade is hidden in his prototype it's doesn't accept order_upgrade.... is this a bugthat very annoying, order_upgrade is so much convenient then destroy and create.
[2.0.72] order_upgrade doesn't accept to be used on hidden entity
