Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here
NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

You are here: Big Brother Bot ForumAdd-OnsPlugins Discussion (Moderator: MordyT)RotationManager Plugin conversion to Cod6
Pages: [1] 2   Go Down
  Print  
Author Topic: RotationManager Plugin conversion to Cod6  (Read 2028 times) Bookmark and Share
Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: cod4 & cod6
Posts: 26
Offline Offline
WWW
« on: January 09, 2011, 05:08:49 PM »

 Huh
Howdy guys, Im working on getting the rotation manager for cod6:mw2 to work properly.

As i know very little about coding (only 1 semester of vb.net about 5 years ago) im running out of ideas.

i currently have the vanilla script running and according to b3.log i get this error:

Code:
Traceback (most recent call last):
  File "threading.pyo", line 522, in __bootstrap_inner
  File "threading.pyo", line 726, in run
  File "C:\Program Files (x86)\BigBrotherBot_1.4.1\extplugins\rotationmanager.py", line 353, in recountplayers
  File "C:\Program Files (x86)\BigBrotherBot_1.4.1\extplugins\rotationmanager.py", line 194, in adjustrotation
  File "C:\Program Files (x86)\BigBrotherBot_1.4.1\extplugins\rotationmanager.py", line 234, in setrotation
AttributeError: 'Cod6Parser' object has no attribute 'setcvar'

I have tracked it down to the part of the code that sends the command to set the new rotation, and as an attempt at a remedy, i changed 'setcvar' (which i guess the cod6 parser doesnt understand? is there a new similar command??) anyways, changed .setcvar to .say hoping that just saying the command in the console would work, and go figure, it just 'says' it in the game. 

if anyone has any ideas of how to proceed, i would greatly appreciate the help.

since the MW2 server is only version .3 it is very buggy, and since it is so buggy the server tends to go into an infinite loop problem every once in awhile, and since i have yet to find a good program to 'watchdog' my server, i have it set to restart every 24 hours.  however for the few hours, the server is practically empty, and its hard to keep people ingame when thre are only 3 people online and the next map in the rotation is huge and ctf.  with the rot manager i could force it to a tiny map and dm or similar making it more to the liking of the players ingame.
again, any help is greatly appreciated.
Logged

Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: cod4 & cod6
Posts: 26
Offline Offline
WWW
« Reply #1 on: January 12, 2011, 04:36:18 PM »

ker-BUMP :-P
Logged
Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: cod4 & cod6
Posts: 26
Offline Offline
WWW
« Reply #2 on: January 14, 2011, 03:18:51 PM »

awwww sad face, no helps?
Logged
Beta Testers
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: MW2 (aIW)
Posts: 187
Offline Offline
WWW
« Reply #3 on: February 01, 2011, 06:22:49 PM »

Hi
I was wondering if you could finally adjust the code to fit CoD6.
I have B3 1.4.1 and downloaded the plugin fitted to CoD4 .
In the xml (changed the maps accordingly to coD6) and left version 4 both at  the .py and the xml codes . The plugin loads without errors. Still havent had the chance to see if this works, but I have one doubt: would the plugin override the settings at the server.cfg file?
I´d appreciate your insights into this matter.
Logged
Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: cod4 & cod6
Posts: 26
Offline Offline
WWW
« Reply #4 on: February 03, 2011, 01:13:47 PM »

good luck with the help gab, thats exactly what im looking for help with.  i tried to change it myself and failed miserably considering i have virtually no python experience
Logged
Dev. Team
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD2, CoD4, CoDWaW, BFBC2, CoDBO
Posts: 134
Offline Offline
« Reply #5 on: February 03, 2011, 04:47:37 PM »

I am working on the rotationmanager plugin, cod6 and cod7 (ranked) are already supported. You can get the new version of plugin from my dev repository: https://github.com/justabaka/b3-plugin-rotationmanager

