SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Kart Releases & Mods > Kart Miscellaneous

Reply
 
Thread Tools
First To mod v1.0 Details »»
First To mod v1.0
Version: 1.0, by Dr_Nope Dr_Nope is offline
Developer Last Online: Jan 2021

Category: Version: SRB2 Kart Rating: (1 votes - 3.00 average)
Released: 11-23-2020 Last Update: Never Favourites: 1
Scripts Re-Useable Content

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:


“ First to ” mod !
Typically, the use of this mod goes as follow:
  1. A user types « first to X » in text chat, with X being a number
  2. A 'first to X' round is toggled
  3. Other players that want to take on the challenge type « j » in text chat
  4. These players become contesters and the mod keep tracks of their wins
  5. At the end of each race there is a "result screen"
  6. 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:
Spoiler:
  • 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:
Spoiler:
  • 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?
Spoiler:
  • 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
Spoiler:
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.

“ Party Checker ” workaround script:
Spoiler:
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.





Thanks to Tyron and Ashnal on the KartKrew's discord for answering my dumb questions…


Scripts available on my github

Download Now

File Type: lua KL_firstTo_mod-v1.0.1.lua (32.3 KB, 74 views)
File Type: lua KL_PartyChecker_utils-1.1.lua (7.5 KB, 44 views)

Screenshots

Click image for larger version

Name:	result_screen.png
Views:	955
Size:	268.5 KB
ID:	42664   Click image for larger version

Name:	victory_screen.png
Views:	954
Size:	265.2 KB
ID:	42665  

Show Your Support

  • The author of this addon has given explicit permission for its content to be re-used and/or reproduced.

Comments
Old 12-01-2020   #2
D00D64
Probably Responsible
Moderator
 
D00D64's Avatar
Default

I'm not really confident that I was able to test this fully, but it's been waiting in submissions without so much as a response for a while, so I've decided to let it pass, as it seemed to work from what I could tell.
D00D64 is offline   Reply With Quote
Old 12-02-2020   #3
SoupBowler
Default

Oh wow, this is pretty cool! This will be great for mini-competitions between players and whatnot.
SoupBowler is offline   Reply With Quote
Old 12-02-2020   #4
Lightsideluc
 
Lightsideluc's Avatar
Default

Seems pretty nifty. Is it possible to get this working on a Mario Kart-like level with points resetting once someone hits the current goal total? Alternatively, at least a Gold/Silver/Bronze system so there's a little more nuance.
__________________
OKAY
Lightsideluc is offline   Reply With Quote
Old 12-02-2020   #5
ClassicNC
heads up jake its sonic boo
 
ClassicNC's Avatar
Default

I can't believe you're the first to mod SRB2 Kart this is an incredible moment in gameing history
__________________
jake got hit by the sonic boom
jake has passed
ClassicNC is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:47 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.