Raised This Month: $32 Target: $400
 8% 

RandomCycle+ (2.0.6)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Jamster
Veteran Member
Join Date: Jun 2008
Plugin ID:
826
Plugin Version:
2.0.6
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    6 
    Plugin Description:
    Random maplists/cycles with options for player population tiers and time based tiers. Includes idle/crashed server support.
    Old 03-19-2009 , 12:58   RandomCycle+ (2.0.6)
    Reply With Quote #1

    About:
    RandomCycle+ is a plugin with its origins based on the RandomCycle plugin by the SourceMod team.

    With RC+ you can create "tiers" of maplists that the plugin can pick from depending on the population of your server. There's the regular tiers for population based maps, a single tier if you wish to run a single random rotation and an idle tier for when there are no players on the server, you can optionally rotate between these maps.

    This plugin is fully compatible with many other map voting plugins such as mapchooser and rockthevote. It should in fact have no problem with any other plugin that I know of or possibly released in the future.

    I created this plugin as I was using DMR on our server but I found with more modern versions of SM keeping it going was harder. RandomCycle by the SourceMod team was more what I was after but lacked the features I specifically needed, thus I created the "plus" version with all the things I wanted.

    All picked random maps are kept for the duration of the currently played map. e.g. if the population fluctuates from high to medium to high again the first picked high map is used again. New random maps are picked again when the next map starts.

    Config:
    /cfg/sourcemod/plugin.randomcycleplus.cfg
    This file is auto-generated on plugin run but it is highly recommended that you configure this yourself beforehand.

    /addons/sourcemod/configs/randomcycleplus.cfg
    I highly recommend that you configure this before running the plugin.

    For information on creating other tiered maplists please read the config file within the attached archive.

    Installation
    Download the zip archive and extract to your game folder keeping the folders intact. If you wish to use the debug version of rcplus to help find issues then use the version in the disabled folder instead of the regular version.

    Server commands:

    Note: These aren't in the admin menu.

    sm_rcplus_reload
    Reloads RandomCycle+ maplists.

    sm_rcplus_resume
    Resumes RandomCycle+ if the nextmap has been changed externally.

    SUPPORT IS ONLY PROVIDED IF YOU ARE RUNNING SOURCEMOD 1.3 OR ABOVE
    Please report any bugs you find and I will fix them asap, thank you.

    ~*Special Thanks*~
    Sven Stryker for my grammar within the plugin, cheers bro.
    SM team for their hard work.

    Changelog:

    2.0.6
    - Disabled debug code by default.

    2.0.5
    - Added a lot of new debug code to trace any possible issues.
    - Initial mapstart pick is now delayed by 5 secs.

    2.0.4
    - Hopefully fixed crashing issues.

    2.0.3
    - Fixed invalid timer issue on player connect/disconnect, also cause of a possible rare crashes on mapstart.
    - Fixed idle tier sometimes not activating on players vacating the server.

    2.0.2
    - Fixed the config fallback for real now.
    - Added recognition and blocking of SM/meta commands for config execs.
    - Added cvar "sm_rcplus_crashrec_skipmap_force", this acts similar to the force cvar for the population change portion of RC+. This toggles if a crashed map is unknown should it be treated as a high/single map.

    2.0.1
    - Disabled debug code for release.
    - Config now falls back properly if the config set it not valid.
    - Fixed crash recovery from resuming from an idle map if idle tier was disabled.
    - Fixed invalid handles with some timers.

    2.0
    - Major changes to randomcycle configuration, more control over cycles. See new config for more info.
    - Some changes to cvars and changed for more "logic". Read plugin config for more info. Highly likely most users will need to reconfigure.
    - Added a cvar to change the default cycle "sm_rcplus_usecycle", will fallback to use the "default" cycle in the config if not found.
    - Removed check on mapstart cvar, checking is now done when needed on player connect/disconnect.
    - Added cvar execution support when certain tiers become active.
    - Maplist loading optimisations.
    - Fallback improvements.
    - Ratio default now 50% for automatic exclude.
    - Added options to exclude any tier after it has been used for x amount of maps, will always try and use the tier above itself.
    - Added ability to "group" similar maps, as to exclude them as one. Handy for similar styled maps.
    - +/- map ability has been changed, this falls in line with the new config setup.
    - Added crash maphistory support, this will let the server continue from where it left off after an unexpected crash. Enable or disable this with "sm_rcplus_crashrec_enable", set "sm_rcplus_crashrec_skipmap" to enable or disable skipping the initial default map on server restart. All data for this part of the plugin is stored in the SourceMod data folder.
    - Added population change map support. When setup will change the map if the population changes quick within a certain time limit.
    - Fixed resume command not displaying correctly.
    - When forcing a manual reload RC+ will always repick a map for all tiers.
    - Changed the reload and resume commands from admin commands to server commands.
    - Hooks removed for all cvars, just complicated things. If you change a cvar either wait until RC+ checks again or run the reload command.
    - Changed phrase for showing the nextmap if you have announce enabled. No longer says "RandomCycle+".
    - Improved randomisation with SM 1.3+ specific code (thanks goes to psychonic).
    - Removed some redundant code.
    - Lots of other fixes due to total recode, the odd leak etc.
    - Added translation support to commands and convars.
    - Plus much much more I forgot to note.

    1.4.1.2
    - Fixed handle error when cvar settings change mid-game and rc+ check is not running.

    1.4.1.1
    - New map fallback, 100% safe map fallback when plugin is no longer in control.

    1.4.1
    - Rolled back current map array, fixes a pretty major map picking bug.
    - Fixed some debug code.
    - Added slight delay to initial mapstart check (basically waits long enough so it can check for connected players).

    1.4.0b
    - Fixed idle tier code not checking on player disconnect.
    - Some other small optimisations.

    1.4.0a
    - Fixed a small bug in the +/- time tier code.

    1.4.0
    - Fixed that parsing bug for real now!
    - Main tiers renamed and single time tiers have now changed, PLEASE CHECK THE NEW CONFIGURATION FILE, this is to avoid possible conflicts.
    - General code facelift, performence is now vastly optimised.
    - Removed RTV code, seperate modified plugins are better for this.
    - Removed the basetriggers detection code, not really needed now.
    - Added extra idle tier support to regular single time tiers.
    - Added +/- support to time tiers. This is so you can easily add or remove maps from a tier during certain times.
    - Provided better fallbacks if anything goes wrong rather than halting the plugin.
    - Better error feedback.
    - Added a cvar to control where the rc+ configuration file is. Defaults to randomcycleplus.cfg in the config folder in SM root when not set.
    - Fixed some translation errors and trimmed the file itself.
    - Re-done the config file to show better examples on how to set it up.
    - Added "automatic" (-1) settings for player load cvar's. Also new default. Less than equals 1/3 for low, more than equals 2/3 for high. Rounds to nearest.
    - Cleaned up comments in the code a bit!

    1.3.2.2
    - Added lots of debug code. Not operational by default though (requires a recompile).
    - Adjusted some of the RC+ checks to do with time tiers and single tier.
    - Fixed some mistakes in the exclude values.
    - Optimised a lot of the checks and a few small fixes.
    - Temp fix for a huge parsing bug (big props to DontWannaName, cheers man).

    1.3.2.1
    - Fixed closing the timer when applicable for the main check when single tier mode is enabled mid game.
    - Error handling improved with single tier mode enabled.
    - Fixed setting regular time tier to automatic exclude.

    1.3.2
    - Lots of very small fixes.
    - Added "automatic" cvar value for excludes and is now the new default ("-1") this will automatically exclude roughly 40% of the maps on your list (this value is rounded to the nearest value). Also added a cvar to control this ratio.
    - Added idle server support, also works with time tiers. Also setup a cvar to control if RC+ rotates through your idle maps or keeps on one idle map until players join the server.
    - Added PL/EX support to normal tiers.
    - Changed mapstart check default to 1.
    - Removed max time restriction on main rc+ check time setting.

    1.3.1
    - Added population support to time tiers.
    - Added in validating of time tiers to check if they clash or not.
    - Better detection of incorrect cvar values with single tier mode enabled which will let single tier mode to continue.
    - Further small improvements.

    1.3.0a
    - Small bugfix with single tier mode enabled on startup causing the early nextmap trigger to show.

    1.3.0
    - Added support for time specific rotations.
    - Improved the map history if using multiple types of tiers.
    - Optimised single tier mode so you don't need to fill out the other tiers if they are unused on your server.
    - Removed dupe map check for the whole low to high cycle and the cvar that controls this due to the way the plugin now handles the map history.
    - Improved error reporting.
    - A few general optimisations and improvements.

    1.2.1
    - Fixed single tier mode history bug.

    1.2.0
    - Map history code now drastically recoded, will now remember the FULL past high, medium and low tier maps rather than not using the past x maps recently played.
    - Cvar added to control the size of the internal RC+ maphistory.


    1.1.1a
    - Fixed start of map check not working.

    1.1.1
    - Small code fixes
    - RTV portion of the code reworked to hopefully stop the ghostly passing.
    - Disabling of high tier takes into account if the server population dips in-between maps.
    - If the single tier happens to get disabled the timer check will start up again and continue to check for players, single tier cvar change now hooked too so it will instantly enable or disable.
    - Disabled check array command in default build, uncomment to enable again if you wish, but this command is now defunct.

    1.1.0
    - Added cvar to enable single tier mode.
    - Fixed min value for disable high tier.
    - Cleaned up and optimised a lot of the code.
    - Made the disable high tier code a lot better.

    1.0.8
    - Fixed internal rtv not disabling when it should.
    - Fixed log errors when the plugin uses the normal cycle (I hope).

    1.0.7e
    - Fixed "disabling plugin" log bug.

    1.0.7d
    - Fixed a small code inconsistency with disabling the high tier.
    - Fixed plugin version.

    1.0.7c
    - Code cleanup.
    - Added sm_rcplus_disablehightier to default code.

    1.0.7b
    - Fixed a mistake in the RTV code.

    1.0.7a
    - Very small fix with max high player cvar value.

    1.0.7
    - Fixed disconnect player bug for rtv.
    - Fixed some handles.

    1.0.6
    - Added rtv code to plugin to simply skip to nextmap, other commands added.
    - Increased string sizes for map names for safety.
    - Other very small fixes, code optimisation/organisation.

    1.0.5
    - Added cvar to enable/disable checking for duplicate maps for the whole cycle.
    - Added a further check to check for duplicates in the tier itself (this is always enabled due to the nature of the plugin).

    1.0.4
    - Added cvar to instantly change the nextmap on mapstart.

    1.0.3
    - Spelling fixes.
    - Slightly more optimised when checking player counts.

    1.0.2
    - Fixed parsing errors on reading the config file with comments in.

    1.0.1
    - Added code to detect duplicate maps.

    1.0
    - Initial release.

    WARNING TO PRE 2.0 USERS: YOU WILL NEED TO RECONFIGURE EVERYTHING, BACKUP YOUR OLD SETTINGS BEFORE UPGRADING.
    Attached Files
    File Type: zip randomcycleplus-2.0.6.zip (70.6 KB, 996 views)

    Last edited by Jamster; 06-25-2011 at 19:11. Reason: New version.
    Jamster is offline
    DJ Tsunami
    DJ Post Spammer
    Join Date: Feb 2008
    Location: The Netherlands
    Old 03-20-2009 , 15:00   Re: RandomCycle+ - Tiered random maplists based on server population (Release: 19/03/
    Reply With Quote #2

    Sorry for being lazy and not checking the code, but I'm curious what the difference is between this and Dynamic Map Rotations.
    __________________
    Advertisements | REST in Pawn - HTTP client for JSON REST APIs
    Please do not PM me with questions. Post in the plugin thread.
    DJ Tsunami is offline
    Jamster
    Veteran Member
    Join Date: Jun 2008
    Old 03-20-2009 , 15:48   Re: RandomCycle+ - Tiered random maplists based on server population (Release: 19/03/
    Reply With Quote #3

    No problem.

    With dynamic rotations you have to supply a detailed "dynamic" maplist for the server, so it sticks to that RIGIDLY, which is fine of course for that kind of control over the mapcycle.

    RC+ actually picks a random map from the relative tier depending on the population of the server and compares it against the maphistory (plus current map) to make sure it's not repeating itself in any way (how far back configured by the exclude convars).

    It's also fully compatible with pretty much any map voting plugin out there. I really tried to make this as self contained as I could as to not mess with any possible outside influences from other plugins and such, or even the default mapcycle, if one wishes (you can do this by setting one of the player settings to 0 or no value between both to disable the mid tier).

    I think that's it! Just ask away if you have any more questions about it, I will happily answer them.

    I have also just updated the plugin, I added some code to detect map dupes on the maplists.
    Jamster is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 03-20-2009 , 17:07   Re: RandomCycle+ - Tiered random maplists based on server population (Updated: 20/03/
    Reply With Quote #4

    I like..... I can go test this, dmr was being mean to me, it it also very time consuming to add 1 map to it and copy paste the dam parameters.
    __________________

    DontWannaName is offline
    Jamster
    Veteran Member
    Join Date: Jun 2008
    Old 03-20-2009 , 17:18   Re: RandomCycle+ - Tiered random maplists based on server population (Updated: 20/03/
    Reply With Quote #5

    Yeah, I figured people would just make do with global params for the player sizes. But if you want different player sizes for different maps you can also just add the convars in any per-map config setup you have. I tried to make this customize friendly as possible without being too much of a pain, I hope!
    Jamster is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 03-20-2009 , 17:42   Re: RandomCycle+ - Tiered random maplists based on server population (Updated: 20/03/
    Reply With Quote #6

    I think the default file isnt commented out properly since I got this when I left the comments but it was fine without them.

    Code:
    L 03/20/2009 - 14:27:32: SourceMod error session started
    L 03/20/2009 - 14:27:32: Info (map "pl_badwater") (file "errors_20090320.log")
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] elow. is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] ow is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] file is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] ss is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] efault is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] in is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] duce is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] t is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] ve is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] * is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] =============================== is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] ======== is an invalid map
    L 03/20/2009 - 14:27:32: [randomcycleplus.smx] High is an invalid map
    __________________

    DontWannaName is offline
    Jamster
    Veteran Member
    Join Date: Jun 2008
    Old 03-20-2009 , 18:27   Re: RandomCycle+ - Tiered random maplists based on server population (Updated: 20/03/
    Reply With Quote #7

    whoa, it worked before, weird, I'll sort that out, thanks man.

    edit: for now just get rid of the commented code people, I'll post a fixed plugin/config later

    Last edited by Jamster; 03-20-2009 at 18:41.
    Jamster is offline
    Jamster
    Veteran Member
    Join Date: Jun 2008
    Old 03-20-2009 , 20:32   Re: RandomCycle+ - Tiered random maplists based on server population (Updated: 21/03/
    Reply With Quote #8

    Right, fixed! Original post updated with version 1.0.2

    After that experience I am going to get myself acquainted with KeyValues if I do a future update. :p
    Jamster is offline
    Pythong
    SourceMod Donor
    Join Date: Dec 2008
    Old 03-23-2009 , 00:04   Re: RandomCycle+ - Tiered random maplists based on server population (Updated: 21/03/
    Reply With Quote #9

    I like this, going to add it to my server tomorrow and see how it does.
    Pythong is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 03-23-2009 , 01:33   Re: RandomCycle+ - Tiered random maplists based on server population (Updated: 21/03/
    Reply With Quote #10

    Pretty basic and works great for me. I disabled the middle part. Your servers either full or emptying.
    __________________

    DontWannaName 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 09:19.


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