Dr_Nope
Member
So, at the end of our Kart session, me and my kart mates like to end our session with a « Bo5 ». Of course I tried to explain that « Best Of 5 » doesn't make sense in a game that isn't 1v1, but that it's actually a « First to 3 », but apparently they like to persist in being wrong…
It's also, apparently, hard to keep track of wins up to three so I made the following mod:
Scripts available on my github
It's also, apparently, hard to keep track of wins up to three so I made the following mod:
“ First to ” mod !
Typically, the use of this mod goes as follow:
Important note: This in a race mod only. Nothing should happen if battle mode is on. I never play Kart's battle mode and have no clue how it works, so…
Provided console variable:
Provided console commands:
Compatibility?
The issue with splitscreen
Thanks to Tyron and Ashnal on the KartKrew's discord for answering my dumb questions…
- A user types « first to X » in text chat, with X being a number
- A 'first to X' round is toggled
- Other players that want to take on the challenge type « j » in text chat
- These players become contesters and the mod keep tracks of their wins
- At the end of each race there is a "result screen"
- When a player reach the amount of required wins, a "victory screen" is displayed ( yay! \o/ )
Important note: This in a race mod only. Nothing should happen if battle mode is on. I never play Kart's battle mode and have no clue how it works, so…
Provided console variable:
- ft_enabled - default: On - If set to Off, FirstTo mod will not be active nor usable
- ft_absolute_win - default: Yes - By default only absolute wins count as an additional victory (i.e. finishing 1st, in front on the whole other racers), but if set to No, the winner of the round will be the player to finish first among the other contesters (i.e. players who joined the First to X round) only. Meaning the players doesn't have be in first place at the end of the race, but just needs to be the first among the contesters only to cross the line
- ft_allow_ties - default: No - If set to Yes, eventual ties on first place at the end of the race will count has a victory for both contesters. This then opens the slim possibility of have multiple winners for the First to X round.
- ft_admin_calls_only - default: No - If set to Yes, only a playor with administrator privileges will be able to start a First to X round.
- ft_player_join - default: No - If set to Yes, players wont be able to join an ongoin "First to X" round by using the command ft_join no by typing j in text chat.
- ft_show_results_exclusive - default: No - If set to Yes, non-contesting players (i.e. players who didn't join the ongoing "First to X" round yet) won't be shown the advancement screen (results & victory screens) at the end of the race.
Provided console commands:
- ft_first_to - Takes an integer X as argument, and launches a new "First to X" round. X has to remain within a certain range though (see command ft_round_minmax) If a round was already ongoing the attempt will be aborted, unless the caller has admin privileges and will there for change the required victory number for said round (ft_first_to 0 is equivalent to aborting ongoing round). - Calling this command from console is equivalent to typing first to X in text chat.
- ft_cancel - Admin only - Shortcut, equivalent to ft_first_to 0
- ft_join - Call this command to join an ongoing "First to X" round, does nothing if none. - If the player calling this command as administrator privileges, he can pass another player's name has argument (e.g. ft_join "Player 1") to make this player join the round. - Optimal use of this command is with a key bind within your kartexec.cfg to skip the text chat or console and join with a simple key press: bind j "ft_join"
- ft_player_wins - Admin only - Takes 2 arguments: a player's name and a number, and sets the matching player with the given number of victories for the ongoing "First to X" round (e.g. ft_player_wins "Player 1" 2). If the players wasn't a contester, he will join the round with given number of victories. If caller passes nil or none instead of a number, the targeted player will no longer be part of the ongoing round.
- ft_round_minmax - Admin only - Takes 2 numbers as arguments. Sets the range of needed wins in which any player can call a "First to X round. For example, if ft_round_minmax 1 7 is called by admin, the players will only be allowed to use command first_to N ( or first to N in text chat ) with 1 ≤ N ≤ 7.
Compatibility?
- “ First to ” mod should be compatible with Combiring and Elimination.
- Since I don't play or know other mods enough, compatibility is not to be expected
- Not compatible with battle mode
The issue with splitscreen
So, as describer earlier, the script works by having players individually join the ongoing “ First to X ” round (through the 'ft_join' console command). This brings up a particular problem with splitsceen:
Splitscreen players (other that p1) don't have access to console commands nor text chat. Therefore they have no way of joining by themselves. The problem is that the information that some players are in the same splitscreen party is only accessible locally, and there is, to my knowledge no native way for a lua script to inform the server (and other clients) that a player is in such party with other players. That is why, splitscreen players won't be able to join a “ FT ” round and so this mod isn't compatible with splitscreen…
… by default.
Splitscreen players (other that p1) don't have access to console commands nor text chat. Therefore they have no way of joining by themselves. The problem is that the information that some players are in the same splitscreen party is only accessible locally, and there is, to my knowledge no native way for a lua script to inform the server (and other clients) that a player is in such party with other players. That is why, splitscreen players won't be able to join a “ FT ” round and so this mod isn't compatible with splitscreen…
… by default.
“ Party Checker ” workaround script:
To try and make this work for splitscreen clients, I have written an experimental workaround utility script: KL_PartyChecker_utils-X.x.lua
This script uses a not-so-clean trick to inform the server of which players are in party with whom.
Therefore, if you want “First to” mod to be working for splitscreen client as well, you'll need to run the “Party Checker” script along with it.
This script uses a not-so-clean trick to inform the server of which players are in party with whom.
Therefore, if you want “First to” mod to be working for splitscreen client as well, you'll need to run the “Party Checker” script along with it.
Scripts available on my github