I call it a beta, but it is pretty stable, and a few people are already using it (notice the 1.3.8 version): http://master.bigbrotherbot.net/?plugin=rotationmanager
Feel free to use it and submit bug reports if something bad happens Cheesy

P.S. You should use write() instead of say()
« Last Edit: February 03, 2011, 04:58:32 PM by Just a baka » Logged

Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: cod4 & cod6
Posts: 26
Offline Offline
WWW
« Reply #6 on: February 07, 2011, 10:01:46 AM »

thats for the heads up on using 'write'. im learning things as i go and as they become necessary, not quite the most effective route, but at least i remember it this way :-P

thanks for the links, i will be checking them on in just a minute.
Logged
Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: cod4 & cod6
Posts: 26
Offline Offline
WWW
« Reply #7 on: February 07, 2011, 10:23:28 AM »

hey baka, just took a look at the dev repository you have and downloaded the plugin.  Does it support gun game? it doesnt say anything about it in the config file for mw2 gametypes. i havent tried it yet since i dont want a crash while my serevr is full :-P so i figured ask and hopefully get answer sooner then the server emptying out.

thanks in advance
Logged
Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: cod4 & cod6
Posts: 26
Offline Offline
WWW
« Reply #8 on: February 07, 2011, 10:53:38 AM »

ok so ran into this error:

Code:
110207 13:50:41 CRITICAL RotationmanagerPlugin: The config file XML syntax is broken: 'mismatched tag: line 133, column 2'
Traceback (most recent call last):
  File "b3\plugin.pyo", line 53, in __init__
  File "b3\plugin.pyo", line 97, in loadConfig
  File "b3\config.pyo", line 271, in load
  File "b3\config.pyo", line 180, in load
  File "b3\config.pyo", line 75, in readfp
ConfigFileNotValid: 'mismatched tag: line 133, column 2'

and here is the config i am currently using:

Code:
<configuration plugin="rotationmanager">
<settings name="settings">
<!--
    Three rotations have two switchingpoints.
    The first rotationswitch will be when server reaches the next number of players:
    -->
<set name="switchcount1">5</set>
<!--
    Three rotations have two switchingpoints. Set to more than your server slot number to disable.
    The second rotationswitch will be when server reaches the next number of players:
    -->
<set name="switchcount2">9</set>
    <!--
    Do you want the server to react fast to your playercount or would you like to
    reduce the number of rotationswitches? The hysteresis will make your switchcounts
    somewhat flexible. Setting it to 0 will make the plugin react at once when a
    switchpoint is passed.
    -->
    <set name="hysteresis">1</set>
<!--
    Do you want the plugin to build a random rotation when switching? This is good when
    we need to switch a lot! I suggest you leave this set to true. (Options: true/false)
    -->
    <set name="randomizerotation">true</set>
<!--
    The next line makes the new rotation effective immediately (on next map). Does NOT
perform a map change.
    NOTE: If you dont use randomizerotation this could lead to playing the same maps
    over and over again! (Options: true/false)
    -->
    <set name="immediate">true</set>
    <!--
    What gameversion is running? CoD1 or CoD:UO = 1 / CoD2 = 2 / CoD4 = 4 / CoD5 = 5 /
                                         CoD MW2 = 6 / CoD BO Ranked = 7
    -->
    <set name="version">6</set>
<!--
    I think its fair if we wait for the slower maploaders. This option will fast_restart
    the next map after the set delay (seconds) so slower players have equal chances.
    Setting it to 0 will disable the function. Useless for Black Ops.
    -->
    <set name="mapdelay">0</set>
</settings>

<settings name="histories">
<!--
How many maps should we store as a maphistory, so they don't get stored in the
rotation too close to eachother. If for example set to 4, at least 4 other maps
    will be put in rotation before a map can be repeated. This goes for randomized
    rotations only! set to 0 to disable this.
    -->
