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.
This file is auto-generated on plugin run but it is highly recommended that you configure this yourself beforehand.
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.
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.
Note: These aren't in the admin menu.
Reloads RandomCycle+ maplists.
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.
Sven Stryker for my grammar within the plugin, cheers bro.
SM team for their hard work.
- Disabled debug code by default.
- Added a lot of new debug code to trace any possible issues.
- Initial mapstart pick is now delayed by 5 secs.
- Hopefully fixed crashing issues.
- 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.
- 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.
- 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.
- 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.
- Fixed handle error when cvar settings change mid-game and rc+ check is not running.
- New map fallback, 100% safe map fallback when plugin is no longer in control.
- 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).
- Fixed idle tier code not checking on player disconnect.
- Some other small optimisations.
- Fixed a small bug in the +/- time tier code.
- 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!
- 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).
- 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.
- 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.
- 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.
- Small bugfix with single tier mode enabled on startup causing the early nextmap trigger to show.
- 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.
- Fixed single tier mode history bug.
- 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.
- Fixed start of map check not working.
- 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.
- 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.
- Fixed internal rtv not disabling when it should.
- Fixed log errors when the plugin uses the normal cycle (I hope).
- Fixed "disabling plugin" log bug.
- Fixed a small code inconsistency with disabling the high tier.
- Fixed plugin version.
- Code cleanup.
- Added sm_rcplus_disablehightier to default code.
- Fixed a mistake in the RTV code.
- Very small fix with max high player cvar value.
- Fixed disconnect player bug for rtv.
- Fixed some handles.
- 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.
- 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).
- Added cvar to instantly change the nextmap on mapstart.
- Spelling fixes.
- Slightly more optimised when checking player counts.
- Fixed parsing errors on reading the config file with comments in.
- Added code to detect duplicate maps.
- Initial release.
WARNING TO PRE 2.0 USERS: YOU WILL NEED TO RECONFIGURE EVERYTHING, BACKUP YOUR OLD SETTINGS BEFORE UPGRADING.
Last edited by Jamster; 06-25-2011 at 19:11.
Reason: New version.