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

[TF2] NativeVotes MapChooser (v1.5.4, 2014-03-05)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Plugin ID:
3520
Plugin Version:
1.6.0
Plugin Category:
General Purpose
Plugin Game:
Team Fortress 2
Plugin Dependencies:
Servers with this Plugin:
191 
Plugin Description:
SourceMod MapChooser updated to use the NativeVotes API
Old 02-09-2013 , 02:15   [TF2] NativeVotes MapChooser (v1.5.4, 2014-03-05)
Reply With Quote #1

Requirements:
Team Fortress 2 or CS:GO (CS:GO support broken since March 2013)
SourceMod 1.5.0 or newer
NativeVotes 0.60 or newer, 0.8.0 or newer recommended

Description:
This is, literally, a drop-in replacement for the SourceMod MapChooser, with the Menu-related code replaced with NativeVotes vote-related code. It even uses the standard MapChooser's mapchooser.cfg. Note: It does not remove mapchooser, you need to do that yourself.

If NativeVotes is not available, falls back to the SourceMod vote system.

The major difference from MapChooser is that NativeVotes MapChooser uses the F1-F5 keys for voting instead of 1-6 (or 4-8 for MapChooser Extended).
And the vote finished without me choosing anything, so it chose for me.

Changelog
  • 1.6.0
    • Version number has been increased to 1.6.0 to show that it is synced with SourceMod 1.6.x
    • Synced with MapChooser 1.6.x
      • MapChooser now checks if we've run out of votes before trying to add the first vote item. This prevents unhelpful errors when we run out of maps.
      • MapChooser now has a number of checks in place for votes that have no items in them and will refuse to start such a vote.
      • MapChooser will no longer randomly choose Extend or Don't Change if no one votes.
    • Separated out vote logic for normal and NativeVotes votes. This means that a vote now knows if it was a standard or NativeVotes vote and will no longer attempt (and fail) to switch vote styles mid-vote if NativeVotes is loaded/unloaded.
    • If NativeVotes is being used, increased the time between a vote ending and a runoff vote starting. This prevents an issue where runoff votes would sometimes fail to display to users. This new value is 3 seconds (old value was 2 seconds), which matches the amount of time NativeVotes uses internally for /revote .
  • 1.5.4
    • Ported the SourceMod 1.5.3 double-nomination bugfix to NativeVotes MapChooser.
    • Ported the removal of g_NominateCount from SourceMod 1.5.3, should fix nomination count being off.
    • Better detection of SourceMod's MapChooser, since this can't run at the same time as it.
    • No longer tries using NativeVotes votes on games that don't support multiple choice votes (although why are you using this MapChooser on a non-supported game?)
  • 1.5.3 (minor fix)
    • Fix version cvar not being marked as notify and don't record.
  • 1.5.3
    • Fixed a bug with displaying menu items, specifically translating Extend and Don't Change.
  • 1.5.2
    • Updated to support NativeVotes 0.8.0 or newer.
  • 1.5.1
    • The plugin now sends a "not enough votes" failure message between the first vote and a runoff vote. This fixes the issue where runoff votes wouldn't work until you did a !revote
    • There is a two second delay between the first vote and the runoff vote to give time for the previously mentioned failure message to appear. This is because the fail screen has a 1 second delay on it and it would otherwise block the runoff vote from appearing.
    • NativeVotes max allowed vote options should now be taken into account (via the NativeVotes_GetMaxItems call, rather than hard-coding 5).
    • The number of maps in the vote will have 1 subtracted if NativeVotes is in use and extend is used (due to the 5-map hard limit).
    • Synchronized with SourceMod Mapchooser changes, specifically the increase of all map-name fields from 32/33/64/65 to PLATFORM_MAX_PATH.
  • 1.5.0: Initial Public Release, based on MapChooser 1.5.0

Known Bugs:
See: NativeVotes Known Bugs.

NativeVotes has five vote-related cvars for displaying ongoing votes:
  • nativevotes_vote_delay
  • nativevotes_progress_hintbox
  • nativevotes_progress_chat
  • nativevotes_progress_console
  • nativevotes_progress_client_console

Get Plugin does not work because this requires nativevotes.inc to compile.
Attached Files
File Type: sp Get Plugin or Get Source (nativevotes_mapchooser.sp - 1051 views - 43.4 KB)
File Type: smx nativevotes_mapchooser.smx (20.9 KB, 1716 views)
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 10-23-2014 at 13:30. Reason: Updated to version 1.5.3
Powerlord is offline
Custo
Member
Join Date: Mar 2013
Location: Liberty City, LC State
Old 05-29-2013 , 22:56   Re: [TF2] NativeVotes MapChooser (v1.5, 2013-02-08)
Reply With Quote #2

Just started using this version, and the extended map option doesn't seem to show up after changing the sm_mapvote_extend command to 2.

After a little playing with, changing sm_mapvote_include from 5 to 4, it shows the extend option.

Should it be doing that?

EDIT: Also found out the runoff votes are buggy. Each time a runoff vote starts, no one can pick anything unless they do !revote first.

Last edited by Custo; 05-31-2013 at 02:40. Reason: Found something new
Custo is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-31-2013 , 11:06   Re: [TF2] NativeVotes MapChooser (v1.5, 2013-02-08)
Reply With Quote #3

Quote:
Originally Posted by Custo View Post
Just started using this version, and the extended map option doesn't seem to show up after changing the sm_mapvote_extend command to 2.

After a little playing with, changing sm_mapvote_include from 5 to 4, it shows the extend option.

Should it be doing that?
I probably forgot to adjust the map count (which is what I do on MapChooser Extended) when there are extends left.

Quote:
Originally Posted by Custo View Post
EDIT: Also found out the runoff votes are buggy. Each time a runoff vote starts, no one can pick anything unless they do !revote first.
That's... strange. Do you see a vote pass or fail message between the two votes? The fail message has to happen or users can't cast a new vote.

Edit: I checked the code and it doesn't. That's an oversight on my part. Will fix soon.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 05-31-2013 at 11:11.
Powerlord is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 05-31-2013 , 13:26   Re: [TF2] NativeVotes MapChooser (v1.5, 2013-02-08)
Reply With Quote #4

OK, so I posted version 1.5.1 just before I left for lunch earlier.

Here's what changed:

  • The plugin now sends a "not enough votes" failure message between the first vote and a runoff vote. This fixes the issue where runoff votes wouldn't work until you did a !revote
  • There is a two second delay between the first vote and the runoff vote to give time for the previously mentioned failure message to appear. This is because the fail screen has a 1 second delay on it and it would otherwise block the runoff vote from appearing.
  • NativeVotes max allowed vote options should now be taken into account (via the NativeVotes_GetMaxItems call, rather than hard-coding 5).
  • The number of maps in the vote will have 1 subtracted if NativeVotes is in use and extend is used (due to the 5-map hard limit).
  • Synchronized with SourceMod Mapchooser changes, specifically the increase of all map-name fields from 32/33/64/65 to PLATFORM_MAX_PATH.
Note: I'm at work and can't actually test this right now.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 05-31-2013 at 13:43.
Powerlord is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-27-2013 , 15:39   Re: [TF2] NativeVotes MapChooser (v1.5.1, 2013-05-31)
Reply With Quote #5

Here's version 1.5.2 that requires NativeVotes 0.8.0 and takes advantage of some of the new features.
Attached Files
File Type: sp Get Plugin or Get Source (nativevotes_mapchooser.sp - 535 views - 40.4 KB)
File Type: smx nativevotes_mapchooser.smx (19.9 KB, 347 views)
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-28-2013 , 12:33   Re: [TF2] NativeVotes MapChooser (v1.5.1, 2013-05-31)
Reply With Quote #6

There's a bug in yesterday's version that shouldn't affect anything (as I already implemented the missing actions), but I'll fix and re-post the code when I have an editor and compiler handy.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-28-2013 , 18:53   Re: [TF2] NativeVotes MapChooser (v1.5.1, 2013-05-31)
Reply With Quote #7

OK, here's a new build of 1.5.2 which should fix any potential issues with MenuAction_Display.
Attached Files
File Type: sp Get Plugin or Get Source (nativevotes_mapchooser.sp - 507 views - 40.4 KB)
File Type: smx nativevotes_mapchooser.smx (19.9 KB, 375 views)
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
reji
Junior Member
Join Date: Aug 2013
Location: Russia
Old 08-31-2013 , 17:40   Re: [TF2] NativeVotes MapChooser (v1.5.1, 2013-05-31)
Reply With Quote #8

Quote:
Originally Posted by Powerlord View Post
OK, here's a new build of 1.5.2 which should fix any potential issues with MenuAction_Display.
Looks like it requires latest NativeVotes from git:
Quote:
nativevotes_mapchooser.sp(1096) : error 017: undefined symbol "NativeVotes_RedrawVoteItem"
Later: Oh... ok, sorry for my inattention.

Last edited by reji; 08-31-2013 at 18:34.
reji is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-31-2013 , 17:41   Re: [TF2] NativeVotes MapChooser (v1.5.1, 2013-05-31)
Reply With Quote #9

Quote:
Originally Posted by reji View Post
Looks like it requires latest NativeVotes from git:
Yes, just like the build before it did... I thought it was implied that the new one would too.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-31-2013 at 18:00.
Powerlord is offline
reji
Junior Member
Join Date: Aug 2013
Location: Russia
Old 09-19-2013 , 07:17   Re: [TF2] NativeVotes MapChooser (v1.5.1, 2013-05-31)
Reply With Quote #10

Trying current versions of NV and NV Mapchooser from git. There is no problem in-game (voting for a map works), but I see this on a server console:
Spoiler

Same with NV 0.8.0 and NV Mapchooser 1.5.1. No errors with 0.7.9/1.5.1.
SourceMod version is 1.5.1.
Installed SourceMod plugins:
Spoiler

P.S. Sorry for poor English.
reji 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 22:17.


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