Fixes & Performance

Cyrillic Support in Killing Floor

Guide to configuring Cyrillic (Russian text) display in Killing Floor.

Cyrillic Display Issues

In some versions of Killing Floor, problems with Cyrillic display may occur — instead of Russian text, symbols like ~~~~~ or empty spaces are displayed.

Solving the Problem

Method 1: Using a Ready-Made Patch

The easiest way is to use a ready-made patch for Cyrillic support:

  1. Download the patch for your game version.
  2. Extract files to the game's System folder.
  3. Launch the game.

Method 2: Manual Configuration

If you want to configure Cyrillic support manually:

  1. Set the game language to any language other than Russian in Steam library (e.g., right-click on the game → Properties → Language → English).

  2. Open the game's System folder.

  3. Edit the following files:

    • Engine.int
    • GUI2K4.int
    • KFMod.int
    • ROEngine.int
    • UnrealGame.int
    • XInterface.int
  4. In each file, find lines with font settings and replace them according to instructions for your game version.

Font Configuration

For proper Cyrillic display, you need to use fonts that support Cyrillic characters. Usually used:

  • Arial
  • Tahoma
  • Verdana

Verification

After applying the patch or configuration:

  1. Launch the game.
  2. Check text display in the menu.
  3. Check text display in the game.
  4. If problems persist, check that all files were changed correctly.

Important Notes

  • Make backup copies of files before changing.
  • After game updates, the patch may need to be reinstalled.
  • Some server modifications may affect text display.

Garbled Russian nicknames on a server (for admins)

Based on the killingfloor.ru forum threads "Исправление русских имен" (fixing Russian names) and "Фиксируем ники игроков" (fixing player nicknames). Using a test mutator, Flame found that Russian letters in a nickname arrive from Steam with different codes, and built a mapping table: for example "а" arrives as 176 and must become 224, "А" is 1106 and 192, "я" is 1039 and 255 (the full table is in the thread). The correct character comes from the table code plus an offset of 848. To avoid yet another mutator he edited ServerPerks: at the end of ServerPerksMut.ServerStStats.PostBeginPlay add

PlayerOwner.PlayerReplicationInfo.PlayerName = ConvertSteamString(PlayerOwner.PlayerReplicationInfo.PlayerName);

plus the conversion function:

function string ConvertSteamString(string msg)
{
 local int i;
 local string tmp;
 local string result;
 local int code;
 tmp=msg;
 for(i=0; i<Len(msg); i++)
 {
 code=Asc(tmp);
 if(code==1056 || code==1057)
 {
 tmp=Mid(tmp,1);
 continue;
 }
 code=FixCode(code);
 if(code>167)
 code+=848;
 if(i==0) result=Chr(code);
 else result=result$Chr(code);
 tmp=Mid(tmp,1);
 }
 return result;
}

FixCode(code) is a switch over the same table (case 176: return 224;, case 1106: return 192; and so on). In the same thread khasky posted an alternative, a GetLatinCharFromCyrillic function that turns Russian letters into transliteration (for example case 1920: case 1072: return "a";); he guessed (adding that he might be wrong) that pirated clients use a different character encoding.

Limitations from the discussion: on kok-s's server a player's nickname was first fixed to a readable one after joining and then turned into ~~~~~; on the 1065 client the conversion did not work for one admin (it worked for Flame). Flame separately warns owners of servers with a remote database that ServerPerksHost.exe cannot handle Cyrillic: a locked Cyrillic nickname turns into garbage the next time the player joins. For them he made the RestoreFixedNameMut mutator (used together with FixSteamRusNameMut): it locks, in RestoreFixedNameBase.ini on the server, the nicknames of everyone who stayed until the end of the map.

Locking a nickname. In the second thread Flame locked a player's nickname for good: add var config string uname; to ServerPerksMut.StatsObject (for a remote database, uname must also be added to GetSaveData() and to the parsing in SetSaveData()); the nickname is saved after the map ends (win or loss), and only for players on the server at that moment. Only an admin can change a locked nickname, in the database.

Additions

Cyrillic in WebAdmin (the "WebAdmin и кириллица" thread, Flame). The WebAdminCyrillicMut mutator swaps a couple of WebAdmin classes (XWebAdmin.UTServerAdmin gets its own QueryHandlerClasses[0] and SpectatorType), after which you can both write and read Russian in WebAdmin on Windows and Linux. The text is shifted by 848 character codes depending on who sends and who receives the message. The ini has one setting, isWindows: true for a Windows server, false otherwise. The mutator was tuned for this encoding in UWeb.int:

[WebResponse]
CharSet="windows-1251"

For one admin everything turned into garbage after installing it; the cause was a typo in UWeb.int (CharSet="Windovs-1251"), which made WebAdmin fall back to the default iso-8859-1 encoding. Once fixed, everything worked.