Raised This Month: $12 Target: $400
 3% 

[TF2] GB.CritVote (v1.3.5, Updated 2011-09-08)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
FlyveHest
Member
Join Date: Nov 2010
Location: Denmark
Plugin ID:
2474
Plugin Version:
1.3.5
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    Enables a vote to en/disable random crits every round. Also makes it possible for user to store their vote preference.
    Old 08-02-2011 , 15:33   [TF2] GB.CritVote (v1.3.5, Updated 2011-09-08)
    Reply With Quote #1

    GB.CritVote

    Do you want to crit today?


    Description
    This plugin displays a vote at the beginning of each map, allowing the players on the server to decide if they want to enable, disable or have no preference in regards to random crits (normally set by the convar tf_weapon_criticals) for the upcoming round.

    It also makes it possible for a given player to store a vote preference, so they will vote their preference automatically on each round start.

    REMEMBER! Disabling random crits sets the nocrit servertag, which deduces points in quickplay for your server.

    Inspiration
    This plugin is inspired by TF2 Permanent Critvote by Sillium, which in turn was inspired by TF2 Critvote by r5053.

    I started by modifying Silliums script, but, as I got more comfortable, I rewrote the script entirely, and have just copied a couple of his good ideas, like vote-delays.

    Installation
    Simply unpack the ZIP file into your TF2 folder, everything should end up where it belongs.

    Edit \cfg\sourcemods\gb_critvote.cfg to your liking, and load the plugin, or restart your server, whichever you prefer.

    Dependencies
    Sourcemod 1.3.8+
    Clientprefs, if you want to use permanent votes.

    The plugin makes use of colors.inc by excel, which is included in the ZIP file.

    Incompatabilities
    Its not directly incompatible, but it should go without saying that you should not run any plugins that modify tf_weapon_criticals alongside this, especially on of the two plugs mentioned in the Inspiration section

    Settings
    Quote:
    • gb_critvote_initial_vote_delay
      default: 30
      The delay, in seconds, from first client connects to an empty server, until the vote starts.
      -
    • gb_critvote_vote_length
      default: 20
      Length, in seconds, of the vote.
      -
    • gb_critvote_allow_permanent_votes
      default: 1
      Allows or disallows the users being able to permanently set a vote (Need clientprefs enabled on server).
      -
    • gb_critvote_vote_choice_order
      default: 0
      The order of the votechoices (0 lists Crits On first, 1 list Crits Off first)
      -
    • gb_critvote_player_join_info_delay
      default: 20
      Delay, in seconds, before we inform a new player of the current crit status.
      -
    • gb_critvote_vote_on_no_vote
      default: 2
      If a player doesn't vote, what should his vote count as?
      Set to either the desired value of the tf_criticals convar (0 or 1), or to 2 to not let the vote count.
      -
    • gb_critvote_value_on_tie
      default: 1
      What tf_weapon_criticals will be set to in case of a tie. (0 or 1)
      -
    • gb_critvote_reset_vote_when_empty
      default: 1
      If you want the vote to reset when the server empties, set to 1, else to 0. (Meaning, the next connecting player will start a new vote on the given map)
      -
    • gb_critvote_set_crits_when_empty
      default: 2
      Should the value of tf_weapon_criticals be changed when the server empties. Set to value it should be changed to (0 or 1), or set to 2 to leave as is.
      -
    • gb_critvote_value_on_mapchange
      default: 2
      If set to 0 or 1, the tf_criticals convar is reset to this value on mapchange, if set to 2, will retain the value from the previous round.
    Ingame commands
    !crit Shows the current random crit setting, and if the player has a vote preference, shows it to him.
    !deletecrit Deletes the players vote preference, if set.

    Translation
    • English
    • Danish

    Plugin is ready for translation, if you want to submit a translation file, PM me.

    ToDo
    -

    Changelog
    • 1.1.0, 2011-08-03
      - Made the vote menu translateable also, so now the entire plugin is translateable.
    • 1.1.1, 2011-08-08
      - Replay and SourceTV bots does not start the vote anymore.
      - Added Danish translation.
    • 1.2.0, 2011-08-21
      - Added convar gb_critvote_vote_choice_order so you can list Crits Off as the first choice in the votemenu (suggested by snelvuur)
    • 1.3.0, 2011-09-01
      - Added convar gb_critvote_set_crits_when_empty to control the value of tf_weapon_criticals when the server empties.
    • 1.3.5, 2011-09-08
      - Added convar gb_critvote_allow_permanent_votes
      - Changed chat commands to real SM commands.
      - Removed clientprefs dependency. (If clientprefs isn't available, permanent votes are disabled)
      - Added check for Team Fortress 2 on startup.
      - Cleaned the code up a little bit, for approval purposes.
    Attached Files
    File Type: zip gb_critvote.zip (21.3 KB, 652 views)
    File Type: sp Get Plugin or Get Source (gb_critvote.sp - 423 views - 21.1 KB)

    Last edited by FlyveHest; 09-08-2011 at 11:38. Reason: Updated to 1.3.5
    FlyveHest is offline
    FlyveHest
    Member
    Join Date: Nov 2010
    Location: Denmark
    Old 08-02-2011 , 15:35   Re: [TF2] GB.CritVote (v1.0.0, 2011-08-02)
    Reply With Quote #2

    In regards to the only point in the ToDo list, does anyone know if its possible to translate a panel, broadcast to all players, or should I change it to using a menu instead?
    FlyveHest is offline
    Thrawn2
    Veteran Member
    Join Date: Apr 2009
    Old 08-02-2011 , 16:18   Re: [TF2] GB.CritVote (v1.0.0, 2011-08-02)
    Reply With Quote #3

    Quote:
    Originally Posted by FlyveHest View Post
    This plugin is inspired by TF2 Permanent Critvote by Sillium, which in turn was inspired by TF2 Critvote by r5053.
    i'd appreciate some notes on why this is better
    __________________
    einmal mit profis arbeiten. einmal.
    Thrawn2 is offline
    FlyveHest
    Member
    Join Date: Nov 2010
    Location: Denmark
    Old 08-02-2011 , 16:30   Re: [TF2] GB.CritVote (v1.0.0, 2011-08-02)
    Reply With Quote #4

    Quote:
    Originally Posted by Thrawn2 View Post
    i'd appreciate some notes on why this is better
    The main thing is that it enables players to vote "no preference", if they don't care about playing with or without random crits.

    Its a vote at the start of a round, instead of letting people set something mid-game, which has no effect until next round.

    The settings are more advanced, its easier to customize it just to your need.

    Its translateable (if we ignore the panel-thing atm, but this will be fixed in the coming days, when I find out if its possible to do or not)

    Generally, the code is nicer, i've taken great pains to use suggested functions like AddCommandListener instead of RegConsoleCmd, and also not passing around clientids where they might be causing trouble. (I've had a couple of those during testing on my own servers)

    This is ofcourse all IMHO, and the plugin is made primarily for my servers, as the existing ones missed parts that I felt were needed.
    FlyveHest is offline
    FlyveHest
    Member
    Join Date: Nov 2010
    Location: Denmark
    Old 08-03-2011 , 15:25   Re: [TF2] GB.CritVote (v1.1.0, Updated 2011-08-03)
    Reply With Quote #5

    Updated, now the entire plugin is translateable, I found a way to translate the panel for each player.
    __________________
    FlyveHest
    -
    GB.CritVote - Let people vote to en/disable random crits each round

    Visit Gladblad Gamers
    FlyveHest is offline
    FlyveHest
    Member
    Join Date: Nov 2010
    Location: Denmark
    Old 08-08-2011 , 14:15   Re: [TF2] GB.CritVote (v1.1.1, Updated 2011-08-08)
    Reply With Quote #6

    Fixed a minor bug, and added a danish translation
    __________________
    FlyveHest
    -
    GB.CritVote - Let people vote to en/disable random crits each round

    Visit Gladblad Gamers
    FlyveHest is offline
    snelvuur
    Veteran Member
    Join Date: Jun 2008
    Location: Netherlands
    Old 08-09-2011 , 08:07   Re: [TF2] GB.CritVote (v1.1.1, Updated 2011-08-08)
    Reply With Quote #7

    Put in a option to set the crits on/off swapped in the menu. Some people always vote 1 for instance, so if thats crits on .. it will always be on. I changed the other critvote to do the other way around since my regulars prefer no crits and since f2p players usually just hit 1... well you know what i mean

    Other then that, good work.
    __________________
    Arguing with a fool only proves there are two
    snelvuur is offline
    FlyveHest
    Member
    Join Date: Nov 2010
    Location: Denmark
    Old 08-15-2011 , 09:58   Re: [TF2] GB.CritVote (v1.1.1, Updated 2011-08-08)
    Reply With Quote #8

    Quote:
    Originally Posted by snelvuur View Post
    Put in a option to set the crits on/off swapped in the menu. Some people always vote 1 for instance, so if thats crits on .. it will always be on. I changed the other critvote to do the other way around since my regulars prefer no crits and since f2p players usually just hit 1... well you know what i mean
    Sorry for the delayed reply, been to a large musicfestival in Skanderborg.

    Just to be sure, what you're asking for is to change the order of the votechoices?
    __________________
    FlyveHest
    -
    GB.CritVote - Let people vote to en/disable random crits each round

    Visit Gladblad Gamers
    FlyveHest is offline
    snelvuur
    Veteran Member
    Join Date: Jun 2008
    Location: Netherlands
    Old 08-15-2011 , 10:40   Re: [TF2] GB.CritVote (v1.1.1, Updated 2011-08-08)
    Reply With Quote #9

    Yes, so instead of say:

    1. Crits on
    2. Crits off

    Make a cvar that you can change that around (since usually people hit 1 anyway)
    Or at least skip the first couple of digits, since those are used for weapon selections.

    (these are just suggestions though, thinking out loud here)
    __________________
    Arguing with a fool only proves there are two
    snelvuur is offline
    FlyveHest
    Member
    Join Date: Nov 2010
    Location: Denmark
    Old 08-17-2011 , 03:31   Re: [TF2] GB.CritVote (v1.1.1, Updated 2011-08-08)
    Reply With Quote #10

    Sounds like a good idea, i'll take a look at implementing this via a variable.
    __________________
    FlyveHest
    -
    GB.CritVote - Let people vote to en/disable random crits each round

    Visit Gladblad Gamers
    FlyveHest is offline
    Reply


    Thread Tools
    Display Modes

    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 On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 07:14.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode