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

MapChooser Extended 1.10.2 (Updated 2014-02-05)


Post New Thread Reply   
 
Thread Tools Display Modes
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-04-2011 , 10:43   Re: MapChooser Extended 1.6.3 (Updated 2011-06-22)
Reply With Quote #121

Quote:
Originally Posted by aquaphun View Post
Hi Powerlord.

I looked up your code and tried to modify it to my needs but I got stuck.

I wanted to build a max nomination counter, so there will only be a limited number of nominations and the rest of the voting list will be filled up with random maps. (not so popular maps get a chance too)
Done that but not tested it out.
nominationsToAdd on line 734 controls the number of nominations to add to the vote list.

Be aware that it adds the first X nominations (X being the value of nominationsToAdd) and not X random maps.

Quote:
Originally Posted by aquaphun View Post
Then i wanted to mix the nominations and random selected maps. People press 1 very often and so the first nomination will automaticly win. I want to inhibit it by mixing it up and putting in a random factor.
This should be easy but i am not experienced in CSS scripting so I have not done it yet.
Imo all you have to do is creating two arrays. Maps from the nomination and the maplist will be written in the first array. The second array contains a list of random numbers (array one size == array two size). Then sort the second array and get the first sorted as well. This should do the trick.
The other way to do this would be to replace all the lines that add the maps to the menu and have them add to an adt_array instead, then use a Fisher-Yates shuffle (using SourceMod's SwapArrayItems to move the selected items) to change the order of the maps, then use a for loop on the (now-shuffled) array to add them to the menu.

Quote:
Originally Posted by aquaphun View Post
The third and last modification I wanted is to have an "Any map will do" on the first voting spot.
This is the trickiest part but it should work by ignoring the "Any map will do" count at the end of the vote. Unfortunatly I can not modify it because I can not find the counter algorythm.
The counter algorithm is part of SourceMod itself.

Your best bet would be to ignore Any map will do if it's the top voted option right below the first if in Handler_MapVoteFinished (so, on line 853 or so). The problem is that the vote option numbers are hard-coded on lines 860, 862, and 905. The 0 on line 869 would also have to be changed to a 1 if Any vote will do is selected as the top option.

Additionally, checks to see if the current vote option is "Any map will do" would need to be done before line 874, on line 901, and before line 925.

Unfortunately, I'm spending most of my time working on the BuiltinVotes extension, so I'm not really adding new features to Mapchooser Extended at this time. That doesn't mean you can't just modify it yourself, though.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-04-2011 at 10:45.
Powerlord is offline
Pr0fix
New Member
Join Date: Aug 2011
Old 08-08-2011 , 18:39   Re: MapChooser Extended 1.6.3 (Updated 2011-06-22)
Reply With Quote #122

Hello Powerlord.

The plugin itself works great. Unfortunatly, i am encountering an odd problem. After the initial vote from tha mapchooser a second vote pops up. It does not change the right vote, but i feel like it is confusing. Can you please help me?

I made some screenshots:
Right vote: http://steamcommunity.com/id/Pr0fix/...397413866722/?
Wrong vote: http://steamcommunity.com/id/Pr0fix/...397413868418/?

I hope you understand what i mean and you can help me finding a solution.

Greetings Pr0fix
Pr0fix is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-08-2011 , 19:11   Re: MapChooser Extended 1.6.3 (Updated 2011-06-22)
Reply With Quote #123

Quote:
Originally Posted by Pr0fix View Post
Hello Powerlord.

The plugin itself works great. Unfortunatly, i am encountering an odd problem. After the initial vote from tha mapchooser a second vote pops up. It does not change the right vote, but i feel like it is confusing. Can you please help me?

I made some screenshots:
Right vote: http://steamcommunity.com/id/Pr0fix/...397413866722/?
Wrong vote: http://steamcommunity.com/id/Pr0fix/...397413868418/?

I hope you understand what i mean and you can help me finding a solution.

Greetings Pr0fix
The second vote is part of the TF2 built-in vote system.

You can disable that vote by putting this in your server.cfg:

Code:
sv_vote_issue_nextlevel_allowed 0
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Pr0fix
New Member
Join Date: Aug 2011
Old 08-09-2011 , 03:20   Re: MapChooser Extended 1.6.3 (Updated 2011-06-22)
Reply With Quote #124

Quote:
Originally Posted by Powerlord View Post
The second vote is part of the TF2 built-in vote system.

You can disable that vote by putting this in your server.cfg:

Code:
sv_vote_issue_nextlevel_allowed 0
Argh. I knew it was that simple.
Thank you very much for your quick help.

Greetings, Pr0fix
Pr0fix is offline
snake4life
Member
Join Date: Jul 2011
Old 08-11-2011 , 03:34   Re: MapChooser Extended 1.6.3 (Updated 2011-06-22)
Reply With Quote #125

hi,

I got a problem with the hint box, I like to let the peeps vote while bonus round the hintbox is a 100% must have feature, but I got a cosmetic problem:



any way to get the hint box higher or that the vote starts after the bonus round time, I was playing around 2hour with the cvars, but no success

my server settings:
maxrounds 2
timelimit 0
winlimit 0
snake4life is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-11-2011 , 09:32   Re: MapChooser Extended 1.6.3 (Updated 2011-06-22)
Reply With Quote #126

Quote:
Originally Posted by snake4life View Post
hi,

I got a problem with the hint box, I like to let the peeps vote while bonus round the hintbox is a 100% must have feature, but I got a cosmetic problem:


any way to get the hint box higher or that the vote starts after the bonus round time, I was playing around 2hour with the cvars, but no success

my server settings:
maxrounds 2
timelimit 0
winlimit 0
Sadly, I think the hintbox is fixed in one spot by the game itself.

Out of curiosity, what are you MapChooser Extended settings? MapChooser (and MapChooser Extended) have the option to do a vote during bonus time at the end of a map, when the final scoreboard is showing. Although, the scoreboard may obscure that as well, I'm not sure...

Edit: I've also been informed that this plugin transitioned from New to Approved. \o/ Too bad MapChooser Extended Sounds wasn't at the same time. Oh well.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-11-2011 at 09:41.
Powerlord is offline
snake4life
Member
Join Date: Jul 2011
Old 08-11-2011 , 15:41   Re: MapChooser Extended 1.6.3 (Updated 2011-06-22)
Reply With Quote #127

my bonus round time is 30
Code:
// Specifies how many more frags are allowed when map is extended.
// -
// Default: "10"
// Minimum: "5.000000"
sm_extendmap_fragstep "10"

// Specifies how many more rounds each extension makes
// -
// Default: "5"
// Minimum: "1.000000"
sm_extendmap_roundstep "5"

// Specifies how much many more minutes each extension makes
// -
// Default: "15"
// Minimum: "5.000000"
sm_extendmap_timestep "15"

// Block slots to prevent accidental votes.  Only applies when Voice Command style menus are in use.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_blockslots "1"

// Specifies if a 'Don't Change' option should be added to early votes
// -
// Default: "1"
// Minimum: "0.000000"
sm_mapvote_dontchange "0"

// Specifies if MapChooser should run an end of map vote
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_endvote "1"

// Specifies how many past maps to exclude from the vote.
// -
// Default: "5"
// Minimum: "0.000000"
sm_mapvote_exclude "1"

// Number of extensions allowed each map.
// -
// Default: "0"
// Minimum: "0.000000"
sm_mapvote_extend "0"

// Specifies how many maps to include in the vote.
// -
// Default: "5"
// Minimum: "2.000000"
// Maximum: "6.000000"
sm_mapvote_include "6"

// Number of run off votes allowed each map.
// -
// Default: "1"
// Minimum: "0.000000"
sm_mapvote_maxrunoffs "1"

// Menu Style.  0 is the game's default, 1 is the older Valve style that requires you to press Escape to see the menu, 2 is the newer 1-9 button Voice Command style.  Style 2 is unavailable in some games.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "2.000000"
sm_mapvote_menustyle "0"

// Specifies whether or not MapChooser should pick a map if no votes are received.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_novote "0"

// Hold run off votes if winning choice has less than a certain percentage of votes
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_runoff "0"

// If winning choice has less than this percent of votes, hold a runoff
// -
// Default: "50"
// Minimum: "0.000000"
// Maximum: "100.000000"
sm_mapvote_runoffpercent "50"

// Warning time for runoff vote in seconds.
// -
// Default: "5.0"
// Minimum: "0.000000"
// Maximum: "30.000000"
sm_mapvote_runoffvotewarningtime "5.0"

// Specifies when to start the vote based on time remaining.
// -
// Default: "10.0"
// Minimum: "1.000000"
sm_mapvote_start "1.0"

// Specifies when to start the vote based on percents.
// -
// Default: "35.0"
// Minimum: "0.000000"
// Maximum: "100.000000"
sm_mapvote_start_percent "35.0"

// Enable or Disable percentage calculations when to start vote.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_mapvote_start_percent_enable "0"

// Specifies when to start the vote base on frags remaining.
// -
// Default: "5.0"
// Minimum: "1.000000"
sm_mapvote_startfrags "5.0"

// Specifies when to start the vote based on rounds remaining. Use 0 on TF2 to start vote during bonus round time
// -
// Default: "2.0"
// Minimum: "0.000000"
sm_mapvote_startround "0.0"

// MapChooser Extended Version
// -
// Default: "1.6.3"
sm_mapvote_version "1.6.3"

// Specifies how long the mapvote should be available for.
// -
// Default: "20"
// Minimum: "5.000000"
sm_mapvote_voteduration "25"

// Warning time in seconds.
// -
// Default: "15.0"
// Minimum: "0.000000"
// Maximum: "60.000000"
sm_mapvote_warningtime "0.0"

// Location for the warning timer text. 0 is HintBox, 1 is Center text, 2 is Chat.  Defaults to HintBox.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "2.000000"
sm_mapvote_warningtimerlocation "2"
I was also thinking abut raising the timelimit to 8-10min (cant go higher bec of payload) but voting for a new map 10mins after u begin to play on a map is just .... people come and go...

Last edited by snake4life; 08-11-2011 at 15:44.
snake4life is offline
wildd
SourceMod Donor
Join Date: Jun 2011
Location: Latvia, Riga
Old 08-12-2011 , 10:33   Re: MapChooser Extended 1.6.3 (Updated 2011-06-22)
Reply With Quote #128

Hi, I have question if it would be easy to extend this plugin with few more options or maybe there already is such plugin.

What I want - two things, first one is option to specify second maplist. And the second thing is options when to use this second maplist (with three cvars - two who specifies time interval and second who specifies player count)

For example, cvar which specifies that if player count is under that what is set in cvar, then mapchooser will use second maplist, or if server time is in time interval between what is specified in two time cvars, then mapchooser also uses second maplist, like

sm_mapvote_min_players
sm_mapvote_time_from
sm_mapvote_time_to

And it could work like this - if specified only min players, then second maplist is only when player count before vote starting is under this limit. If specified only time limits, then second maplist is only when server time is in range between speciefied times. If specified min players and time limit, then second maplist is only when booth options are valid. Or something like this.

Would it be hard to do this? Also maybe there is already such plugin, dunno.
wildd is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-12-2011 , 13:56   Re: MapChooser Extended 1.6.3 (Updated 2011-06-22)
Reply With Quote #129

Quote:
Originally Posted by snake4life View Post
my bonus round time is 30
Oh, OK, you're already using bonus round vote. I didn't think that vote started until after the end of map scoreboard screen came up (which can be dismissed by pressing tab).

I don't know if adding an option to disable the time-based end of round vote would be worth looking into, so that only the bonus time vote occurs at the end of the map...

Quote:
Originally Posted by snake4life View Post
I was also thinking abut raising the timelimit to 8-10min (cant go higher bec of payload) but voting for a new map 10mins after u begin to play on a map is just .... people come and go...
Actually, that's what I currently do on my servers.

Quote:
Originally Posted by wildd View Post
Hi, I have question if it would be easy to extend this plugin with few more options or maybe there already is such plugin.

What I want - two things, first one is option to specify second maplist. And the second thing is options when to use this second maplist (with three cvars - two who specifies time interval and second who specifies player count)

For example, cvar which specifies that if player count is under that what is set in cvar, then mapchooser will use second maplist, or if server time is in time interval between what is specified in two time cvars, then mapchooser also uses second maplist, like

sm_mapvote_min_players
sm_mapvote_time_from
sm_mapvote_time_to

And it could work like this - if specified only min players, then second maplist is only when player count before vote starting is under this limit. If specified only time limits, then second maplist is only when server time is in range between speciefied times. If specified min players and time limit, then second maplist is only when booth options are valid. Or something like this.

Would it be hard to do this? Also maybe there is already such plugin, dunno.
As much as I hate steering people away from my plugins to other peoples plugins, Ultimate MapChooser may be a better fit for your server. It's a bit more complicated to set up, but it has a Player Limit and Time Limit modules that do what you want.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
wildd
SourceMod Donor
Join Date: Jun 2011
Location: Latvia, Riga
Old 08-12-2011 , 15:38   Re: MapChooser Extended 1.6.3 (Updated 2011-06-22)
Reply With Quote #130

You don't steer me away from your plugin, I will still use it on 3 of 4 servers, because I like it. But on 1 of 4 servers, I have one mod, so I needed this features. Thanks for help! :)
wildd is offline
Reply



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 02:46.


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