How to make a CVAR list for Web Pages

One of the most frustrating things I have ever done is to get the CVAR (commands) for Steam games on a tidy list. Sure you can just go to the console and type "cvarlist" and copy the text, it sometimes drops half of the list off, among other errors and it look crap on a web page. On your local PC it also registers some values as the default ... like video card settings, anything you have in config ends up too dirty.

So using a game server without any mods, a server.cfg with just a rcon password in it and a host name... You can make a clean one quick, well...after a learning curve! The below requires you have a SRCDS server and know how to use spreadsheets, I never said it was easy, it is accurate and quick.

Make an accurate CVAR list and display on a web page.

1. Only use a SRCDS server. Your client files will be full of your steam and game preferences.
2. Update the server.
3. Now take out all the items in the server.cfg and leave the host name and rcon password. (just in case it will alter some defaults)
4. Connect via HLSW and place "cvarlist log cvarlist.csv" in the console.
5. Go to the server directory "orangebox\tf" and download a file called "cvarlist.csv"
6. To view a .csv file you have to have a speedsheet viewer. I advise you use open office CALC instead of MS excel, it is better at making a single HTML file for web site use.
7. Open with CALC and if the text import screen comes up make sure the "Separator Options" has "Comma" box ticked, press OK.
8. It has all the data there but way too many columns of the CVAR type.
9. There is an unused column, ("S" but that could change) just before the description column, place a fomula to grab the data from the other columns and combine them in the spare one.

The formula looks like this you paste it in the spare cell like "S7"...
=C7&" "&D7&" "&E7&" "&F7&" "&G7&" "&H7&" "&I7&" "&J7&" "&K7&" "&L7&" "&M7&" "&N7&" "&O7&" "&P7&" "&Q7&" "&R7&""

Make sure when you paste that in that you press enter and don't click with the mouse! Clicking with the mouse will select a cell.

Now you can do a "Paste special" on the other cells.Copy the "S7" cell, highlight all the other cells, Right click and unclick the Paste all. Only select "Formulas" and press OK.

10. Make a new column beside the "Value" (column B). Select the "C" column right click and "Insert Columns".

11. You will notice the spare column has moved, it is now the next letter "T", copy that column.
12. Select column C and right click paste special but ONLY have the "Text" selected.
13. Delete columns that were the cvar types and your special spare column, should be "D" to "T".
14. Now you should have 4 columns. "Name", "Value", your combined cvar types, (call the column "Cvar types") and the "Help Text".

The next bit is how to make that a HTML page.

Just save it as a HTML page, open it, fool around with the background, cel boarders, fonts until you are happy.



Enter Amount Copyright © 2011. All Rights Reserved.