I've just opened a l4d2 server and i am trying to figure out for the past 40 min how to add addon campaigns to the mapcyle list OR be able to have them listed when someone wants to change the map (addons is grayed out), i've tried googling and searching around but didn't find any useful info and thought maybe someone here could help me figure it out, would be very much appreciated !
Here are a couple ways to use custom maps on your server, although there are probably other ways as well.
Admin selects custom map:
1. Upload the custom map .vpk file to your server's .../left4dead2/addons folder
2. Restart your server 3. Open the admin menu, select "Server Commands", then select "Choose Map", then select the fist map of the custom campaign. That's it.
Add Custom Maps to map Rotation using ACS:
1. Download Automatic Campaign Switcher source file
2. *Edit the .sp file to include any custom maps you want available for voting and/or as a part of the campaign rotation.
3. Compile the .sp and upload the .smx file to the server's sourcemod/plugins folder
4. Upload the .vpk file for any custom maps you have included in the ACS voting/rotation to your server's .../left4dead2/addons folder
5. Restart you server
6. Set the ACS options to you liking in .../left4dead2/cfg/sourcemod/Automatic_Campaign_Switcher_v1.2.2.cfg
7. Restart you server
*When editing the ACS source file to change the campaign list for coop and versus modes there are several sections that must be edited:
Near the top of the .sp file this section has to have the correct number of campaigns, so edit the value accordingly:
Code:
//Define the number of campaigns and maps in rotation
#define NUMBER_OF_CAMPAIGNS 13 /* CHANGE TO MATCH THE TOTAL NUMBER OF CAMPAIGNS */
#define NUMBER_OF_SCAVENGE_MAPS 13 /* CHANGE TO MATCH THE TOTAL NUMBER OF SCAVENGE MAPS */
Further down is the section listing all of the campaigns. This is where you will add your custom campaigns. You must edit all three sections including First map of the Campaign, Last map of the Campaign, and Campaign Name (this is what will appear in the voting menu). Make sure to follow the syntax and number sequence exactly:
Spoiler
/*============================================ ==========================================
################## A C S M A P S T R I N G S #################
============================================= ===========================================
### ###
### *** EDIT THESE STRINGS TO CHANGE THE MAP ROTATIONS TO YOUR LIKING *** ###
### ###
============================================= ===========================================
### ###
### Note: The order these strings are stored is important, so make ###
### sure these match up or it will not work properly. ###
### ###
### Make all three of the string variables match, for example: ###
### ###
### Format(g_strCampaignFirstMap[1], 32, "c1m1_hotel"); ###
### Format(g_strCampaignLastMap[1], 32, "c1m4_atrium"); ###
### Format(g_strCampaignName[1], 32, "Dead Center"); ###
### ###
### Notice, all of the strings corresponding with [1] in the array match. ###
### ###
============================================= =========================================*/
SetupMapStrings()
{
//The following three variables are for all game modes except Scavenge.
//*IMPORTANT* Before editing these change NUMBER_OF_CAMPAIGNS near the top
//of this plugin to match the total number of campaigns or it will not
//loop through all of them when the check is made to change the campaign.
In this example I have replaced The Parish with the custom map Dark Parish. You could just as easily add Dark Parish or any other custom map without replacing the existing official maps. The indcluded campaigns and their order are completely up to you.
Another example:
Spoiler
//Define the number of campaigns and maps in rotation
#define NUMBER_OF_CAMPAIGNS 14 /* CHANGE TO MATCH THE TOTAL NUMBER OF CAMPAIGNS */
#define NUMBER_OF_SCAVENGE_MAPS 13 /* CHANGE TO MATCH THE TOTAL NUMBER OF SCAVENGE MAPS */
SetupMapStrings()
{
//The following three variables are for all game modes except Scavenge.
//*IMPORTANT* Before editing these change NUMBER_OF_CAMPAIGNS near the top
//of this plugin to match the total number of campaigns or it will not
//loop through all of them when the check is made to change the campaign.
Thank you very much for your post, i appreciate the effort you put into writing it.
I have one more question for you or anyone else that knows, i would like to have a vote option for custom campaigns, so players that are on the server could vote for Dark Parish as an example or any other addon that is on the server, i think this is already possible with with the built in sourcemod vote plugin, BUT, is there any way for the actual campaign name to display ? players will get confused when seeing c5m1_darkwaterfront or similar.
It's really stupid i can't seem to find ANY information about this stuff anywhere, very frustrating.
Thank you very much for your post, i appreciate the effort you put into writing it.
I have one more question for you or anyone else that knows, i would like to have a vote option for custom campaigns, so players that are on the server could vote for Dark Parish as an example or any other addon that is on the server, i think this is already possible with with the built in sourcemod vote plugin, BUT, is there any way for the actual campaign name to display ? players will get confused when seeing c5m1_darkwaterfront or similar.
It's really stupid i can't seem to find ANY information about this stuff anywhere, very frustrating.
doze,
You are welcome.
ACS already provides automated map voting during the finale of each campaign, if enabled in the plugin, and automatic rotation to the next campaign as defined in the .sp file. Again, any map, official or custom, that is listed in the .sp file will be included in the map voting options and in the automated campaign rotation.
Regarding the map name displayed when voting, it is the name you set in the Campaign Name section of the .sp file:
When voting for a map, players will see the map names as defined in this section of the plugin, so Dark Parish would be the map name shown in the vote, and not c5m1_darkwaterfront.
ACS already provides automated map voting during the finale of each campaign, if enabled in the plugin, and automatic rotation to the next campaign as defined in the .sp file. Again, any map, official or custom, that is listed in the .sp file will be included in the map voting options and in the automated campaign rotation.
Regarding the map name displayed when voting, it is the name you set in the Campaign Name section of the .sp file:
When voting for a map, players will see the map names as defined in this section of the plugin, so Dark Parish would be the map name shown in the vote, and not c5m1_darkwaterfront.
Have fun,
PG
Ugh, this is the kind of things config files, such as KeyValues, were invented for.
__________________
Not currently working on SourceMod plugin development.