Resource icon

[Script] Virus: Don't get infected! (Gamemode for Battle)

Ryason55

Member
In Virus, 1 to 2 players start out infected, and it's up to everyone else to avoid being infected for as long as possible. The infection is spread through direct contact, and the round ends when all players have been infected, with the winner being whoever has lasted the longest. This is primarily based off of the Virus gamemode from the Timesplitters series, with a lot of changes based off of the version I made for Serious Sam 3 and Fusion. The gamemode requires a minimum of 4 players by default (can be changed via "vir_minplayers"), though I'd recommend at least 6 if possible.

As well, Team Virus (new as of V2.0) is a team-based version of Virus where players are divided into teams, one player on each team starts out infected, and the goal is to infect every non-infected player on the opposite team. Infecting a player on the enemy team will cause them to be infected for their side, meaning they'll go after the non-infected players on *your* team. Requires at least 6 players by default, though I would recommend 8 or more. By default, Team Virus has a 50% chance of happening instead of regular Virus when there's an even number of players on map load.

attachment.php


attachment.php

(V1.1 gameplay)

-If there's 6 or more players in the server, there will be 2 initial infected; Otherwise there will only be 1 initial infected.
-While it isn't possible to win when you're selected as one of the initial infected, the script does make sure to select each player only once per rotation. If you do leave/disconnect and rejoin the server, the script will try to remember your name if you were infected in one of the previous rounds. Though if the host forces the map to change at any point, the script will forget who has been initial infected since player data is cleared.
-Shortly after only 1 Runner remains, a 30 second countdown will start, and the round will end once that timer expires. The last player will still win regardless of whether or not they're caught before the time limit is up.
-If you're infected and you get hit or take damage, you cannot infect anyone until your invulnerability frames run out. However, if you use a speed shoe or pogo spring, the invulnerability frames will end immediately and you can infect again.
-If a Runner takes environmental damage or falls off the stage three times, they will become infected on their own. The counter for this can be seen in the lower-left.
-Runners have access to the Hyodoro and a time-limited Thunder Shield, both of which can be used to avoid infection.
-Infected players have access to Eggboxes, which will instantly infect Runners that come into contact with them. Infected players can also re-collect placed eggboxes to move them if necessary.
-Camping as a Runner isn't recommended.
vir_enabled on/off (default on)
Allows you to toggle whether or not the gamemode is enabled.

vir_minplayers 0-16 (default 4)
Allows you to set the minimum number of active players required for Virus to be played. If the requirement is not met when the map loads, regular Bumper Battle will be played.

vir_team_chance 0-100 (default 50)
The chance that Team Virus will be chosen in place of regular Virus.

vir_team_minplayers 4-16 (default 6)
The minimum number of players required for Team Virus. Note that if there aren't enough players for regular Virus (via vir_minplayers being set higher), Team Virus won't happen either.

vir_team_balance on/off (default on)
Determines whether or not Team Virus requires an even number of players. Doesn't account for late joiners.
Shoutouts to Battle Plus, which I basically looked off of at the start to figure out how a lot of things are handled since I had never done anything in the engine beforehand. That said, this won't actually work with Battle Plus, since that pretty much overrides Battle Mode entirely.
As well, the minimap recreation is heavily based off of ampersand's streamhud implementation.
And thanks to my friends and fellow kart players at 7Smoke for helping me test this through to release.

V2.0
-Added Team Virus, where the goal is to infect everyone on the opposite team. By default has a 50% chance to happen when there's an even number of players. This behavior can be adjusted with the new console variables: "vir_team_chance", "vir_team_minplayers", and "vir_team_balance".
-Added a new HUD element that lists all non-infected players, in place of the original left-hand ranking HUD element.
-Items you're holding out (Orbinauts, Bananas, etc) are now properly dropped when you take damage.
-Added support for Hitfeed V2, with colored names being made use of. Hitfeed V1.1 should also still be supported.
-Added a new hitfeed icon for an infected player ramming into a runner without actually infecting them. Used when hitting a player with a thunder shield, or running into an allied runner in Team Virus.
-Fixed a bug where the sound for recollecting an eggbox would play globally.

V1.1
-Fixed an error that would occur on dedicated servers when trying to display the recreated Wanted sign patches for the last remaining player.
-Fixed a bug where stealing the Thunder Shield wouldn't start the timer to automatically use it.

V1.0 Release
 

Attachments

  • VirusPreview01.gif
    VirusPreview01.gif
    4.5 MB · Views: 5,101
  • VirusPreview02.gif
    VirusPreview02.gif
    4.8 MB · Views: 5,142
  • KL_VirusGamemode_V2.0.pk3
    40.7 KB · Views: 477
Last edited:
Updated to version 1.1:
-Fixed an error that would occur on dedicated servers when trying to display the recreated Wanted sign patches for the last remaining player
-Fixed a bug where stealing the Thunder Shield wouldn't start the timer to automatically use it
 
Updated to V2.0:
-Added Team Virus, where the goal is to infect everyone on the opposite team. By default has a 50% chance to happen when there's an even number of players. This behavior can be adjusted with the new console variables: "vir_team_chance", "vir_team_minplayers", and "vir_team_balance".
-Added a new HUD element that lists all non-infected players, in place of the original left-hand ranking HUD element.
-Items you're holding out (Orbinauts, Bananas, etc) are now properly dropped when you take damage.
-Added support for Hitfeed V2, with colored names being made use of. Hitfeed V1.1 should also still be supported.
-Added a new hitfeed icon for an infected player ramming into a runner without actually infecting them. Used when hitting a player with a thunder shield, or running into an allied runner in Team Virus.

I haven't gotten a chance to test how well Team Virus plays, so please let me know how well it works and if anything needs adjusting.
 

Attachments

  • TeamVirusPreview.png
    TeamVirusPreview.png
    40.2 KB · Views: 231
This mode is a bit confusing to wrap my head around,
even after discussing it with others, so I'll post my questions here:

1) The last person infected wins the match, but there's a countdown timer that has to complete first.
This is despite the fact that by nature of them being alive the longest, they already won whether they survive the last countdown or not

2) This ties into the fact that if you are chosen to be the random starting infected, you already lost,
and there isn't anything for you to do to win the game any more, or lose it less.
It seems that there's no incentive to do anything as a green player, other than ending the match sooner rather then later.
(You could make the observation that matches could just last indefinitely)

3) If you are not infected, there appears to be no reason why you should engage infected players.
While you could use your items to stave back the infected, you better off just moving to sections of the map where there's none / less of them.
An aggressive non-infected player is awarded just as much as a non-aggressive one.

4) Virus teams confuses me more, because if I'm not infected, and on the blue team, and so are you, but you're red, we both can't really
do much other than just avoid each others infected teammates.

Maybe in the future there could be an update that may address my questions here, or perhaps I missed the big picture,
and there is already value to playing as you do despite these concerns.

Regardless, I want to thank you for your time, and wish you a good day.
Respectfully,

Super
 

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

Back
Top