Skip to content

Conversation

Starkku
Copy link
Contributor

@Starkku Starkku commented Jul 23, 2025

This feature allows replacing duplicate game modes per difficulty with a dropdown control for co-op style game modes.

The implementation could have technically been done using GameLobbyDropDown but it would have required a lot of new functionality or special case exceptions (f.ex interaction with AI difficulties in spawn.ini, state toggling between different game modes, display of difficulty information in game info panels etc) to be made anyway so I figured more complete bespoke implementation is probably worth it.

  • Two new optional controls can be added to GameLobbyBase, ddDifficulty (XNAClientDropDown) and lblDifficulty (XNALabel). The dropdown does not allow setting items in INI and is automatically filled with names of available difficulties with localization applied.
  • The aforementioned controls are enabled (for label this is only a text color change) if selected game mode has UseDifficultyDropDown set to true.
  • In multiplayer game lobbies both controls are only visible to host and only when map list is not hidden.
  • Selected difficulty is shown together with game mode name in game lobby info labels as well as hosted game info box.
  • Selected difficulty is used for AI difficulty in co-op game modes instead of game mode's CoopDifficultyLevel.
  • INI files, filenames of which are defined as comma-separated list in ClientDefinitions.ini, [Settings] -> CoopDifficultyINIPaths are merged to spawnmap.ini, with difficulty dropdown selected index corresponding to index of INI file in the comma-separated list. Default list is INI\Map Code\Coop Difficulty Easy.ini,INI\Map Code\Coop Difficulty Medium.ini,INI\Map Code\Coop Difficulty Hard.ini. File hash calculator will include these files separately if any of their paths is not already checked.

Screenshots

Enabled dropdown

image

Disabled dropdown

image

Hosted game info panel

image

Copy link

Nightly build for this pull request:

  • artifacts.zip
    This comment is automatic and is meant to allow guests to get latest automatic builds without registering. It is updated on every successful build.

@SadPencil SadPencil added this to the long term milestone Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants