gg_map_vote issue when not all players vote...

Ask questions and share info about GunGame 5

Postby Monday » Mon Mar 05, 2012 6:24 am

I am actually having the problem too.. started right after i upgraded :/
Monday

Site Admin
Site Admin
User avatar
 
Posts: 97
Joined: Sat Feb 14, 2009 1:51 am

Postby Monday » Mon Mar 05, 2012 6:54 pm


def voteEnd():
    # Stop repeat ?
    ggRepeat = repeat.find('gg_map_vote')
    if ggRepeat:
        ggRepeat.stop()

    # Unsend all menus
    ggVote.unsend(voteUserids)

    winner = []
    win_votes = None
    total_votes = len(reduce(lambda a, b: a + b, mapVoteOptions.values()))

    if not total_votes:
        msg('#human', 'NotEnoughVotes', {}, True)

        # Choose a random map
        winner = random.choice(mapVoteOptions.keys())

        # Set the server up for map change
        set_nextmap(winner)

        # Win message for the map that we randomely chose
        msg('#human', 'WinningMap', {'map': winner.lower(), 'totalVotes': 0,
                                                            'votes': 0}, True)
        cleanVote()
        return

    # Find winner
    for option in mapVoteOptions:
        votes = len(mapVoteOptions[option])
        # No votes ?
        if not votes:
            continue

        # First option with any votes ?
        if not winner:
            winner.append(option)
            continue

        win_votes = len(mapVoteOptions[winner[0]])

        # Loser ?
        if votes < win_votes:
            continue

        # Winner ?
        if votes > win_votes:
            del winner[:]
            winner.append(option)
            continue

        # Tie
        winner.append(option)

    # Make sure we have a winning vote count
    if not win_votes:
        win_votes = len(mapVoteOptions[winner[0]])

    # Random winner
    winner = random.choice(winner)

    # Win message
    msg('#human', 'WinningMap', {'map': winner.lower(),
                        'totalVotes': total_votes, 'votes': win_votes}, True)

    # Set the server up for map change
    set_nextmap(winner)

    # Play sound
    for userid in getUseridList('#human'):
        Player(userid).playsound('endofvote')

    # If this was a RTV, end the map
    if voteRocked:
        userid = es.getuserid()
        es.ServerVar("mp_chattime").set(5)
        es.server.queuecmd("es_xgive %s game_end" % userid)
        es.server.queuecmd("es_xfire %s game_end EndGame" % userid)

    cleanVote()
 


This is the code from gg_map_vote... I honestly do not see any reason why this should not be working. However, today I am going to try deleting my config files and starting over, I know that sounds nuts... But there was an issue with a custom addon that was fixed by simply doing this. It was not working properly, and one of the cvars never got properly set.
Monday

Site Admin
Site Admin
User avatar
 
Posts: 97
Joined: Sat Feb 14, 2009 1:51 am

Postby Monday » Mon Mar 05, 2012 8:07 pm

Just curious...

Can you post your map_vote_list.txt ?
Monday

Site Admin
Site Admin
User avatar
 
Posts: 97
Joined: Sat Feb 14, 2009 1:51 am

Postby Shadow » Sat Mar 10, 2012 2:54 am

I am happy someone from GG has the same issue and I am not the only one!

