Resource icon

[Script] Sonic & Sega All Stars Racing Commentator! (KL_Commentator_V3.pk3)

ZeverousNova

Grade A idiot
One of the things that always stood out to me about Sonic & Sega All Stars Racing was the commentator. Even when I bought the game when it came out, I always liked it.

So now, it's time to hear him again!

This scripts adds the commentator from Sonic & Sega All Stars Racing into SRB2 Kart, with a lot of his voice lines from the game.



- Splitscreen isn't supported, and I probably won't support it anytime soon.
- The race end voice lines can get cut off when you are playing alone or with 1 other player because the intermission screen cuts off all the sound effects.
- The commentator now has lines for 8+ players. Due to there only being voice lines for up to 8 players in the original game, player 9 shares the same lines as for player 1, player 10 shares the same lines as player 2 and so on.
- Fixed an issue where the commentator would say his mid race lines faster when there were more people in the server.
- Added lines for falling off the track. These are the last lines im adding for now.
- Added proper cooldowns for lines at the end of the race, so that other lines won't conflict anymore.
- Fixed an issue where player 3 would sometimes be called player 2 and fixed an issue where player 5 would sometimes be called player 4.
- Added commands: Commentator_enable, which enables and disables the commentator, and Commentator_idlelines, which enables and disables the lines for when nothing is happening in a race.
- Cleaned up the script a bit (thank you for the help, Tyron!).
- Made lines play less often.
Commentator_enable - enables and disables the commentator.
Commentator_idlelines - enables and disables the lines for when nothing is happening in a race.

Supporters / Co-Authors:
 

Attachments

  • KL_Commentator-V3.pk3
    2.5 MB · Views: 1,555
Last edited by a moderator:
Welcome to releases! Though, does he always address you as player 1? Feels like that'd be odd in a netgame, but I can't really test that, so...
 
Updated the script to V2, changes include:
- The commentator now has lines for 8+ players. Due to there only being voice lines for up to 8 players in the original game, player 9 shares the same lines as for player 1, player 10 shares the same lines as player 2 and so on.
- Fixed an issue where the commentator would say his mid race lines faster when there were more people in the server.
 
Updated the script to V2.1, changes include:
- Added lines for falling off the track. These are the last lines im adding for now.
- Added proper cooldowns for lines at the end of the race, so that other lines won't conflict anymore.
- Fixed an issue where player 3 would sometimes be called player 2 and fixed an issue where player 5 would sometimes be called player 4.
 
Just tested this out for myself and honestly love it, the game feels a lot more livelier with an announcer. Can't wait to test it out on a server with multiple people.

just wish the announcer from S&SASR contributed more lines for the sake of variety.
 
I've tested it myself. Seems as if this isn't meant for battle mode, since the commentator (or mod) still thinks it's a race (there's no battle mode check).

Also, I have a suggestion. For those that are in Sonic & Sega All-Stars Racing (include R sonic perhaps since that's also sonic... and maybe super sonic?), give them their voice clips related to them that the commentator can also say.

Other than that, it's a real blast to play with! Keep it up!
 
V3 Update

Never expected this to get an update now did you?
V3 changes:
- Added commands: Commentator_enable, which enables and disables the commentator, and Commentator_idlelines, which enables and disables the lines for when nothing is happening in a race.
- Cleaned up the script a bit (thank you for the help, Tyron!).
- Made lines play less often

I am planning on completely rewriting the script in the future, but I wanted to add the commands in for now.
 
So I've added this to NVJR All-Stars Racing, and the lines are great! However, one of my moderators seems to have encountered sync issues. Additionally, the commands appear to be client-side, not server-side. Was this intentional?
 
~snip~ However, one of my moderators seems to have encountered sync issues. Additionally, the commands appear to be client-side, not server-side. Was this intentional?
To add to this: As far as I can tell, the sync issues appear to have to do with said commands; setting them to off appears to make one desync at a random point during a race, causing an autokick.
 
The sync issues aren't because of the commands themselves, but rather how they're used. The thing is, the random functions in SRB2Kart modify the game's current random seed, which is normally synced between all players. But...when one player calls a random function, and another doesn't, as is the case here when somebody disables the commentator or his idle lines, the random seed gets desynced. This causes everything in the game that uses random functions to be desynced between players, which in turn causes them to get kicked.
You can fix this by calling the random functions for everybody, regardless of their current settings.


On a side note...the SPB lines are bugged and will spit out an error instead of being played. This is because the Lua is looking for a sound named "sfx_pxhit", when the actual sounds are named "sfx_pxspb". Pretty easy fix, just change "hit" to "spb".
 
The sync issues aren't because of the commands themselves, but rather how they're used. The thing is, the random functions in SRB2Kart modify the game's current random seed, which is normally synced between all players. But...when one player calls a random function, and another doesn't, as is the case here when somebody disables the commentator or his idle lines, the random seed gets desynced. This causes everything in the game that uses random functions to be desynced between players, which in turn causes them to get kicked.
You can fix this by calling the random functions for everybody, regardless of their current settings.


On a side note...the SPB lines are bugged and will spit out an error instead of being played. This is because the Lua is looking for a sound named "sfx_pxhit", when the actual sounds are named "sfx_pxspb". Pretty easy fix, just change "hit" to "spb".

Thank you for the insight! The main question is: How would we, as server hosts, fix this?
 
As I said in my post, you can fix it by calling the random functions for everybody, regardless of their current settings.
Doing so would require you to manually edit the Lua yourself.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top