Difference between revisions of "VICE"

From Valve Developer Community
Jump to: navigation, search
m
 
(12 intermediate revisions by 9 users not shown)
Line 1: Line 1:
==Default Key==
+
{{toc-right}}
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.
 
==Availability==
 
The source code of a Steam dependent version of '''VICE''' is available in the Source SDK.
 
  
There are multiple [[#Modified versions|modified versions]] available, each often improving on the previous. You may wish to take a look at them, as they may save you some hassle.
+
'''Vice''' is Valve's tool for [[ICE]] encryption, a trick used mainly to protect weapon script files from modification by server admins. Only its source code is included in the SDK. The compiled executable must be placed in the SDK's <code>bin\<engine>\bin\</code> folder to run.
  
You can download the vice standalone application with wildcard support from [http://kramer.customrealms.com/ts2do/vice.zip here].
+
{{tip|You can find and set the encryption key for your mod in your [[GameRules]]' <code>GetEncryptionKey()</code> function.  All keys must be eight characters long! Valve keys can be found on [[ICE]] page.}}
 +
 
 +
== Usage ==
 +
vice [-quiet] [-nopause] [-encrypt key] [-decrypt key] [-newext name] file ...
 +
;-quiet
 +
:Don't print anything out, don't pause for input.
 +
;-nopause
 +
:Don't pause for input.
 +
;-encrypt
 +
:Encrypt files with given key.
 +
;-decrypt
 +
:Decypt files with given key.
 +
;-newext
 +
:New output file extension.
  
 
==Troubleshooting==
 
==Troubleshooting==
Most users who try Steam will get a ''problematic SteamAppId'' error.  This is due to Steam filesystem update inconsistancy. It stripped one word from the gameinfo.txt and didn't notify anyone.  In order to use these Steam applications you must go to the root folder of your mod or the game you want to modify, and change ''ToolsAppID'' to ''AppID''.  This will allow you to use both versions of vice and a few more programs like mdldecompiler.  You must also make sure that your mod or game is selected in vconfig.  If you edit your mod's gameinfo file and have [[Half-Life 2]] selected in [[vconfig]] you will not be doing much.
 
  
If you are decrypting Valve games and not your own mods, then you will have to make this change each time you want to use vice or any other applications that give the same message.  For each time you run say, [[Day of Defeat: Source]], it creates a new GameInfo.txt file that still include ''Tools''.
+
{{todo|Is this still a problem today?}}
  
==Execution==
+
Most users who try Steam will get a ''problematic SteamAppId'' error.  This is due to Steam filesystem update inconsistency. It stripped one word from the gameinfo.txt and didn't notify anyone.  In order to use these Steam applications you must go to the root folder of your mod or the game you want to modify, and change ''ToolsAppID'' to ''AppID''This will allow you to use both versions of vice and a few more programs like mdldecompiler. You must also make sure that your mod or game is selected in vconfig. If you edit your mod's gameinfo file and have [[Half-Life 2]] selected in [[vconfig]] you will not be doing much.
Execute this in the command prompt to make the .ctx files:
 
  "[Source SDK Bin]\vice.exe" -x .ctx -k [Key: x9Ke0BY7 by default for HL2DM mods] [.txt filename (Use * for all files in the current directory)]
 
  
==Changing the Key for Your Mod==
+
If you are decrypting Valve games and not your own mods, then you will have to make this change each time you want to use vice or any other applications that give the same message. For each time you run say, [[Day of Defeat: Source]], it creates a new GameInfo.txt file that still include ''Tools''.
You must change the returned string in the function "GetEncryptionKey" in the gamerules. The new encryption key ''must'' be eight characters long. Use the same encryption key when running VICE.
 
  
==Decrypting Script Files==
+
== Alternatives ==
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" -d -x .txt -k [Key: x9Ke0BY7 by default for HL2DM mods] [.ctx filename (Use * for wildcard)]
 
  
==Modified versions==
 
 
* [[Using Vice without Steam|Standalone Vice]] (doesn't require Steam)
 
* [[Using Vice without Steam|Standalone Vice]] (doesn't require Steam)
 
* [[User:Red comet|Red comet]]'s [[Vice Standalone With Wildcards|Standalone Vice with wildcard support]] (Vice2)
 
* [[User:Red comet|Red comet]]'s [[Vice Standalone With Wildcards|Standalone Vice with wildcard support]] (Vice2)
 
* [[User:RavuAlHemio|RavuAlHemio]]'s [[User:RavuAlHemio/Vice_with_better_wildcard_handling|Standalone Vice with improved wildcard support]] (Vice3)
 
* [[User:RavuAlHemio|RavuAlHemio]]'s [[User:RavuAlHemio/Vice_with_better_wildcard_handling|Standalone Vice with improved wildcard support]] (Vice3)
  
==See Also==
+
==See also==
 +
 
 
* [[CTX]]
 
* [[CTX]]
 
* [[CtxConverter]]
 
* [[CtxConverter]]
 
* [[ICE]]
 
* [[ICE]]
 
* [[Using Vice without Steam]]
 
* [[Using Vice without Steam]]
 +
* [[Weapon script]]
 +
 +
== External links ==
 +
 +
* [http://www.mediafire.com/?q4dqbs554p494vk (mediafire)L4D2 VScript Editor Beta 0.5 by Cynick:support nut (de)compile for l4d2]
 +
 +
{{SDKTools}}
  
[[Category:Glossary]] [[Category:Tools]] [[Category:Tutorials]]
+
[[Category:Glossary]]
 +
[[Category:Tutorials]]

Latest revision as of 06:16, 1 August 2017

Vice is Valve's tool for ICE encryption, a trick used mainly to protect weapon script files from modification by server admins. Only its source code is included in the SDK. The compiled executable must be placed in the SDK's bin\<engine>\bin\ folder to run.

Tip:You can find and set the encryption key for your mod in your GameRules' GetEncryptionKey() function. All keys must be eight characters long! Valve keys can be found on ICE page.

Usage

vice [-quiet] [-nopause] [-encrypt key] [-decrypt key] [-newext name] file ...

-quiet
Don't print anything out, don't pause for input.
-nopause
Don't pause for input.
-encrypt
Encrypt files with given key.
-decrypt
Decypt files with given key.
-newext
New output file extension.

Troubleshooting

To do: Is this still a problem today?

Most users who try Steam will get a problematic SteamAppId error. This is due to Steam filesystem update inconsistency. It stripped one word from the gameinfo.txt and didn't notify anyone. In order to use these Steam applications you must go to the root folder of your mod or the game you want to modify, and change ToolsAppID to AppID. This will allow you to use both versions of vice and a few more programs like mdldecompiler. You must also make sure that your mod or game is selected in vconfig. If you edit your mod's gameinfo file and have Half-Life 2 selected in vconfig you will not be doing much.

If you are decrypting Valve games and not your own mods, then you will have to make this change each time you want to use vice or any other applications that give the same message. For each time you run say, Day of Defeat: Source, it creates a new GameInfo.txt file that still include Tools.

Alternatives

See also

External links