You want my map vote list? Now that is the secret of the chief's :D ! What's left of it.. I had to degrease it alot with those updates :(!
Attachments
gg_vote_list.txt
(3.33 KiB) Downloaded 1269 times
Shadow

Corporal
Corporal
 
Posts: 204
Joined: Thu Mar 12, 2009 2:57 am

Postby Shadow » Thu Jul 05, 2012 2:02 am

I had activated the Mani voting system for now until someone re-write the map_vote module but next used it since Satoon re-written it.

viewtopic.php?f=67&t=2131

Since this Steam July 2, 2012 update and Mani not yet released a fix! I re-activated the GG51 voting module. It was working fine, had an average of 5 t 8 players, voting was working fine and all of a sudden on a map vote, the module reloaded the same map again! We were on Scope_Homer map. I have no custom addons at all, only included ones :(

*******************************************************************************
* *
* GUNGAME v5.1 ERROR LOGGING *
* HTTP://FORUMS.GUNGAME.NET/ *
* *
* GG VERSION: 5.1.630 IP: 174.142.61.5 *
* SPE VERSION: 1.5.0f r85 PORT: 27016 *
* PLATFORM: NT DATE: 07-04-2012 *
* ES VERSION: 2.1.1.370 ES CORE VERSION: 2.1.1.336 *
* MM VERSION: 0 SM VERSION: 0 *
* MANI VERSION: 0 EST VERSION: 0 *
* *
*******************************************************************************

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
LAST EVENT: [07/04/2012 @ 19:50:02] TOTAL OCCURENCES: [0001]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Traceback (most recent call last):
File "../eventscripts/es.py", line 279, in tick
x()
File "../eventscripts/_libs/python/gamethread.py", line 173, in tick
_executenode(first)
File "../eventscripts/_libs/python/gamethread.py", line 155, in _executenode
function(*a, **kw)
File "../eventscripts/gungame51/scripts/included/gg_map_vote/gg_map_vote.py", line 667, in voteCountDown
voteEnd()
File "../eventscripts/gungame51/scripts/included/gg_map_vote/gg_map_vote.py", line 560, in voteEnd
'totalVotes': total_votes, 'votes': win_votes}, True)
File "../eventscripts/gungame51/core/messaging/shortcuts.py", line 13, in msg
MessageManager().msg(filter, string, tokens, prefix)
File "../eventscripts/gungame51/core/messaging/__init__.py", line 259, in msg
% (prefix, self.__format_string(string, tokens, userid)))
File "../eventscripts/gungame51/core/messaging/__init__.py", line 194, in __format_string
string = __strings__(string, tokens, language)
File "../eventscripts/_libs/python/langlib.py", line 73, in __call__
return self.expand(text, opts, lang)
File "../eventscripts/_libs/python/langlib.py", line 67, in expand
return s.substitute(opts)
File "../eventscripts/_engines/python/lib/string.py", line 170, in substitute
return self.pattern.sub(convert, self.template)

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 15: ordinal not in range(128)
Shadow

Corporal
Corporal
 
Posts: 204
Joined: Thu Mar 12, 2009 2:57 am

Postby satoon101 » Thu Jul 05, 2012 2:12 am

Could you upload your server's gg_map_vote.ini file? Seems like a character in there isn't being recognized.

Satoon
satoon101

Site Admin
Site Admin
 
Posts: 1055
Joined: Thu Oct 09, 2008 4:27 pm

Postby Shadow » Thu Jul 05, 2012 10:30 pm

Would gg_map_vote,cfg be as good? I have no in files what that name. I renamed it to a txt as cfg extension is not allowed to be uploaded.
Last edited by Shadow on Fri Jul 06, 2012 1:35 am, edited 1 time in total.
Shadow

Corporal
Corporal
 
Posts: 204
Joined: Thu Mar 12, 2009 2:57 am

Postby satoon101 » Fri Jul 06, 2012 1:20 am

No, the .ini file is where the language strings are that are sent in popups and messages to players. The gg_map_vote.ini file is located in your server's ../addons/eventscripts/gungame51/scripts/included/gg_map_vote/ folder. Something in that specific file isn't being decoded properly. If you never updated anything in that file, try to reinstall that file on your server.

Satoon
satoon101

Site Admin
Site Admin
 
Posts: 1055
Joined: Thu Oct 09, 2008 4:27 pm

Postby Shadow » Fri Jul 06, 2012 1:32 am

I've never modified anything in that file, didn't even know it exist as you could have guessed lol! Here you go... :)
Attachments
gg_map_vote.ini
(9.3 KiB) Downloaded 1227 times
Shadow

Corporal
Corporal
 
Posts: 204
Joined: Thu Mar 12, 2009 2:57 am

Postby satoon101 » Fri Jul 06, 2012 1:43 am

Have you tried re-uploading it? I'm not sure why this would all of a sudden start erroring.

Satoon
satoon101

Site Admin
Site Admin
 
Posts: 1055
Joined: Thu Oct 09, 2008 4:27 pm

Postby Shadow » Sun Jul 08, 2012 11:15 pm

I haven't tried it yet but I will re-extract the file and replace it. I will keep you posted....
Shadow

Corporal
Corporal
 
Posts: 204
Joined: Thu Mar 12, 2009 2:57 am

Re: gg_map_vote issue when not all players vote...

Postby eugente » Tue Oct 02, 2012 1:02 am

HI now is September 2012 And the problem with gg_voting is still present . I need to change manually couples Maps or to restart the server. Same map over and over. This problem show up when is more then 10 players on server. Is something random . I want to use mani but is not working for me .
eugente

Recruit
Recruit
User avatar
 
Posts: 3
Joined: Sat May 07, 2011 2:12 am

Postby Shadow » Tue Oct 02, 2012 2:22 am

I had the same issue even with below 10 players, all gamers voted or not, also in some cases with only 2 or 3 players and even after the GG51 voting module was re-written. I am now using mani until someone can figure out what's wrong with the voting module. Below is my "gg_map_vote.cfg" configuration that allows me to use mani. Hope it can help.