<set name="maphistory_small">4</set>
<set name="maphistory_medium">4</set>
<set name="maphistory_large">4</set>
<!--
Same as maphistory, but is applied to gametypes for every rotation size.
NOTE: If you set this bigger or equal than your correspondent rotation's amount
    of gametypes, the rotation will always stop growing after first <this value> maps.
    -->
<set name="gthistory_small">0</set>
<set name="gthistory_medium">0</set>
<set name="gthistory_large">0</set>
</settings>
    
    <!-- Call of Duty: Black Ops related settings -->
    <settings name="cod7">
        <!-- Number of players (12 or 18 ONLY) -->
        <set name="slot_num">18</set>
        <!-- Game mode: 0 for softcore, 1 for hardcore, 2 for barebones -->
        <set name="game_mode">0</set>
    </settings>

<!--
Next section is the setting of maprotations. You can supply several maps for several gametypes
Don't use a gametype twice in the same rotation though, it will not work as planned!
You can however use a map more than once in a gametype if you would like to play it more often.
If you left randomizerotation to true the plugin will create a random rotation from all gametypes/maps
provided and it will be a proper and smart maprotation.

    A little reference on cod4-cod7 gametypes and maps:

    CoD4 gametypes (this also applies to all the next CoDs):
"dm" - Free for All deathmatch
"dom" - Domination
"koth" - Headquarters
"sab" - Sabotage
"sd" - Search & Destroy
"war" - Team Deathmatch (DO NOT use for Black Ops)

    CoD6 (Modern Warfare 2) ONLY:
    "ctf" - Capture the Flag
    "arena" - Arena
    "dd" - Demolition
    "oneflag" - One-Flag CTF
    "gtnw" - Global Thermonuclear War

    CoD7 (Black Ops) ONLY:
    "ctf" - Capture the Flag
