Having the ability to forbid specific modules from being used in certain entities and for specific recipes would be an immensely powerful feature for more intuitively and granularly controlling module use for various use cases, such as progression gating (tier X machine caps out at Y module) or theming. (drill accepts drill tip-themed modules)
Currently those 'restricted' modules would be accessible without manually restricting them via Lua code (which wouldn't show proper module restrictions when the module slots are hovered over) or using hacky tricks like crafting category restrictions and duplicate recipes for different tiers of machines. (which would show proper module restrictions, but is less than ideal and would lead to notable bloating of the recipe list, affecting popular mods like Helmod or Factory Planner)
A simple list of allowed/denied entities for each module would significantly streamline this and make these use cases easier for both players and modders alike.
entity_limitation and entity_limitation_blacklist for module prototypes
Re: entity_limitation and entity_limitation_blacklist for module prototypes
One issue with this is how to convey to the player what the limits are in a given module. The distinction of what recipes accept what module effects is already confusing.
Additionally; how would these effects work when it comes to beacons? Beacons do not track where the beacon effect came from. They simply sum all effects in the module inventory and apply them to the machines found.
Additionally; how would these effects work when it comes to beacons? Beacons do not track where the beacon effect came from. They simply sum all effects in the module inventory and apply them to the machines found.
If you want to get ahold of me I'm almost always on Discord.
Re: entity_limitation and entity_limitation_blacklist for module prototypes
Duplicate of viewtopic.php?f=28&t=72130 (in spirit).
The player will also see in the module slot tooltip which modules are applicable.
Leave it to the mod author. That's what base game does already with productivity modules, structuring the recipe groups just so and telling in text which group is eligible. For once, the attitude "not used in base game, don't care" is actually justified.
The player will also see in the module slot tooltip which modules are applicable.
This is wrong. Allow productivity effect in beacons and you will see that the recipe limitation is preserved.
Re: entity_limitation and entity_limitation_blacklist for module prototypes
I didn’t explain well; beacons collect the total effect of the modules in their inventory and store that. Every time something is built in range of the beacon the combined effect is applied to the machine and the machine decides if it will exclude a given effect. When that apply happens the logic has no idea what effect came from what module if any.
If you want to get ahold of me I'm almost always on Discord.
Re: entity_limitation and entity_limitation_blacklist for module prototypes
Then why limitations work from inside beacons?
Re: entity_limitation and entity_limitation_blacklist for module prototypes
I went to look over the code again and it seems I was simply wrong. It does go over the beacon(s) inventories each time.
If you want to get ahold of me I'm almost always on Discord.
Re: entity_limitation and entity_limitation_blacklist for module prototypes
Hovering a machine's module slots gives a tooltip listing the accepted modules, including restrictions from the current recipe, so there's one place giving a definite answer. You could add the same tooltip into the recipe/machine tooltip to show what's generally accepted for/in that particular recipe/machine, but I fear that would clutter those tooltips too much.
Re: entity_limitation and entity_limitation_blacklist for module prototypes
I’d say just leave it to the mod to make tooltips outside of the machine's module slots for it, or possibly make it part of the module tooltip, below the module stats?Nidan wrote: ↑Fri May 26, 2023 11:08 amHovering a machine's module slots gives a tooltip listing the accepted modules, including restrictions from the current recipe, so there's one place giving a definite answer. You could add the same tooltip into the recipe/machine tooltip to show what's generally accepted for/in that particular recipe/machine, but I fear that would clutter those tooltips too much.
Re: entity_limitation and entity_limitation_blacklist for module prototypes
+1 for this! Would love to have it for Angel's mods. It would remove the need for some of the control stage scripting we currently have.
It would make it more clear where our special modules can be used. Currently they show up in the module slot tooltip on miners and labs. It's only when you try insert it that we intercept and disallow it. There's also no way for planner mods (Helmod etc) to know what control stage scripts are preventing.
It would make it more clear where our special modules can be used. Currently they show up in the module slot tooltip on miners and labs. It's only when you try insert it that we intercept and disallow it. There's also no way for planner mods (Helmod etc) to know what control stage scripts are preventing.
Dev for Bob's mods, Angel's mods, Helmod, Sea Block, Circuit Processing, Science Cost Tweaker.
Buy me a coffee
Buy me a coffee