VICE

From Valve Developer Community
Revision as of 20:32, 6 July 2005 by Ts2do (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

"ICE" is the type of encryption Valve uses for weapon scripts with the extension .ctx.


If you do not know the encryption key of your mod, it's probably x9Ke0BY7 (the default for HL2DM). You should encrypt your script files so they can not easily be changed by users.


To have the ability to change the weapon scripts, a mod user would have to delete the .ctx files and create the .txt files from scratch. This makes your mod more resistant to change, which means hosted servers won't as likely have changed the weapon scripts.

The source code of VICE is available in the Source SDK. A compiled version of VICE can be downloadedhere in a zip file.


Execute this in the command prompt to make the .ctx files:

"[Source SDK Bin]\vice.exe" -encrypt [Key: x9Ke0BY7 by default] -newext .ctx [.txt filenames (Use * for wildcard)]


  • Changing the encryption key for your mod
You must change the returned string in the function "GetEncryptionKey" in the gamerules. The new encryption key must be eight characters long. This encryption key should be used when running VICE.


  • Decrypting script files
If you happen to lose your .txt files and you only have their .ctx files and your mod's encryption key, you can run VICE to decrypt also:
"[Source SDK Bin]\vice.exe" -decrypt [Key: x9Ke0BY7 by default] -newext .txt [.ctx filenames (Use * for wildcard)]