Left 4 Dead 2

Left 4 Dead 2

评价数不足
Simple Modded Server Guide
由 blake++ 制作
Great for playing modded L4D2 with friends! Your friends do not need to install any mods for these to work.

Downsides of this method vs dedicated lobbies:
-Cannot see endgame stats screen
-You must start your L4D2 first and then start the server
-Your friends will have your public IP (not a problem unless your friends are malicious)
-It will not be up 24/7
   
奖励
收藏
已收藏
取消收藏
Follow Someone Else's Guide
You heard me!

This guy's guide is pretty awesome and gets past the basics.
Do the following:
  • Follow Obtaining Server Files
  • Follow Port Forwarding
  • Download the latest Sourcemod from here.[www.sourcemod.net] Copy to the directory 'left4dead2'. You do not need the separate Metamod download.
  • Go to the SourceMod & MetaMod section and find the Adding Admins section. Follow that to add your Steam ID to the admin list.
Workshop Addons to Install
These are the workshop addons I like to use. They enhance the gameplay and add variety without altering the core L4D2 formula. Really great for players who like playing on harder difficulties.

Take Bot Item - Shove the bots on the item you want to take it
Rayman1103's Mutation Mod - A bunch of custom mutations that can be selected
Left 4 Bots - Vanilla AI improvements
Left 4 Lib - Required for Left 4 Bots
Competitive Bots+ - Infected - Infected AI enhancements
Accuracy Checker - Display personal accuracy stats after the round or by typing !acc

To Install: When you subscribe to these items, you will first have to go to your L4D2 workshop addons folder. Located here: {YOUR_STEAM_FOLDER}\steamapps\common\Left 4 Dead 2\left4dead2\addons\workshop
You will see each addon has a VPK file (the actual mod) and the thumbnail for the mod. Since the filenames aren't very descriptive, look at the thumbnail and find the mod with the same name that you're trying to use.



Move just the VPK over to {YOUR_SERVER}/left4dead2/addons. I recommend renaming the VPK file so you know which is which.
SMX Addons to Install
Next are some .smx addons. These aren't from the workshop, but rather outside sources that are made for SourceMod.

Note: You should make sure you're downloading the most recent version as well as clicking on Get Plugin.


In {YOUR_SERVER}/left4dead2/addons/sourcemod/plugins/, place the following addons:

(Links take you to alliedmods.net)
Drop Secondary - Survivors drop secondary weapon when they die
L4D Rock Lagcomp - Lag compensation added for the tank rock (so you can shoot it better)
L4D Vote Mode - Make sure you install l4d_votemode_all as well; allow players to initiate a vote to change gamemode and/or mutation
L4D Info Editor - Required for L4D Vote Mode
Map Changer - Change maps; custom maps are parsed automatically
Optional: L4D 100 - Constant horde, remove special infected

While we're in this folder, place the file nextmap.smx into the folder titled "Disabled". We won't be using it.
Configuration
Server.cfg
Create a cfg file if there isn't one named "server.cfg" and place it in {YOUR_SERVER}/left4dead2/cfg/

Copy and paste the following code in there.
hostname "czarchasm's server" rcon_password "123" // change to what you want sv_gametypes "coop, survival, versus, mutation" z_difficulty impossible // expert //--> Steam group # to assign to server sv_steamgroup 0 sm_cvar fps_max 0 sv_allow_lobby_connect_only 0 sv_alltalk 1 //FRIENDLY FIRE sm_cvar survivor_friendly_fire_factor_easy 0 sm_cvar survivor_friendly_fire_factor_expert 1 sm_cvar survivor_friendly_fire_factor_hard 1 sm_cvar survivor_friendly_fire_factor_normal 1 // Log Settings sv_logfile 1 sv_logbans 1 sv_logecho 1 sv_log_onefile 0 // Rate Settings rate 100000 sv_minrate 20000 sv_maxrate 30000 sv_maxcmdrate 100 sv_maxupdaterate 100 sv_minupdaterate 20 mp_disable_autokick 1 sv_allow_wait_command 1 sv_pausable 0 sv_pure_kick_clients 0 sv_pure 0 sv_cheats 1 sv_consistency 0 sv_maxcmdrate 101 l4d_100_enable 0 sm_cvar mp_autoteambalance 0 // Prevents some shuffling. sm_cvar sv_unlag_fixstuck 1 // Prevent getting stuck when attempting to "unlag" a player. sm_cvar z_brawl_chance 0 // Common Infected won't randomly fight eachother. sm_cvar sv_maxunlag 1 // Maximum amount of seconds to "unlag", go back in time. sm_cvar sv_forcepreload 1 // Pre-loading is always a good thing, force pre-loading on all clients. sm_cvar sv_client_predict 1 // This is already set on clients, but force them to predict. sm_cvar sv_client_cmdrate_difference 0 // Remove the clamp. sm_cvar sv_max_queries_sec_global 10 sm_cvar sv_max_queries_sec 3 sm_cvar sv_max_queries_window 10 sm_cvar sv_player_stuck_tolerance 5 sm_cvar sv_stats 0 // Don't need these. sm_cvar sv_clockcorrection_msecs 25 motd_enabled 0
This cfg is meant for you and your friends, which is why things like sv_cheats is at 1.

.BAT File
A .BAT file is an executable file that we're going to use to launch the server with special arguments that tell it what to do. Create a file named startserver.bat (name doesn't really matter) and place it in your main server folder (with srcds.exe).

Right click on the file, click Edit with Notepad, and copy paste the following info.
@echo off cls :srcds start /wait ./srcds.exe -game left4dead2 -console -autoupdate -port 27015 -secure -maxplayers 32 +map c8m1_apartment goto srcds

Configuring SM Admins
To add admins, edit the admins_simple.ini file, which is located in:
{YOUR_SERVER}/left4dead2/addons/sourcemod/configs/admins_simple.ini

Follow the instructions within the file to add your name and your friends names. You can do Steam IDs instead of a name for added security, but considering this server only is for your friends and will only be launched when you or your friends are on it, names should be just fine.
Starting Up
Execute your .bat file. It should launch the server. Once it says "VAC secure mode is activated.", you can type "sm plugins list" and see a list of all the plugins you have installed on the server. Note that this is only the SMX plugins and not the workshop addons.

Next, type "status". We'll use this to get the connect info to give to your friends.
Go to the UDP/IP line and find where it says "public". The IP after that (including the port (the numbers after the colon)) is the IP we'll give to our friends to use.

Important Note:
This is YOUR public IP. Malicious users could technically use this in a Denial of Service attack or use it to obtain your location. If you're uncomfortable with either of these, consider using a VPN.
Things to Remember
Chat Commands
/votemode - Vote to change game mode
!maps - Show map list to begin vote for changelevel (If changing both gamemode and map, change to map first and then gamemode (I think))
!acc - Show personal accuracy stats

Console Commands
l4d_100_enable - 0 or 1. Enable the constant horde mode


Misc Notes
Right click shove a bot on the specific item you want to take their item.

List of Custom Mutations and their Description

Have fun!