Git Product home page Git Product logo

geryknockout's People

Contributors

stefan-baumann avatar voyager006 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

geryknockout's Issues

Incorrect number of KOs is shown in podium

When going into the podium, the number of players is decreased and the number of KOs are adjusted to show; but the round number is not updated.

Perhaps the best way is to update the player count only, but not the number of KOs and the round number.

Custom scoretable

Wouldn't it be great to have a custom scoretable showing who is currently playing and who is knocked out? It may be completely custom or based on the native scoretable (with e.g. custom background colors). Not exactly sure how it should be implemented.

Make dynamic KO multiplier reflect lives

Currently, number of lives is not taken into consideration when approximating the target curve. Use the sum of lives instead of the number of players.

  • Pass in total number of lives to KOMultiplier
  • Update docs

Set multiple settings with same command

If there is a bigger demand, it may be sensible to set knockout settings such as author skips, rounds, lives, open warmup etc. with one command /ko set:

/ko set [authorskip <x>] [lives <x>] [openwarmup <on/off>] ...

Show number of lives in status bar

Can be done with an extra box. Only show if $this->lives is greater than 1. If possible, show total number of lives as well (e.g. 1/3). Might involve making the status bar scalable (work for any number of boxes).

Show number of lives in scoreboard

Only when $this->lives is greater than 1. Can heart symbols be used? E.g. ❤️, ❤️❤️, ❤️❤️❤️, 4❤️, 5❤️, ...

Add support for Realspace's Countdown mode

I believe we need to enforce Round's new rules for this. Choose whether the script should enforce Rounds + new rules or if the script shouldn't start the knockout with wrong settings.

Also make sure we can't change knockout mode in the middle of the knockout.

CLI will be updated with a new command /ko mode countdown.

Log results

When a knockout ends, export the full results to a text file. Position, nickname and login for each player, along with date/time and other info.

Dynamic KO ends up 1 round too short

With no unexpected KOs for the top 20, setting the dynamic KO multiplier ended up one round too short:

  • Dynamic 20 -> 19 rounds
  • Value: 17 -> 16 rounds

Add support for Laps

A highly requested feature is to support the laps mode and improve on the existing variant used in the MX KO. Each lap, the last placed player is knocked out until all laps have been driven (in which case the match proceeds to the next map with the remaining players) or one driver remains.

Logic

  • Keep track of CP count (and possibly lap number) in Scores class
  • Keep track of the best time for each CP
  • Submit checkpoint times in onPlayerCheckpoint callback (as well as onPlayerFinish)
  • Remove players from Scores instance as they are knocked out
  • Create function getDistanceToLeader(time, cpNumber) for the front end
  • Update player count, KOs and UIs when KOs are performed
  • Make sure to KO the last player only when the player in front crosses the finish line. There are several approaches possible:
    1. onPlayerCheckpoint provides the lap number which we can check against; but requires storing the lap count for each player.
    2. Check against the NbCheckpoints field that can be retrieved from GetCurrentChallengeInfo method + BeginChallenge/BeginRace callbacks.
  • Make sure KOs aren't performed in onEndRound.
  • Handle edge cases where multiple players retire or stand still at the start. If two players dont' start, they will be both KO once the player ahead enters lap 3, lap 4 for 3 players, and so forth.
  • Add an async delay for network ping before performing KOs. I suggest a 1 second delay. Requires a new callback function listening to onMainLoop and state management. Without this, there's a great risk that people may get knocked out even if they're ahead. Though, when all players have been registered, the KO can be performed immediately.
  • Sort DNFs by number of CPs + time of last CP
  • Consider if it's possible to implement tiebreaker logic; if the bottom players have equal time; (1) check the difference on the previous checkpoint, or (2) check the difference on the next checkpoint

Visuals

  • Show intermediate times as italic + relative to leader (+x.xx), and finished times as their absolute value
  • Update scoreboard to show number of CPs as well
  • When implementing relative times in the scoreboard, keep dynamic spacing (for the nicknames) intact
  • Make sure that distances to the leader in the scoreboard can be updated if the leader's time is submitted later due to network delay
  • We want the scoreboard to be always visible, but ensure that it doesn't appear in the middle of the race in Rounds

CLI/KO multiplier

  • Consider whether /ko multi should apply for laps (or perhaps use a custom command for this use case, such as /ko multi laps [<laps>] to make it possible to KO every other lap e.g.)

Show positions in scoreboard

Given that the scoreboard may not show all players, it may be beneficial to show each player's position. It may be a bit difficult to show tied players's correct position so we won't focus on that.

To distinguish the position from the time/score, we may need to move the time/score to the right of the names.

Warmup/round not ending when no one is driving

When using this plugin, for some reason, players seem to be lingering after being forced in to or out of spec. An example: one player finishes the warmup but everyone else retire; normally the warmup will end immediately but here it doesn't.

Something tells me it has to do with ForceSpectator calls and player slots.

Do we need to force spec players right as they retire/finish during warmup?

Create knockout mode with total time across multiple rounds

A Rounds mode where the total time across a given number of rounds will determine whether you will be knocked out or not. Might be called Combine/Total/Carry/Rally?

CLI will be updated with a new command /ko mode <x>, where x will be the name we decide on for this mode.

Overloaded /ko start command

Thinking of whether this would be a good idea or not

Currently, to setup the knockout, you would need a series of commands to make the settings. This idea would enable the knockout to be configured and started by one command. Say, if you want to start an Endurance knockout:

/ko mode endurance
/ko lives * 2
/ko start

This would be made into:

/ko start endurance lives 2

where the order of endurance and lives 2 may be exchanged.

Can possibly extend this to matchsettings, knockout-specific modes, lives, environments, map styles, and so on.

Move false starts functionality to TMGery

Currently, the knockout plugin is responsible for restarting the round if someone retires before it starts. This is because TMGery does not offer this functionality by itself. But it is not really a knockout-specific thing, and would probably be better suited being an actual function in TMGery instead.

This will be a breaking change.

Entering a tiebreaker restarts the track from round 1

Increasing the points limit during the last round of a track (a round when at least one player will reach the points limit) will not stop the game from finishing the match and proceeding to the next track. This is documented (https://methods.xaseco.org/methodstmf.php), although this means that entering a tiebreaker in the last round requires a match restart.

In addition, it is not trivial to set the points limit for the current map only; setting the points limit has an effect for all upcoming tracks.

A solution, although rigid, is to enforce the number of rounds with a /ko rounds command and somehow shadow calls to /round (plugins can't listen to predefined commands in TMGery). Then, one might choose to

  • alter the points limit underway, or
  • find a way to restart the track (if needed) once the given number of rounds has been reached

Though, for the latter, the points limit will be misleading and the restart has to be done before EndRound it seems.

So far the only recommendation is to avoid using tiebreakers when using multiple rounds.

Add support for Endurance mode

By Endurance, we mean the game mode where the gap to first place is diminishing for every checkpoint you pass. This is a native game mode in TM2 (which does not technically need to be implemented) but there is no equivalent in United.

Can be confused with CP knockout where players get knocked out for each checkpoint.

CLI will be updated with a new command /ko mode endurance.

Possibility to add a break during the knockout

This can be done by extending the chat time for a single track. Usage will probably be /break <duration> or /ko break <duration> which sets the chat time for the current map only. Use GetChatTime with CurrentValue set to duration.

This involves adding state; the chat time must be reset to its original value once the podium is entered.

May be implemented in xcommands plugin (separately from the knockout plugin), but this would lose the ability to set a custom knockout status for the break.

Submit results to TMNews using their (upcoming) API

TMNews is planning an API for automated submission of results to their page. Once the time has come, the API can be used to submit knockout results as soon as the knockout is complete.

Suggestion: modify /ko start [now] to /ko start [official] [now] to distinguish official knockouts from unofficial ones.

Can be connected to #17.

Show popup window when restarting the round

To support multiple rounds per track, ForceEndRound has to be used when restarting a round. However, ForceEndRound adds a delay before actually restarting (as opposed to RestartChallenge). Adding a popup message helps players know in advance that the round will be restarted (those who have the HUD enabled, that is).

There are two cases where this can be used:

  • When a false start is detected
  • When using /ko restart

May optionally hide the current chat message for those who have TMGery HUD enabled (using getPlayersWithHudOff).

Skipping warmup lets knocked out players drive during live rounds

When /ko skip warmup is called, onEndWarmup does not seem to be called and therefore, KO'd players are able to play when they're not supposed to. Need to call the appropriate callback in the CLI code.

Funnily enough, I think skipping the warmup with the good old /end works better lol

Nickname containing double quotation marks (") breaks the scoreboard UI

UI updates stop working once a nickname with quotation marks is included in the scoreboard, because nicknames are used in attributes enclosed by the " character. Quotation marks need to be escaped before being put in manialink attributes - e.g. substituted by two single quotation marks (').

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.