SRB2 Message Board  

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

Reply
 
Thread Tools
Player Rotation (Rotate.pk3) Details »»
Player Rotation (Rotate.pk3)
Version: 1, by jameds (James) jameds is offline
Developer Last Online: Feb 2020

Category: Version: SRB2 Kart Rating: (1 votes - 3.20 average)
Released: 08-21-2019 Last Update: Never Installs: 2
Scripts Re-Useable Content


It's all about those big netgames huh?


Rotate.pk3 lets you have the big lobby,
but without everyone fighting for first.

Commands and Variables:
Spoiler:
  • rotate Yes/No -- Toggle rotation, which is useful
    if you want to keep the other settings.
  • rotate_minutes <minutes> -- Rotate after a number of minutes.
    a number of minutes.
  • rotate_races <count> -- Rotate after a number of races or map
    exits (read on).
  • rotate_count_races Finish/Exit -- Count races by normal finish
    or forced exit.
  • rotate_max_place 1-16 -- The highest placement at which a
    player may be rotated at any time. If someone places higher than this, they may
    bypass rotation, and so no rotation at all occurs.
  • rotate_max_exception <exceptions> -- The most times a single player may
    bypass rotation from a condition cleared.
  • rotate_exempt <player number> -- Exclude a player from any
    rotation. Another player will be chosen instead.
  • rotate_exemptions -- List the names of anyone excluded from rotation.


A player is rotated when the ingamecap is reached and someone is waiting to
enter the game. Rotate.pk3 also prints a message for waiting players, telling
them which position in queue they are at. The longest playing player is rotated
out of the game at the end of the current or next race (not intermission/vote),
and the first player in queue enters the game.

For Programmers:
Spoiler:

Because ingamecap isn't exposed to Lua, all players are checked until one has
PF_WANTSTOJOIN. This occurs on the second tic of intermission, so that players
who join mid-race can enter if the ingamecap has not been reached.

Take a look at LUA_LAST for a "last tic" variable tracking system.

Rotate (mind the capitalization) is a table given to player_t that holds
rotation variables. You can find all that you need in LUA_ROT. LUA_Q is where
spectator queue is handled.


Special thanks to wolfs for complaining about large netgames so much.

Please report bugs, I don't like having them!

Download Now

File Type: pk3 kl_rotate_v1.pk3 (3.9 KB, 121 views)

Screenshots

Click image for larger version

Name:	rotate-out.png
Views:	451
Size:	39.0 KB
ID:	21319   Click image for larger version

Name:	rotate-q.png
Views:	457
Size:	67.1 KB
ID:	21321  

Show Your Support

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

Comments
Old 08-27-2019   #2
D00D64
Worst Ranked 'Kart Player
Moderator
 
D00D64's Avatar
Default

I tested it as much as I could and it seems to work, but I'm still uncertain as to what I could try. Still, I feel confident in letting this in. Welcome to releases!
__________________
The least skilled player on the Kart Krew dev team, but I try my best. Maybe someday...

My awful Twitter account

My also awful YouTube channel
D00D64 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 03:11 PM.


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