maniaexchange / geryknockout Goto Github PK
View Code? Open in Web Editor NEWKnockout plugin for the TMGery server controller
License: MIT License
Knockout plugin for the TMGery server controller
License: MIT License
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.
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.
Could be because only two players remain, and something eager is activated (when it shouldn't)...
Make sure the scores is padded with the correct player count.
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.
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>] ...
Between top 3 and bottom 7 if there are more than 10 players.
Related to #38.
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).
This seemed to happen during the second round of a rounds KO with warmup. A player joined during the warmup, but was not forced to spec when the round started.
Only when $this->lives
is greater than 1. Can heart symbols be used? E.g. ❤️, ❤️❤️, ❤️❤️❤️, 4❤️, 5❤️, ...
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
.
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.
Applies both when using /ko multi
and when casually proceeding to the next round
With no unexpected KOs for the top 20, setting the dynamic KO multiplier ended up one round too short:
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
onPlayerCheckpoint
callback (as well as onPlayerFinish
)onPlayerCheckpoint
provides the lap number which we can check against; but requires storing the lap count for each player.NbCheckpoints
field that can be retrieved from GetCurrentChallengeInfo
method + BeginChallenge
/BeginRace
callbacks.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.Visuals
CLI/KO multiplier
/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.)To make the knockout plugin more generic.
This is not completely reproducable because sometimes the yellow and orange colors are displayed. Suspecting a type mismatch (int/float) that is being set after the first round
I guess this can be implemented in the UI class, when selecting top 3 / bottom 7 that DNF's are put at the back of the resulting array (but their order is kept)
Should also check for /ko add
and /ko spec
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.
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?
The number of players should have increased, possibly the number of KOs as well. Seems like nothing happened until the end of the round.
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.
The command was issued during the podium after the first round. Maybe that can be why?
The command /ko remove voyager006
was used during the podium, and the scoreboard popped up and showed as DNF. However, it showed as DNF for the following round as well. Does the command not set the status to KnockedOut?
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.
Currently, only "Warmup" and "Round x" is shown.
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.
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
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.
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
.
Like TMGL shows the distance to 9th place for top 8 and distance to 8th place for bottom 8. Place it directly above the player's race time, but a little smaller. Should probably be toggled like the status bar is currently.
This would modify plugin.adminpanel.php
and check for whether the knockout is running. Might need a global variable or global function for this to be possible. Or, maybe it's possible to somehow shadow the existing panel, if this plugin is loaded?
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.
The function initiates on the map it should have skipped; the skip itself works fine.
All previous results should be retrieved from the file system, shown as a list in the UI. When clicking on one, its contents is displayed.
Related to #17.
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.
Title. KO multipliers may be enforced.
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:
/ko restart
May optionally hide the current chat message for those who have TMGery HUD enabled (using getPlayersWithHudOff).
The scoreboard is blocking the view in the end being in the last positions and turning to the right.
I hope you are able to find a good alternitive for that.
Think of showing only the difference between you and the not safe positions.
Then only show the scoreboard after finishing!
E.g. if a player crosses a checkpoint with -1.00 compared to their best time, show -1.00 beside their best time in the scoreboard.
Requires keeping track of current (as well as best) time/score, plus figuring out extra space in the scoreboard. First need to see if this should be a feature.
Could be fun to have while there is no official knockout going in. Would probably be a command like /ko auto (on | off)
.
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
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 ('
).
/ko lives * -1
results in players having an extra life.
Removes the need to locate the player in the default scoretable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.