"dem" - Demolition (Please note: there's no demolition in barebones)
"tdm" - Team Deathmatch

    cod4 maps: mp_backlot mp_bloc mp_bog mp_carentan mp_cargoship mp_citystreets mp_convoy mp_countdown mp_crash mp_creek mp_crossfire mp_farm mp_killhouse mp_overgrown mp_pipeline mp_shipment mp_showdown mp_strike mp_vacant
    cod6 maps (alteriwnet, all dlcs): mp_abandon mp_afghan mp_boneyard mp_brecourt mp_checkpoint mp_compact mp_complex mp_crash mp_derail mp_estate mp_favela mp_fuel2 mp_highrise mp_invasion mp_nightshift mp_overgrown mp_quarry mp_rundown mp_rust mp_storm mp_strike mp_subbase mp_terminal mp_trailerpark mp_underpass mp_vacant
    cod7 maps: mp_array mp_cairo mp_cosmodrome mp_cracked mp_crisis mp_duga mp_firingrange mp_hanoi mp_havoc mp_mountain mp_nuked mp_radiation mp_russianbase mp_villa

-->

<settings name="rotation_small">
 <set name="dm">mp_compact mp_highrise mp_quarry mp_rust mp_trailerpark</set>
 <!--<set name="gg">mp_boneyard mp_complex mp_highrise mp_rust mp_terminal mp_vacant</set>-->
 <set name="gtnw">mp_rust mp_estate mp_afghan mp_quarry</set>
</settings>

<settings name="rotation_medium">
 <set name="war">mp_estate mp_rundown mp_rust mp_storm mp_terminal mp_vacant</set>
 <set name="dom">mp_favela mp_rundown mp_terminal </set>
 <set name="sab">mp_estate mp_nightshift mp_storm mp_trailerpark</set>
 <set name="koth">mp_favela mp_nightshift mp_rundown mp_vacant</set>
 <!--<set name="gg">mp_boneyard mp_complex mp_highrise mp_rust mp_terminal mp_vacant</set>-->
 <set name="gtnw">mp_rust mp_estate mp_afghan mp_quarry</set>
 
 <settings>

<settings name="rotation_large">
 <set name="koth">mp_abandon mp_brecourt mp_derail mp_fuel2 mp_nightshift mp_quarry mp_storm mp_strike mp_terminal mp_vacant</set>
 <set name="dom">mp_abandon mp_brecourt mp_complex mp_crash mp_invasion mp_overgrown mp_storm mp_strike mp_terminal</set>
 <set name="sab">mp_abandon mp_crash mp_invasion mp_nightshift mp_strike mp_trailerpark </set>
 <set name="ctf">mp_complex mp_crash mp_favela mp_invasion mp_strike mp_terminal mp_underpass</set>
 <!--<set name="gg">mp_boneyard mp_complex mp_highrise mp_rust mp_terminal mp_vacant</set>-->
 <set name="gtnw">mp_rust mp_estate mp_afghan mp_quarry</set>
</settings>

</configuration>

Im about to reset my config to what came in the download from your repository to make sure it wasnt something i did, will post again with results in a min
« Last Edit: February 07, 2011, 11:07:02 AM by Nibbles! » Logged
Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: cod4 & cod6
Posts: 26
Offline Offline
WWW
« Reply #9 on: February 07, 2011, 10:56:23 AM »

so it seems there is something wrong with my config, i loaded the default and all works fine.

im going to try and review both your default config and my config and try to locate the porblem.  not sure what it could be as all i did was edit your config.

the error code also prove no use since line 133 col 2 is the / in </configutarion> ... ... ...
hopefully its just a spelling issue somewhere
Logged
Jr. Member
**
OS: Windows
Type: Owner dedicated server(s)
Gameservers: cod4 & cod6
Posts: 26
Offline Offline
WWW
« Reply #10 on: February 07, 2011, 11:03:44 AM »

so it seems my editing was sloppy, as i thought.  accidently deleted a </settings> tag and accidentally added a <settings tag> somewhere else.

after referring to your default config, i found the errors and resolved them.

as you may have noticed, i have commented out the gg lines.  i will test this when the server dies down a bit so i dont piss off 16 people, rather piss off 4 or 5 then 16
Logged
Dev. Team
*
OS: Linux
Type: Owner dedicated server(s)
Gameservers: CoD2, CoD4, CoDWaW, BFBC2, CoDBO
Posts: 134
Offline Offline
« Reply #11 on: February 07, 2011, 07:26:20 PM »

Glad to see you're resolving minor config problems by yourself Smiley

I never ran a 'serious' aIW server, was only using the dedicated to debug the plugin. Would be great if you help me implementing so-called wager matches (GG/SHP/OIC) support.

First of all, I'd like to know, are you able to mix wager and non-wager gametypes in a single sv_maprotation? If yes, the problem's solved, just add new gametypes to your rotations.
Logged

Beta Testers
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: MW2 (aIW)
Posts: 187
Offline Offline
WWW
« Reply #12 on: February 11, 2011, 07:25:33 PM »

The plugin seems to be working great, thank you for the excellent work. I´m trying it on 1.4.2b and so far I´ve had  no problems.
Logged
Full Member
***
Posts: 97
Offline Offline
WWW
« Reply #13 on: February 18, 2011, 04:42:58 PM »

rotation just seems to work when it wants, most of time it sticks to one gametype for like 3-5 maps in a row. Any way to fix it to change to a diff gamtype after every map for BO?
Logged


xfire=specialopx
www.fallenclan.com
Beta Testers
*
OS: Windows
Type: Owner dedicated server(s)
Gameservers: alterIW
Posts: 652
Offline Offline
WWW
« Reply #14 on: February 22, 2011, 01:59:09 PM »

Can you explain what these "switchpoints" are? I don't quite understand that.
Logged
Tags: Rotation  Manager  plugin  conversion  to  Cod6 
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


Rate this page +1 at Google Search


SimplePortal 2.3.1 © 2008-2009, SimplePortal