AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] GB.CritVote (v1.3.5, Updated 2011-09-08) (https://forums.alliedmods.net/showthread.php?t=163733)

FlyveHest 08-02-2011 15:33

[TF2] GB.CritVote (v1.3.5, Updated 2011-09-08)
 
2 Attachment(s)
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.

FlyveHest 08-02-2011 15:35

Re: [TF2] GB.CritVote (v1.0.0, 2011-08-02)
 
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?

Thrawn2 08-02-2011 16:18

Re: [TF2] GB.CritVote (v1.0.0, 2011-08-02)
 
Quote:

Originally Posted by FlyveHest (Post 1524365)
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 :wink:

FlyveHest 08-02-2011 16:30

Re: [TF2] GB.CritVote (v1.0.0, 2011-08-02)
 
Quote:

Originally Posted by Thrawn2 (Post 1524391)
i'd appreciate some notes on why this is better :wink:

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 08-03-2011 15:25

Re: [TF2] GB.CritVote (v1.1.0, Updated 2011-08-03)
 
Updated, now the entire plugin is translateable, I found a way to translate the panel for each player.

FlyveHest 08-08-2011 14:15

Re: [TF2] GB.CritVote (v1.1.1, Updated 2011-08-08)
 
Fixed a minor bug, and added a danish translation

snelvuur 08-09-2011 08:07

Re: [TF2] GB.CritVote (v1.1.1, Updated 2011-08-08)
 
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 :P

Other then that, good work.

FlyveHest 08-15-2011 09:58

Re: [TF2] GB.CritVote (v1.1.1, Updated 2011-08-08)
 
Quote:

Originally Posted by snelvuur (Post 1528869)
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 :P

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?

snelvuur 08-15-2011 10:40

Re: [TF2] GB.CritVote (v1.1.1, Updated 2011-08-08)
 
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)

FlyveHest 08-17-2011 03:31

Re: [TF2] GB.CritVote (v1.1.1, Updated 2011-08-08)
 
Sounds like a good idea, i'll take a look at implementing this via a variable.


All times are GMT -4. The time now is 18:59.

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