VICE: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
==Default Key==
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.
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.
 
==Changing Encrypted Weapon Scripts==
 
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.
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.
 
==Obtaining '''VICE'''==
The source code of '''VICE''' is available in the Source SDK.  A compiled version of '''VICE''' can be downloaded [http://articles.thewavelength.net/uploads/704/vice.zip here in a zip file].
The source code of '''VICE''' is available in the Source SDK.  A compiled version of '''VICE''' can be downloaded [http://articles.thewavelength.net/uploads/704/vice.zip here in a zip file].
 
==Execution==
 
 
Execute this in the command prompt to make the .ctx files:
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)]
  "[Source SDK Bin]\vice.exe" -encrypt [Key: x9Ke0BY7 by default] -newext .ctx [.txt filenames (Use * for wildcard)]
 
==Changing the Key for Your Mod==
 
* 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'''.
: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==
 
 
* 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:
: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)]
  "[Source SDK Bin]\vice.exe" -decrypt [Key: x9Ke0BY7 by default] -newext .txt [.ctx filenames (Use * for wildcard)]

Revision as of 06:30, 20 October 2005

Default Key

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.

Changing Encrypted Weapon Scripts

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.

Obtaining VICE

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

Execution

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 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)]

See Also