Allow setting restrictions on blueprint parameters

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

macdjord
Long Handed Inserter
Long Handed Inserter
Posts: 88
Joined: Fri Feb 22, 2013 4:26 am
Contact:

Allow setting restrictions on blueprint parameters

Post by macdjord »

When parameterizing a blueprint, it would be nice to be able to set restriction on the types of item an item parameter can be, or what values a numeric parameter can take on.

For example, I have parameterized blueprints for train stations for loading/unloading 1-4 trains with a single item type. They use circuit logic to set the stop's train limit based on how much is currently in the buffer, with a configurable maximum limit (to avoid bringing in more trains than the stop has parking for). In this case:
  • It would be nice to be able to restrict the 'Item to transport' parameter to only allow items that can actually be shipped. One obviously cannot load cargo wagons full of [A], Koravex Enrichment Process, crude oil, or medium biters.
  • It would be nice to be able to restrict the 'Max train limit' parameter to values between 0 and 4 inclusive. Having a negative train limit is obviously meaningless, and the train limit can never exceed 4 because I only have 4 buffer chests per cargo wagon.
Ideally, users should be able to customise their own item restriction, but useful presets would include:
  • Physical items (anything that can be put in a chest, picked up by an inserter, etc.)
  • Fluids
  • Intermediate products
  • Recipes for a specific crafting building
  • All recipes
  • Pure recipes (anything recipe that is not also an item or fluid)
  • Virtual signals
  • Colour signals
  • Enemies
    [/url]
    Note that users should be able to start with one of the presets then add or remove items to make a custom restriction, or combine multiple presets, or subtract one preset from another.

    For numeric parameters, there are many types of restrictions that could be implemented, but I'd suggest keeping it simple: a minimum, a maximum, and/or a specific list of valid values to choose from.

    This sort of limitation is already applied automatically in some cases for item parameters - a parameter that gets used as a pump's filter is automatically restricted to fluids, while one that is used as a recipe for some assembler or other machine is restricted to recipes that machine can make. There's another suggestion for allowing the user to manually mark a parameter as a recipe, but that doesn't cover restricting item types in other ways, nor restricting numerical parameters.
Post Reply

Return to “Ideas and Suggestions”