why order_upgrade sometime refuse to accept request ?

Place to get help with not working mods / modding interface.
User avatar
Stargateur
Filter Inserter
Filter Inserter
Posts: 333
Joined: Sat Oct 05, 2019 6:17 am
Contact:

why order_upgrade sometime refuse to accept request ?

Post by Stargateur »

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 ?
User avatar
Stargateur
Filter Inserter
Filter Inserter
Posts: 333
Joined: Sat Oct 05, 2019 6:17 am
Contact:

Re: why order_upgrade sometime refuse to accept request ?

Post by Stargateur »

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 :lol: 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
User avatar
Osmo
Fast Inserter
Fast Inserter
Posts: 209
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: why order_upgrade sometime refuse to accept request ?

Post by Osmo »

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 bug :lol: 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
In that thread Rseding said "source items", not "source entities". Are the buildings placeable by hidden items?
User avatar
Stargateur
Filter Inserter
Filter Inserter
Posts: 333
Joined: Sat Oct 05, 2019 6:17 am
Contact:

Re: why order_upgrade sometime refuse to accept request ?

Post by Stargateur »

Osmo wrote: Sat Dec 13, 2025 1:46 pm
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 bug :lol: 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
In that thread Rseding said "source items", not "source entities". Are the buildings placeable by hidden items?
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.
Post Reply

Return to “Modding help”