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 weighted voting pool support #1403

Merged
merged 1 commit into from
Oct 2, 2024
Merged

Add weighted voting pool support #1403

merged 1 commit into from
Oct 2, 2024

Conversation

Pablete1234
Copy link
Member

Adds support for map-weighting in voted pools, as well as allowing more flexibility in defining maps in groups in the map-pool config file.

Currently, the pool has simply one maps list of strings:

pools:
  default:
    [...]
    maps:
    - Airship Battle
    - Harb
    - Race for Victory
    - The Fenland
    - Warlock

This remains supported, but can now (for all types of pools, not just voted) be extended to be grouped, eg:

pools:
  default:
    [...]
    maps:
      dtc:
        - Airship Battle
      tdm:
        - Harb
      ctw:
        - Race for Victory
      dtm:
        - The Fenland
        - Warlock

These groups, can also be weighted (you can do this for all pools, but weight will have no effect on non-voted pools):

pools:
  default:
    [...]
    maps:
      dtc:
        - Airship Battle
      tdm:
        - Harb
      ctw:
        - Race for Victory
      dtm:
        weight: 0.5
        maps:
          - The Fenland
          - Warlock

Note that you can mix-and-match the above, and even recursively nest stuff:

pools:
  default:
    [...]
    weight: 0.5
    maps:
      dtc:
        weight: 1
        maps:
          - Airship Battle # weight = 1
      tdm:
        - Harb # weight = 0.5
      ctw:
        - Race for Victory # weight = 0.5
      dtm:
        weight: 0.7
        maps:
          s-tier:
            - The Fenland # weight = 0.7
          overplayed:
            weight: 0.2
            maps:
              - Warlock # weight = 0.2

@Pablete1234 Pablete1234 added the feature New feature or request label Sep 29, 2024
@Pablete1234 Pablete1234 merged commit 78df927 into dev Oct 2, 2024
2 checks passed
@Pablete1234 Pablete1234 deleted the map-weights branch October 2, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants