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 ready up mechanic to start a match, allow non-auto-intermission #680

Merged
merged 1 commit into from
Oct 12, 2024

Conversation

nullsystem
Copy link
Collaborator

@nullsystem nullsystem commented Oct 6, 2024

Description

  • A (not enabled by default) ready up mechanic that will only start a game if the players ready match the defined threshold (default to 5v5)
  • Allows to override the limit if desired, although for either scenarios will still require equal amount of players between Jinrai and NSF
  • New native player commands to set/unset ready state, configure override limit, and check players not ready
  • The override limit will reset to false when players drops below threshold
  • Automatic intermission can be turned off with the ready-up feature on
  • HUD round state fixed to just directly take the const wchar_t strings and therefore no need for ANSI->WCHAR conversions
  • Make sure round wins and XPs are resetting on non-intermission/idle/warmup to ready
  • Player commands
    • !ready - For the player to signal they're ready to play
    • !unready - For the player to signal they're not ready to play
    • !overridelimit - A player to signal in behalf of everyone that they'll be playing over the stated limit
    • !playersnotready - Prints the players that are not ready and give info on why it's not starting
    • !help - Prints the help text which usually just showing those commands
  • ConVars
    • neo_sv_readyup_lobby - 0 by default, toggles the ready-up feature
    • neo_sv_readyup_teamplayersthres - 5 by default, the exact amount of players to ready-up and participate to start a game
    • neo_sv_readyup_skipwarmup - 1 by default, if ready-up feature is on and this is enabled, skip warmup state
    • neo_sv_readyup_autointermission - 0 by default, if disabled will not automatically enter intermission when the match ends

Toolchain

  • Linux GCC Distro Native Arch/GCC 14

Linked Issues

@nullsystem nullsystem marked this pull request as ready for review October 6, 2024 17:29
@nullsystem nullsystem changed the title Add start of game ready up mechanic Add ready up mechanic to start a match, allow non-auto-intermission Oct 6, 2024
@nullsystem nullsystem requested a review from a team October 8, 2024 21:17
@nullsystem nullsystem marked this pull request as draft October 8, 2024 22:07
@nullsystem nullsystem marked this pull request as ready for review October 8, 2024 22:20
brysondev
brysondev previously approved these changes Oct 9, 2024
AdamTadeusz
AdamTadeusz previously approved these changes Oct 9, 2024
mp/src/game/shared/neo/neo_gamerules.cpp Outdated Show resolved Hide resolved
mp/src/game/shared/neo/neo_gamerules.cpp Outdated Show resolved Hide resolved
@kassibuss

This comment was marked as resolved.

@nullsystem
Copy link
Collaborator Author

Nitpick, feel free to ignore, but maybe !playersnotready should be !readylist instead? Just to keep it in consistent with the original comp plugin

Functionality wise it's quite different at the moment even if it serves similar purpose.
Actually probably the top HUD could do some indication instead but that can be done later anyway.

AdamTadeusz
AdamTadeusz previously approved these changes Oct 12, 2024
@AdamTadeusz
Copy link
Contributor

@nullsystem conflicts

brysondev
brysondev previously approved these changes Oct 12, 2024
Copy link
Contributor

@brysondev brysondev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely wanna adjust chat commands a little but that can be a separate PR.

* A (not enabled by default) ready up mechanic that will only start a
  game if the players ready match the defined threshold (default to
  5v5)
* Allows to override the limit if desired, although for either scenarios
  will still require equal amount of players between Jinrai and NSF
* New native player commands to set/unset ready state, configure
  override limit, and check players not ready
* The override limit will reset to false when players drops below threshold
* Automatic intermission can be turned off with the ready-up feature on
* HUD round state fixed to just directly take the const wchar_t strings
  and therefore no need for ANSI->WCHAR conversions
* Make sure round wins and XPs are resetting on non-intermission to ready
* Only functional during idle state, other state shouldn't be able to
  interact or/and activate ready-up feature
* Player commands
    * !ready - For the player to signal they're ready to play
    * !unready - For the player to signal they're not ready to play
    * !overridelimit - A player to signal in behalf of everyone that
      they'll be playing over the stated limit
    * !playersnotready - Prints the players that are not ready and give
      info on why it's not starting
* ConVars
    * neo_sv_readyup_lobby - 0 by default, toggles the ready-up feature
    * neo_sv_readyup_teamplayersthres - 5 by default, the exact amount
      of players to ready-up and participate to start a game
    * neo_sv_readyup_skipwarmup - 1 by default, if ready-up feature is
      on and this is enabled, skip warmup state
    * neo_sv_readyup_autointermission - 0 by default, if disabled will
      not automatically enter intermission when the match ends
* fixes NeotokyoRebuild#218
@nullsystem nullsystem merged commit 4f79287 into NeotokyoRebuild:master Oct 12, 2024
6 checks passed
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.

Rounds are reset to zero upon pre-game ending. Ready up / Lobby mechanics
4 participants