If you want to create a script that toggles a setting in a Source engine game like Left 4 Dead, you need to know the console variable name that controls it, but sometimes you don’t know. One way to figure it out is to blindly search using the “find” command to look for a command that looks like it controls what you need. The other way is to dump the cvar list to disk, change the setting in the GUI, dump the list again, and compare the two lists.
However the latter approach is not easy. There is a condump command but it only dumps a limited amount of text, and the cvarlist command displays too much text for the console to hold (or dump).
However, taking advantage of the fact that cvars always start with a letter, we can brute force this. First, clear any condump*.txt files from your Source engine mod folder (For Left 4 Dead, it’s Steam\common\Left 4 Dead\left4dead) and then run the following three commands in sequence:
clear; cvarlist a; condump; clear; cvarlist b; condump; clear; cvarlist c; condump; clear; cvarlist d; condump; clear; cvarlist e; condump; clear; cvarlist f; condump; clear; cvarlist g; condump; clear; cvarlist h; condump; clear; cvarlist i; condump clear; cvarlist j; condump; clear; cvarlist k; condump; clear; cvarlist l; condump; clear; cvarlist m; condump; clear; cvarlist n; condump; clear; cvarlist o; condump; clear; cvarlist p; condump; clear; cvarlist q; condump; clear; cvarlist r; condump clear; cvarlist s; condump; clear; cvarlist t; condump; clear; cvarlist u; condump; clear; cvarlist v; condump; clear; cvarlist w; condump; clear; cvarlist x; condump; clear; cvarlist y; condump; clear; cvarlist z; condump
(Three lines of commands are needed since there is a limit to the length of one console command.)
Now you have 26 condump files in your Source mod folder. Move them to an empty temporary folder on your desktop or somewhere. Now change the setting you’re trying to find the cvar for and runt he console commands again to get another batch of 26 files. Move these to a SECOND temporary folder.
Then, download WinMerge (or use a similar file/directory comparison tool) and point it at both folders. Bam. It will instantly show you which dumped files changed, and you can then go into the files and see the changed values side by side.
20 responses so far ↓
1 Zahit Atacan // Jan 10, 2010 at 4:29 pm
Very Good. Thank you for information.
2 jay4 // Mar 26, 2014 at 1:25 pm
what if you use con_log instead condump?
3 viagra pills for men // Apr 22, 2020 at 4:14 am
viagra pills for men
Monitoring CVAR changes in the Source engine
4 cialis 20 mg best price // Apr 24, 2020 at 1:30 pm
cialis 20 mg best price
Monitoring CVAR changes in the Source engine
5 ciproxine // Apr 25, 2020 at 12:38 am
ciproxine
Monitoring CVAR changes in the Source engine
6 generic albuterol inhaler // Apr 27, 2020 at 6:09 am
generic albuterol inhaler
Monitoring CVAR changes in the Source engine
7 buy naltrexone online usa // Apr 30, 2020 at 1:14 pm
buy naltrexone online usa
Monitoring CVAR changes in the Source engine
8 tylenol otc // May 9, 2020 at 3:41 am
tylenol otc
Monitoring CVAR changes in the Source engine
9 chloroquine cost us // May 27, 2020 at 3:12 am
chloroquine cost us
Monitoring CVAR changes in the Source engine
10 buy hydroxychloroquine // Jun 3, 2020 at 3:57 am
buy hydroxychloroquine
Monitoring CVAR changes in the Source engine
11 sildenafil viagra without a doctor prescription // Jun 29, 2020 at 5:18 pm
sildenafil viagra without a doctor prescription
Monitoring CVAR changes in the Source engine
12 buy cialis online no prescription // Jul 1, 2020 at 6:14 pm
buy cialis online no prescription
Monitoring CVAR changes in the Source engine
13 us pharmacy viagra // Jul 11, 2020 at 1:18 pm
us pharmacy viagra
Monitoring CVAR changes in the Source engine
14 generic latisse careprost // Jul 14, 2020 at 10:19 am
generic latisse careprost
Monitoring CVAR changes in the Source engine
15 buy cialis online // Jul 14, 2020 at 8:57 pm
buy cialis online
Monitoring CVAR changes in the Source engine
16 all about viagra // Jul 26, 2020 at 11:03 am
all about viagra
Monitoring CVAR changes in the Source engine
17 buy brand viagra // Aug 2, 2020 at 7:31 pm
buy brand viagra
Monitoring CVAR changes in the Source engine
18 buy hydroxychloroquine online // Aug 9, 2020 at 5:40 am
buy hydroxychloroquine online
Monitoring CVAR changes in the Source engine
19 cialis no prescription // Sep 22, 2020 at 4:43 am
cialis no prescription
Monitoring CVAR changes in the Source engine
20 viagra 100mg // Sep 24, 2020 at 8:09 am
viagra 100mg
Monitoring CVAR changes in the Source engine
You must log in to post a comment.