Page 1 of 1

Add EntityPrototype properties for more control of upgrade planner

Posted: Fri Mar 06, 2026 11:13 pm
by Thremtopod
My mod Rigor Module, in order to implement a new module effect, needs to create a bunch of hidden copies of entity prototypes. Crafting-machine entities get "hot-swapped" at runtime with their hidden "rigor" versions, depending on the rigor modules they do or don't have inserted. This works almost perfectly, but the only feature that doesn't have a good way of handling this is the upgrade planner.

I think this requires two properties, one for specifying an entity's matching "upgrade from" filter, and one for hiding entities from the UI.

EntityPrototype::deconstruction_alternative is very useful in that it lets you collapse multiple entities into a single filter in the deconstruction planner (and this works seamlessly with the hidden "rigor" entities). I think a version of this property would work well for "upgrade from"; i.e., something like EntityPrototype::upgrade_from_alternative. It would likely need to be limited to entities meeting both the criteria for EntityPrototype::deconstruction_alternative EntityPrototype::next_upgrade. Similar to how "deconstruction_alternative" encompasses multiple entity prototypes.

For handling the UI clutter, I think some version of EntityPrototype::hidden_in_upgrade_planner would be enough. Just a way for these entities not to clutter the interface.

too-many-cooks-5.png
too-many-cooks-5.png (172.29 KiB) Viewed 285 times
too-many-cooks-2.png
too-many-cooks-2.png (170.02 KiB) Viewed 285 times

Re: Add EntityPrototype properties for more control of upgrade planner

Posted: Thu Mar 12, 2026 3:54 am
by Thremtopod
I realize that adding something like "EntityPrototype::upgrade_from_alternative" might be too niche and/or have too many edge cases to be worth implementing. Even if that can't be implemented, adding a version of "EntityPrototype::hidden_in_upgrade_planner" would still be valuable (and, I expect, technically much simpler).

Without "EntityPrototype::upgrade_from_alternative" rigor moduled entities won't work correctly with the upgrade planner; inconvenient for my modding ambitions but the issue doesn't extend beyond the mod's direct content. (And who knows, maybe I could even hack together something with runtime scripting!) But being unable to hide entities from the upgrade planner can affect the upgrade planner every time it's used. It's asking a lot of users to put up with the mod making a built-in feature worse everywhere.

Note that hidden entities do not appear as options in the "upgrade from" filter, but they do appear in the "upgrade to" options. In the first post I referred to making hidden copies of entity prototypes, but there are enough "hidden-in-*" properties and tags to cover everything (besides the upgrade planner) without actually setting "hidden = true". So being able to set "hidden_in_upgrade_planner" would fully solve the problem of cluttering the UI.

Re: Add EntityPrototype properties for more control of upgrade planner

Posted: Fri Mar 13, 2026 5:16 pm
by protocol_1903
I have an alternative idea, perhaps EntityPrototype.hidden should be separated from being hidden/not useable in the upgrade planner? That way cases like this with hotswapped entities would still work, while being invisible everywhere else.