Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scenario syntax for removing entities and recipes #864

Open
byorgey opened this issue Nov 14, 2022 · 3 comments
Open

Add scenario syntax for removing entities and recipes #864

byorgey opened this issue Nov 14, 2022 · 3 comments
Labels
C-Moderate Effort Should take a moderate amount of time to address. G-Entities An issue having to do with game entities. G-Recipes An issue having to do with recipes. G-Scenarios An issue having to do with scenario design, the way scenarios are described and loaded, etc. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. T-Challenges Involves the challenge scenarios - shorter games with objectives. Z-Feature A new feature to be added to the game.

Comments

@byorgey
Copy link
Member

byorgey commented Nov 14, 2022

Currently, scenarios can define custom entities and recipes that should be available in addition to all the "standard" entities and recipes. However, it would be nice (and hopefully not too difficult) if scenarios could have even more control over what entities and recipes will be available. For example, what if you wanted to

  • Create a scenario where using a harvester is not allowed, so the player has to be very frugal/precise in their use of available resources?
  • Create a scenario with a completely different set of entities?

Concretely, I propose

  1. There should be a way to remove specific entities by name. e.g. perhaps within the entities list you can put something like no: harvester or delete: harvester instead of describing a custom entity. Like this:
    entities:
      - name: thing
        ...
      - no: harvester
    
    I guess we'd have to parse such a thing as a list of "entity map edits" instead of directly as a list of entities. Alternatively, we could just have a separate top-level list of entities to remove.
  2. There should also be a way to completely clear the list of standard entities, like a top level boolean field standard-entities.
    standard-entities: false
    entities:
      ...
    
    You could use this if you want to design a custom set of entities from scratch.
  3. Likewise, there should be a way to remove specific recipies. Since recipies aren't named you would just have to describe the recipe you want to remove.
  4. Also likewise, there should be a way to clear all standard recipes.

I think the above is a bare minimum, but we might also consider adding more nuanced ways to edit the available entities and recipes, such as allowing some sort of filtering or wilcard matching (e.g. "remove all entities with the substring drill in their name", "remove all recipes requiring iron gear as an input", etc.)

This idea originally came out of a discussion here: #831 (comment) .

@byorgey byorgey added Z-Feature A new feature to be added to the game. C-Moderate Effort Should take a moderate amount of time to address. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. G-Entities An issue having to do with game entities. G-Scenarios An issue having to do with scenario design, the way scenarios are described and loaded, etc. G-Recipes An issue having to do with recipes. T-Challenges Involves the challenge scenarios - shorter games with objectives. labels Nov 14, 2022
@xsebek
Copy link
Member

xsebek commented Nov 14, 2022

Maybe we could support wildcards when removing entities and recipes.

Being able to remove all recipes that for example produce drill could be useful.

@kostmo
Copy link
Member

kostmo commented Nov 14, 2022

the idea was mentioned of not allowing players to use a harvester

I think that was in #831

@byorgey
Copy link
Member Author

byorgey commented Aug 14, 2023

So as a concrete proposal, how about this:

  • There is still only a single entities key and a single recipes key, which contain lists of objects
  • Each object can be either
    • An entity or recipe description to be added
    • The key remove, containing a nested entity or recipe record, except that not all fields are required and fields may contain wildcard patterns

For example:

entities:
  - name: foo
    properties: [portable]
    ...etc.
  - remove:
      name: *drill

recipes:
  - <regular recipe 1>
  - <regular recipe 2>
  - remove:
      out: [*, branch]

@byorgey byorgey changed the title Richer ways for scenarios to control what entities and recipes are available Add scenario syntax for removing entities and recipes Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Moderate Effort Should take a moderate amount of time to address. G-Entities An issue having to do with game entities. G-Recipes An issue having to do with recipes. G-Scenarios An issue having to do with scenario design, the way scenarios are described and loaded, etc. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. T-Challenges Involves the challenge scenarios - shorter games with objectives. Z-Feature A new feature to be added to the game.
Projects
None yet
Development

No branches or pull requests

3 participants