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

Item filtering refactor #309

Open
MatthewMarinets opened this issue Sep 21, 2024 · 1 comment
Open

Item filtering refactor #309

MatthewMarinets opened this issue Sep 21, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@MatthewMarinets
Copy link

MatthewMarinets commented Sep 21, 2024

What task needs to be completed?

Writing down goals and design decisions following discussion with Ziktofel on 2024-09-21

Goals:

  • Locked items option should behave consistently (currently can be filtered for transport hook, a PF upgrade, and zerg flyer W/A upgrades)
  • Consolidate "necessary" flag with locked where appropriate
    • within PoolFilter.py "Locked", "Necessary" -> "Requested", "Locked"
  • Split "excluded" flag depending on how important it is to respect
  • PoolFilter.py (item culling) should use the same flag system as init.py (item filtering)
    • Maybe move item filtering to its own file to keep init.py smaller
  • Add an allow_generation_failure yaml-only option (invisible on website), which controls if the generator will try to adjust invalid option arrangements to make a valid world, or will fail with an error message if the world is invalid.
  • General cleanup -- remove unused "origin" field on ItemData

Flag changes:

  • Necessary -- remove it. Consolidate with Locked or Requested where appropriate.
  • Requested -- used within item culling, for an item that is requested to be locked to meet upgrade counts, but can be overridden if a parent is culled (replace weird locking behaviour for zerg flyer w/a upgrades, transport hook, and PF orbital abilities)
  • Removed -- used for w/a upgrades of the wrong package type. Overrides all other options, cannot be added back in even if locked
  • Culled -- used for items that are excluded by item culling, but which may be added back in even if allow_generation_failures is true.
  • Excluded -- used for user excludes through options. Excluded items should be respected unless overridden with locks or if allow_generation_failures is off to meet mission logic

The filter flag priority hierarchy is:

  1. removed
  2. start_inventory
  3. locked
  4. excluded
  5. requested
  6. culled

*Note requested and culled should generally be mutually exclusive, so their hierarchy can be changed to make the implementation easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants