Enemy Territory – Cannot Adjust Gamma (Brightness)

Windows 8 Logo

I just installed Enemy Territory on Windows 8.1 and ran into a problem – I could not adjust the brightness (gamma) in the game. The slider would work and the brightness would flicker but then return to the default value.

I tried adjusting the Compatibility mode for the game and tried adjusting the gamma using the console in game:

/set r_gamma 1.5
/r_ignorehwgamma 1

The error in the console was this:

set DeviceGammaRamp failed

The solution turned out to be very simple – just turn off f.lux and everything was OK again!

If you have not heard of f.lux before it is a program that makes the color of your computer’s display adapt to the time of day.

Ubuntu 10.4 Lucid – Basic Left 4 Dead 2 Dedicated Server Setup

Setting up a dedicated server for Left 4 Dead 2 (L4D2) is almost exactly the same as Left 4 Dead (L4D) which I covered a while ago.

I knew that L4D2 would take up more space and so I started out with a 15Gb virtual hard drive this time. After installing a minimal virtual machine, open-vm-tools and L4D2 I had 4.6Gb of free space. Hopefully that will remain enough!

First update Ubuntu Server:

sudo apt-get update
sudo apt-get upgrade

If you do not have wget installed then install it as follows:

sudo apt-get install wget

Create a new folder for downloading and installing L4D2:

mkdir hlds

Download the hldsupdatetool from Valve:

wget http://www.steampowered.com/download/hldsupdatetool.bin

Make hldsupdatetool.bin executable:

chmod +x hldsupdatetool.bin

Run the hldsupdatetool:

./hlsupdatetool.bin

Type yes to the agreement and then press enter to continue.

Now make Steam executable:

chmod +x steam

Run Steam to download the Left 4 Dead files:

./steam -command update -game left4dead2 -dir /home/username/hlds

Note: you will most likely be prompted to run the last command again as the first time it runs it will update steam and not install Left 4 Dead.

Left 4 Dead files will now install to /home/username/hlds/left4dead2/ – this may take some time, so you may want to make a cup of tea. Once Left 4 Dead 2 has installed we need to to create a server configuration file called server.cfg and a script to run the server.

Create files called server.cfg and autoexec.cfg in the following location /home/username/hlds/left4dead2/left4dead2/cfg:

cd /hlds/left4dead2/left4dead2/cfg
touch server.cfg
touch autoexec.cfg

A basic server.cfg should look something like this:

hostname "Left 4 Dead"
rcon_password "myrconpassword"
sv_allow_lobby_connect_only 0
sv_password "mypassword"
  • You can change the hostname to whatever you want.
  • The rcon_password is for remote administration of Left 4 Dead when the server is running.
  • sv_allow_lobby_connect_only 0 allows for players to connect directly to your server without using the Left 4 Dead lobby system.
  • sv_password sets a password for gamers to play on your server.

In autoexec.cfg we will set the default difficulty for the server to normal with the following line:

z_difficulty normal

Note: z_difficulty normal can be changed to easy, hard, or impossible.

Next create a script in your /home/username/ directory to run the game server:

touch startl4d2server.sh

The script is as follows:

#!/bin/bash
cd /home/username/hlds/left4dead2
./srcds_run l4d -autoupdate -console -maxplayers 8 + sv_lan 0 +hostip
xx.xx.xx.xx +ip xx.xx.xx.xx +hostport 27015 +exec server.cfg +map
c1m1_hotel
  • -console: This will display a console that you can type commands into.
  • -game left4dead2: This specifies that the server will run L4D2.
  • -maxplayers 8: This will specify the maximum number of players the server will allow, setting it to 8 should allow you to use versus mode, otherwise set it to 4 for survivors only gameplay.
  • -autoupdate: This will make the server check and update to the latest version when you launch it but this needs a manual fix to work properly.
  • +hostip: where xx.xx.xx.xx is your internet address.
  • +ip: where xx.xx.xx.xx is your Ubuntu server static IP address. .
  • -port 27015: This will specify the port for the server to run on – 27015 is the default port.
  • +sv_lan 0: This will force the server to run on the internet instead of just on a LAN.
  • +map c1m1_hotel: This will specify the map that the server will start with (and must be configured). You will find all the available map names on your server here: /home/username/hlds/left4dead2/left4dead2/maps

Make your startl4d2server script executable:

chmod +x startl4d2server.sh

At this point you can run the server as follows:

./startl4d2server.sh

To connect to the server from your (LAN) PC you will need to enable the “Developer Console” in the game options as follows:

At the main menu select Options then Keyboard/Mouse followed by the Allow Developers Console option.

You can then use the ~ key to bring up the console and then type:

connect xx.xx.xx.xx

Note: xx.xx.xx.xx is the LAN IP address of the server.

To allow internet users to connect you will need to open port 27015 directly to the server LAN address. Friends connecting from the internet will then be able to connect to the WAN ip address of your server using the password that you provided them.

Note: if your router supports it you may be able to dispense with +ip and +hostip in your startl4d2server.sh script.

Left 4 Dead: The Sacrifice – DLC for L4D and L4D2

Valve will release new down-loadable content (DLC) called “The Sacrifice” for Left 4 Dead and Left 4 Dead 2 on October 5th. This DLC will be free for PC gamers!

“The Sacrifice” is a prequel to “The Passing” and includes the original Left 4 Dead survivors as they fight their way south. The Sacrifice campaign will be playable in Campaign, Versus, and Survival modes. There will also be a new finale where players have to decide who will sacrifice themselves so that the other survivors may live.

Left 4 Dead 2 players will get to play The Sacrifice with L4D2 Special Infected and weapons, as well as being able to play in Scavange mode. L4D2 players will also get the “No Mercy” campaign from L4D1 which, again, will be played with the L4d1 survivors.

The Sacrifice also boasts five new achievements.

Personally, I am really looking forward to playing “No Mercy” on L4D2!

Windows 7 x64: Running Steam In Windows Compatability Mode Is Not Recommended

All of a sudden today, I booted my Windows 7 machine and got the following message when Steam tried to run:

So I checked the properties for Steam.exe and found that compatability mode was off:

Thankfully fixing this problem was quite straight-forward though:

  • Click Start, type regedit and then press the Enter key
  • In the left hand pane of Regedit navigate to the following key: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
  • In the right hand pane delete the string for Steam.exe

Once I had done this I was able to start Steam normally.

According to Edugeek there is a second registry key that you can try if there is not a Steam.exe entry in the one listed above:

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

Thanks to Edugeek for the fix!

Left4Dead 2 – Server Is Enforcing Consistency For This File: left4dead2/pak02_dir.vpk

For some reason I just encountered this error in Left4Dead 2 – fortunately the fix was fairly straightforward – I just needed to install Left 4 Dead 2 Add-on Support.

Right click on the Steam icon in the system tray and click Library.

Now click on the Tools link.

Look for Left 4 Dead 2 Add-on Support in the list.

If it is not installed then simply Install it. If the install is incomplete, right click it, and then select Delete Local Content and then reinstall it.

Thanks to Goathief on the Steam forums for the fix.

Ubuntu 10.4 Lucid – How to Setup Up “Xfire” on Ubuntu

Xfire is an instant messenger for Gamers – it integrates into games and enables in-game voice and text chat (amongst other things).

Sadly Xfire is a Windows only application – but we can get (some) Xfire functionality by installing the gfire plugin for Pidgin (the default instant messaging client on Ubuntu).

Installing gfire is very simple, simply click Applications, Accessories and then Terminal and enter the following:

sudo apt-get update
sudo apt-get install gfire

Next launch Pidgin – click Applications, Internet and then Pidgin.

Now we simply need to configure Pidgin with an Xfire account – if you do not have one you can create it at: http://www.xfire.com/download/.

Simply select Xfire as the protocol and then enter your Xfire username and password. Check the Remember password box and then enter your Local alias (i.e. your gamer tag).

Pretty simple eh?

Left 4 Dead: SourceMod – Linux Installation

Why would you want SourceMod on your Left 4 Dead server?

Well it can help you administer your server in game and you can also install additional plugins with it. This is what it looks like in game …

Installation consists of copying files to your server so you will need ftp or SSH access to your server. Before you do this you will need to confirm your Steam ID for use later – simply join a server and then open the console and then type the following and hit enter:

status

The result will give you your Steam ID. Copy and paste it from the console and save it for later.

Next download Metamod to your computer and extract the files. Copy the addons folder to your left4dead folder on your server. On my server this is /home/user/hlds/l4d/left4dead.

Now you need to generate a vdf file – choose Left4Dead as the game type and leave the gamefolder blank to download the correct file (click Generate Metamod VDF). Upload this file to the addons folder on your server. On my server this is /home/user/hlds/l4d/left4dead/addons.

Next download SourceMod and extract the files. Copy the contents of your addons folder to the addons folder on the server. On my server this is /home/user/hlds/l4d/left4dead/addons. Copy the contents of the cfg folder to the cfg folder on the server. On my server this is /home/sxl4d/user/l4d/left4dead/cfg.

Now we just need to grant ourselves some admin rights by editing the addons/sourcemod/configs/admins_simple.ini file. On my server this is /home/user/hlds/l4d/left4dead/addons/sourcemod/configs/admins_simple.ini.

At the bottom of the file just add the following line where the Steam ID is the one you saved earlier:

"Steam ID" "bcdefghijklmn"

The Steam ID specifies a player and the next field specifies permissions as per the following table:

Simply reboot the server and you are good to go – connect to your server, open the console and type the following to view the in-game admin menu:

sm_admin
Thanks to KingJulian on this thread for many of these details …