Add Placement Limit Category prototype

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
PennyJim
Fast Inserter
Fast Inserter
Posts: 105
Joined: Wed Jan 18, 2023 3:49 am
Contact:

Add Placement Limit Category prototype

Post by PennyJim »

A common desire, is to be able to enforce an "n per surface" or "n per save" placement condition. Every time this has been brought up in the discord, the following questions tend to get brought up to show how it's more complex than first blush:
Xorimuth wrote:1 per surface per force? or just globally per surface? 1 per prototype or 1 per type? Which object should store all those runtime modifiers be stored? How would that combine with techs that increase the limit? How should those techs be defined?
My idea is a placement limit category prototype that has a field to define if it's per surface, another for per force, and finally a base amount allowed.
With this prototype, the CargoLandingPadLimitModifier would be replaced with a PlacementLimitCategoryModifier that refers to them by prototype name.

The EntityPrototypes themselves would opt into a category (or maybe possibly multiple?) via a new field just like RecipePrototype::category or CraftingMachinePrototype::crafting_categories, allowing modders to manually control whether it's by type, prototype, or even more complex groupings; like those 3 assembling machines all count towards the same limit as they're the same 'type' of building in canon.


To expand on the idea of an entity belonging to multiple placement limit categories, I imagine that it would increment each category when placed down, and reject placement if any one of them is full.
protocol_1903
Fast Inserter
Fast Inserter
Posts: 210
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Add Placement Limit Category prototype

Post by protocol_1903 »

+1
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
Post Reply

Return to “Modding interface requests”