// ============================================================================
// >> GUNGAME MAP VOTE
// ============================================================================
// Description:
//    Allows players to vote for the next map.
// Notes:
//    * This does not require any additional plug-ins.
// Options:
//    0 = (Disabled) Do not use voting.
//    1 = (Enabled) Use GunGame's map voting system.
//    2 = (Enabled) Use a 3rd-party voting system.
// Default Value: 0

// Controls GunGame's map voting.
   gg_map_vote 2

// ============================================================================
// >> 3RD PARTY VOTE COMMAND
// ============================================================================
// Description:
//    If gg_map_vote is set to 2, this is the command that will be issued when
//       the vote is triggered.
// Examples:
//    * Mani:        gg_map_vote_command "ma_voterandom end 4"
//    * BeetlesMod:  gg_map_vote_command "admin_votemaps"
//    * SourceMod:   gg_map_vote_command "sm_mapvote" (with mapchooser.smx
//          enabled)
// Default Value: "ma_voterandom end 4"

// Triggers 3rd party voting.
   gg_map_vote_command "ma_voterandom end 4"

// ============================================================================
// >> MAP VOTE SIZE
// ============================================================================
// Description:
//    This variable controls the number of maps that will be displayed as
//       options in the vote menu.
// Notes:
//    * It is recommended not to set this too high.
// Options:
//    0 = (Enabled) Use entire map list.
//    # = (Enabled) Use # amount of options.
// Default Value: 6

// Controls GunGame's map vote size.
   gg_map_vote_size 6

// ============================================================================
// >> MAP VOTE TRIGGER LEVEL
// ============================================================================
// Description:
//    This variable controls what level the GunGame Vote is fired on.
//    The value will be subtracted from the total number of levels.
// Notes:
//    * If there are 23 levels, and "gg_vote_trigger" is set to "3", voting
//       will start on level 20.
// Options:
//    # = (Enabled) # from the last level to start the voting.
// Default Value: 4

// Which level to trigger GunGame's map voting.
   gg_map_vote_trigger 4

// ============================================================================
// >> MAP VOTE TIME
// ============================================================================
// Description:
//    This variable controls how long the vote will last for.
// Notes:
//    * It is recommended not to set this too high.
//    * If nobody votes, it will default to the "mapcycle.txt".
// Options:
//    # = (Enabled) Time in seconds to allow voting.
// Default Value: 30

// GunGame's map voting time limit.
   gg_map_vote_time 30

// ============================================================================
// >> EXCLUDE RECENTLY PLAYED MAPS
// ============================================================================
// Description:
//    This variable will exclude the selected number of recently played maps
//       from the vote menu.
// Notes:
//    * Make sure you have enough maps listed in your source.
// Options:
//    0 = (Disabled) Do not exclude recent maps.
//    # = (Enabled) # of last maps to exclude.
// Default Value: 0

// Exclude recent maps from GunGame's map voting.
   gg_map_vote_dont_show_last_maps 5

// ============================================================================
// >> SHOW PLAYER VOTES
// ============================================================================
// Description:
//    This variable controls if votes will be publically announced.
// Examples:
//    * Monday voted for gg_funtimes.
//    * XE_ManUp voted for gg_hello_kitty_island_adventure.
//    * Warren voted for aim_shotty.
// Options:
//    0 = (Disabled) Do not use display player votes.
//    1 = (Enabled) Display player votes.
// Default Value: 0

// Shows player feedback from GunGame's map voting.
   gg_map_vote_show_player_vote 1

// ============================================================================
// >> MAP LIST SOURCE
// ============================================================================
// Description:
//    Controls which map list will be used to build the vote menu.
// Notes:
//    * You may only filter maps with option 3. See below for more information.
// Options:
//    1 = mapcycle.txt
//    2 = maplist.txt
//    3 = "gg_map_vote_file" variable
//    4 = All maps in the "maps" folder
// Default Value: 1

// Source of maps for GunGame's map voting.
   gg_map_vote_list_source 1

// ============================================================================
// >> MAP LIST FILE
// ============================================================================
// Description:
//    This variable is not used, unless the above variable is set to 3.
// Notes:
//    * You may filter out maps by player count.
//    * See "/cfg/gungame51/gg_vote_list.txt" for examples and information.
//    * You can NOT add filters to "maplist.txt" and "mapcycle.txt"
// Examples:
//    * gg_map_vote_file "cfg/gungame51/my_list.txt"
//    * gg_map_vote_file "cfg/my_other_list.txt"
// Default Value: "cfg/gungame51/gg_vote_list.txt"

// Map list for GunGame's map voting.
   gg_map_vote_file "cfg/gungame51/gg_vote_list.txt"

 
Shadow

Corporal
Corporal
 
Posts: 204
Joined: Thu Mar 12, 2009 2:57 am

Previous


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron