NextMap with Sven Co-op Fix
2 Attachment(s)
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
26th/Jan/2013 Sorry for the long publish delay...
|
Re: NextMap with Sven Co-op Fix
I have a question.
In original nexmap there is one thing that I hate. For example, if current map is de_cbble, and next two maps in mapcycle.txt are de_aztec, de_dust2...and admin comes on the current map (de_cbble) and gives vote for de_dust2, and it passes, he accepts and changes to de_dust2 that has been voted, then nexmap is again de_dust2 because it was in mapcycle.txt Is this fixed in your modification so the real next map (in my example de_aztec) would not be skipped if there has been a vote accepted? |
Re: NextMap with Sven Co-op Fix
Yes, in theory, my modification would notice that aztec isn't being played so it would hold the map cycle position until it is played.
Remember: I have not designed or tested this for any other game than Sven Co-op, therefore I do not recommend using this plugin in a live public/private server for any other game. |
Re: NextMap with Sven Co-op Fix
I've just noticed this plugin has been approved. Thank you Zenith77 :)
|
Re: NextMap with Sven Co-op Fix
Hello, I'm still having problems with the nextmap. Right now when I type in the console "nextmap" it says the correct nextmap. But when I type it in chat it says wrong and it still changes to the wrong one!
|
Re: NextMap with Sven Co-op Fix
If a map calls a new map via the game_changelevel entity, this plugin has no control over that. It can only remember that the next map that should have been played will still show as next, and be run when possible.
|
Re: NextMap with Sven Co-op Fix
This doesn't work on some maps, afrikakorps1 for example, it still goes to the next map in the mapcycle and not the next one in the series. The thing I've noticed is the the map config (that has the nextmap cmd for afrikakorps2) gets executed before this mod does. so this mod still sets the nextmap to what it's not suppost to be set to. Is it posible to add code to the mod to reexecute the maps cfg file after this mod is done on map start.
|
Re: NextMap with Sven Co-op Fix
No idea why, it's executing at the right time for me. You might need a plugin to execute the map config file again.
|
Re: NextMap with Sven Co-op Fix
can't find one that does only that. But would adding something like this to the end of plugin_init in this plugin fix this?
server_cmd("exec maps/%s.cfg", g_currentMap); [edit] seems to work fine. [/edit] [edit again] actually, it doesn't work if you put deagles map management plugin on the server, that plugin sets the map at the start of the map too. by putting this line into the end of plugin_init set_task(6.0, "execmapcfg") and moving the server_cmd line in this post into it's own function will fix this. like: public execmapcfg() { server_cmd("exec maps/%s.cfg", g_currentMap); } [/edit] |
Re: NextMap with Sven Co-op Fix
Would it be possible to have a random nextmap, instead of having a sequential nextmap. I'm in the process of adding maps to my server and the mapcycle position usually gets reset before it reaches the end, so the maps at the end of the mapcycle rarely get played and the ones in the beginning of the mapcycle get played to much.
|
Re: NextMap with Sven Co-op Fix
There are some issues with this working on Sven Co-op 4.0b1 if your 'mapcyclefile' CVAR is not the default 'mapcycle.txt'.
If you possibly know why, please inform this thread, thanks. |
Re: NextMap with Sven Co-op Fix
Update
26th/Jan/2013 Sorry for the long publish delay...
|
Re: NextMap with Sven Co-op Fix
There Have Votemap + rtv?
|
Re: NextMap with Sven Co-op Fix
Nope, that's not this plug-in's job. You want mapchooser or the map voting menu for that.
|
Re: NextMap with Sven Co-op Fix
Quote:
|
Re: NextMap with Sven Co-op Fix
it does not work on maps as:
crisis1 crisis2 hostage hostage2a hostage2b grunts1 grunts2 war war2 war3 |
Re: NextMap with Sven Co-op Fix
Not a bug.
Those maps are not all meant to be linked. crisis1 and crisis2 are separate releases. The author stated that crisis1 came out after crisis2, and although the end of crisis1 is the start of crisis2, it's up to the mapper to make a trigger_changelevel correctly to the "next" map. Not for us to alter someone's creative work en masse. hostage is completely different to hostage2a/hostage2b. grunts1 is completely different to grunts2. Even though the description of grunts2 says it is preceded by grunts1, both maps have different authors and are over a year apart. Again like with crisis 1 & 2, the map authors decided not to link the maps together and it's not up to plug-ins to fill in gaps that aren't meant to be filled. war/war2/war3 appears to be the same mission, but again it's up to the author to link them up when one map ends. |
Re: NextMap with Sven Co-op Fix
The vanilla amx nextmap plugin breaks the vote map system from Sven Coop always choosing the 1st map from the mapcycle.txt
I also tried your version but it seems that only wants to change to the map saying the actual nextmap from the chat. In other words, not even that can fix. I really need one of those 2 nextmap plugins so my amx_nextmap config files work for maps that i do want to be changed after certain maps. Is there a fix for that? |
Re: NextMap with Sven Co-op Fix
Quote:
I fixed the nextmap oddness in Sven Co-op's own server code over a year ago. The nextmap fix from this should probably be disabled now, which can be done with amx_nextmap_svenfix set to 0. |
Re: NextMap with Sven Co-op Fix
Quote:
It always goes for the 1st one you put in the mapcycle.txt (Unless amx_nextmap it's used and still using the votemap menu, still goes for the map from the amx_nextmap) Didin't did the fix for me. |
Re: NextMap with Sven Co-op Fix
Quote:
To quote the main purpose of this plug-in I wrote 14 years ago, Quote:
In addition, the game server declares CVAR mp_nextmap_cycle and populates it with the map name that the server intends to cycle to next. If this doesn't happen either because of a vote to something else, a manual "changelevel", or because of a series-link map (e.g. svencoop1 to svencoop2), then the mp_nextmap_cycle value will not advance to the next entry in the cycle. Also the value of this variable is mirrored to all players periodically (typically when connecting and respawning) so the game client can show this on the scoreboard. -- As of 19th August 2021 this plug-in is now out of the current/approved plug-in list. (Thanks for moving this asherkin.) |
Re: NextMap with Sven Co-op Fix
Quote:
Then i disabled your plugin and i tried that mp_nextmap_cycle command.. it works like a charm. Well.. i guess this means that ill have to replace "amx"nextmap" from my config maps to "mp_nextmap_cycle" Thanks alot for telling me about that command! |
All times are GMT -4. The time now is 01:42. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.