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

NextMap with Sven Co-op Fix


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   Sven Coop        Category:   Server Management       
AdamR
Senior Member
Join Date: Dec 2006
Location: Cardiff, South Wales
Old 11-27-2007 , 13:36   NextMap with Sven Co-op Fix
Reply With Quote #1

Warning: As of Sven Co-op 5.22 (released 16th January 2020) this plug-in is no longer relevant, and should not be used.

Thank you for your interest, however since 13 years ago when I built this fix I've had the opportunity to make the corrections outlined by this plug-in in the Sven Co-op game server code directly. Therefore this plug-in is no longer necessary and may in fact even conflict with the game's base functionality.

You may instead be interested in manipulation of a Sven Co-op game server CVAR, mp_nextmap_cycle. The game server will populate this with the map it intends to cycle to next. It will not advance position in the cycle until the map specified is running. That means cycle interruptions such as map votes, manual "changelevel", and series-link maps (e.g. svencoop1 to svencoop2) should no longer be a problem.


Description

I've spent a lot of time modifying the original nextmap plugin, and fixed it to work with Sven Co-op map cycles.

The differences are mainly to only increment the map cycle position when the map at the current position is being played, so map series do not cause maps in the cycle to get skipped. It also allows the nextmap cvar that some maps decide to use work, and still not skip maps.

I've commented around stuff I've added/changed.

Worth mentioning: I have not designed or tested this plugin in any other game than Sven Co-op. Although it may appear to work, I highly recommend you do not use it on a live public or private server for any other game than Sven Co-op.


Installation

Ensure you comment out the original nextmap.amxx in your plugins.ini. Place my nextmap_sven.amxx in the same plugins folder (or anywhere you want really) and add a new line for nextmap_sven.amxx underneath the commented out nextmap.amxx line.

I do not recommend you overwrite the original nextmap.amxx in case you have problems with this modified one. However, you can set amx_nextmap_svenfix to 0 to disable my modifications without having to load the original plugin. It is 1 by default, you do not need to specify that to any configuration file.

If you want to use the new feature that will randomize selections through your map cycle, you also need to define CVAR amx_nextmap_random with value 1. This feature is disabled by default to prevent confusion for those of you updating blindly. If you are going to use this feature then you should also have a large map cycle to go with it for best results. (really, 50+ maps) This will greatly improve the fresh/unpredicted experience your players will get.

Please let me know if this plugin works properly on your server. I suggest you test it out with map series, keeping note of your cycle. Some test procedures and an overview of the original problem can be found here.


Updates

1st/Feb/2012
  • Added functionality to send the next map to player score boards (for Sven Co-op 4.5 and later).
  • Also changed CVAR's to pointer CVAR's.


26th/Jan/2013
Sorry for the long publish delay...
  • New feature: Option to choose a next map at random, instead of progress through the cycle in a linear fashion.
    The currently and previously played map from the cycle (oh yes, taking into account Sven Co-op multimaps) are excluded from selection.
    This feature requires 3+ maps in the cycle, and is disabled by default to prevent confusion. Set CVAR "amx_nextmap_random" to 1 to enable this feature.
  • New feature: Command to choose a new map "amx_nextmap_choose [map]".
    Using this command will let you specify the next map manually, or if the parameter is left blank choose one from the cycle at random. Doing so via this command will also update the next map on the scoreboard.
    Default access is ADMIN_MAP.
  • New feature: The map being loaded is now shown when the intermission scoreboard appears.
Back-end changes of which won't be noticed by players:
  • Added more comments so other people can see what's going on more.
  • Cleaned up log/console outputs.
  • Made more use of pointer CVAR's.
  • Moved a lot of common functionality into re-usable functions.
  • More meaningful variable names.
Attached Files
File Type: sma Get Plugin or Get Source (nextmap_sven.sma - 2265 views - 12.7 KB)
File Type: sma Get Plugin or Get Source (nextmap_sven_20120201.sma - 1864 views - 8.2 KB)
__________________
Thanks,

Adam Reece - Sven Co-op team.

Last edited by AdamR; 08-05-2021 at 13:32. Reason: Update: 26/Jan/2013
AdamR is offline
Send a message via Skype™ to AdamR
 



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 04:31.


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