Getting TF2 to work with a G15 (or G13, or G19) display
Posted on: January 14th, 2010 by cmptrwzIt is fairly well known at this point that TF2 has Logitech G15 LCD support. When it was discovered people rejoiced!
Then they found out it didn’t work. Apparently the source engine has G15 support, and they didn’t ship all the pieces with TF2.
But you can rejoice, for the secret of getting TF2 to work with a G15 (and, as a result, G13 and G19) has been discovered!
Requirements:
- Steam
- Team Fortress 2
- Zeno Clash (The Demo will work, and is what I tested with)
Recommended:
Basic Setup
First, install Steam, Team Fortress 2, and Zeno Clash (or the demo). Run Team Fortress 2 and Zeno Clash (or the demo) at least once.
Once you have done so, open up
steam install dir\SteamApps\common\zeno clash\bin\
(or the zeno clash demo folder) and copy g15.dll.
Next, open up
steam install dir\SteamApps\your username\team fortress 2\bin\
and paste the g15.dll file there. If the folder now contains “client.dll”, “server.dll”, and “g15.dll” you found the wrong bin folder. Go up a couple of directories and try again.
Now that the DLL is there, all that is left is to tell TF2 to load it. Open up steam, go to your games list, and right-click on TF2. Select properties, then hit “Set launch options…”. There you need to add -g15 to the list of options. (Side note, I recommend “-novid -g15″ at a minimum.) Hit OK, then hit Close.
Run TF2, and you have a working health/ammo display on your G15, once in a server anyway.
TAKE NOTE: Getting the Zeno Clash g15.dll file may no longer be needed if Valve ever includes it in an update for TF2. The -g15 command line parameter will likely still be needed. This blog entry may or may not be updated should that ever happen.
Making it look better
Unfortunately, there is at least one problem. The TF2 logo is missing when you aren’t in a server!
Pop open GCFScape and open up “team fortress 2 content.gcf” in the SteamApps folder:
steam install dir\SteamApps
In there you should find a tf\resource folder. In there right-click on game_1bpp.ico and select “Extract”.
In the Browse for Folder dialog find your tf directory:
steam install dir\SteamApps\your username\team fortress 2\tf
If you already have a resource directory there then select it. Otherwise select the tf folder and then click on “Make New Folder”, entering “resource” for the name, then select it. Hit OK.
Now when on the “title” page a really crappy black and white TF2 logo will appear, which is strangely an improvement over the blank space that was there before.
Viewing other pages
The First two buttons on the G13/G15 under the display (or on the G19, the left and right arrow buttons) control what page is shown when TF2 is running. The left one changes the page, the right one changes the sub page. And there is a difference.
The pages are, by default and as of this writing:
- Title – Only shown when NOT in a game
- Health/Weapon Info
- My Team (Dead/Alive)
- Scoreboard Data (Score/Deaths/Ping)
- Chat
Aside from the title and Health/Weapon pages, the other pages will likely not hold everything in the 4 lines or so you can cram onto the display. Hence sub pages to, for lack of a better term, “scroll” the page.
Customization
While you were in GCFScape you may have noticed a g15.res file, a couple of lines above the game_1bpp.ico file. If you put that in the same resource folder as the game_1bpp.ico file you can customize what your G15 shows you when in game.
To do so, open it up with a text editor.
You will notice that the file is in KeyValues format. If you don’t know what that is I suggest looking it up quick, or just following along to figure it out as you go. A //, at the very least, represents a comment, but you cannot use /* */ commenting for multi-line or mid-line comments.
I suggest leaving the “icons” section alone, as well as the “game” and “chatlines” values above it. The “replace” block, however, can be very useful. All replacements are applied last, just before the values are crammed into the defined fields. This allows for some interesting tricks. For example, you can change “Jar Based Karate” to “Jarate” with a single line. What is being replaced is on the left, what it is replaced with is on the right. Use “” for “replace with nothing” on the right. For example, I added:
"Flame Thrower" "Flamethrower" " Launcher" "" "Jar Based Karate" "Jarate" "Battle Banner" "Partyhorn"
Although to my disappointment the Battle Banner doesn’t normally show up when selected. Bummer. The ” Launcher” one shortens the names of the Rocket Launcher, Stickybomb Launcher and Grenade Launcher weapons all in one go.
After the “replace” section you will find the pages. I suggest leaving the title page, the first page there, alone. In fact, I recommend doing ALL of your customization to the default page when playing, the first page, just after the title page. The one that contains your health/ammo values.
By default, that page looks like this:
"page" // Player health/wpn info { // Only show this if the player has a player entity in the game "requiresplayer" "1" "static_text" { "size" "medium" "align" "left" "x" "10" "y" "4" "w" "150" "text" "Team: team_%(localteam)m_szTeamName%" } "static_icon" { "x" "144" "y" "4" "w" "16" "h" "16" "name" "icon_%(localteam)m_szTeamName%" } "static_text" { "size" "medium" "align" "left" "x" "10" "y" "18" "w" "150" "text" "Health: - %(localplayer)m_iHealth% -" } "static_text" { "size" "medium" "align" "left" "x" "10" "y" "32" "w" "150" "text" "(weapon_print_name): - (ammo_primary) -" } }
Basically, that means put “Red” or “Blue” in the upper left, a non-existent icon in the upper right, your current health to the left in the middle, and your current weapon with ammo under your health. I didn’t like that.
I won’t go into all the details of how to put information, largely because most of it is useless, but here is a handy list of ones I find useful:
- (ammo_primary)
- Current weapon’s primary ammo, AKA the current “in the clip” ammo, or for single reload/non-reloading weapons all of it.
- (ammo_secondary)
- Reserve ammo for the current weapon. Will be 0 for a number of weapons.
- (weapon_print_name)
- Current weapon’s name
- %(localplayer)m_iHealth%
- Current health
- %(localteam)m_szTeamName%
- Current team name (valve prefixed this with team_ for replacement above, or with icon_ for the non-existent icons)
- %(localplayer)m_iAmmo[1]%
- Primary weapon ammo
- %(localplayer)m_iAmmo[2]%
- Secondary weapon ammo
- %(localplayer)m_iAmmo[3]%
- Metal (100 for everyone but Engineer, who can actually USE metal)
Due to the way things work, I recommend something like this:
"page" // Player health/wpn info { // Only show this if the player has a player entity in the game "requiresplayer" "1" "static_text" { "size" "medium" "align" "left" "x" "10" "y" "4" "w" "100" "text" "H: %(localplayer)m_iHealth%" } "static_text" { "size" "medium" "align" "right" "x" "110" "y" "4" "w" "50" "text" "team_%(localteam)m_szTeamName%" } "static_text" { "size" "medium" "align" "left" "x" "10" "y" "18" "w" "150" "text" "(weapon_print_name): (ammo_primary) / (ammo_secondary)" } "static_text" { "size" "medium" "align" "left" "x" "10" "y" "32" "w" "150" "text" "A: P: %(localplayer)m_iAmmo[1]% S: %(localplayer)m_iAmmo[2]%" } "newsubpage" "1" "static_text" { "size" "medium" "align" "left" "x" "10" "y" "4" "w" "100" "text" "H: %(localplayer)m_iHealth%" } "static_text" { "size" "medium" "align" "right" "x" "110" "y" "4" "w" "40" "text" "team_%(localteam)m_szTeamName%" } "static_text" { "size" "medium" "align" "left" "x" "10" "y" "18" "w" "150" "text" "(weapon_print_name): (ammo_primary) / (ammo_secondary)" } "static_text" { "size" "medium" "align" "left" "x" "10" "y" "32" "w" "150" "text" "A: P: %(localplayer)m_iAmmo[1]% S: %(localplayer)m_iAmmo[2]% M: %(localplayer)m_iAmmo[3]%" } }
This creates two pages (see that “newsubpage” “1″ thing? That says make a new sub page). The first will show your team in the upper right, your health in the upper left, your current weapon with ammo below your health, and your current ammo supplies for primary and secondary below your current weapon. If you hit the sub page change button it will toggle your metal showing up. It does away with the – around the health/ammo, and removes the non-existent icon. It could likely use some work, but it works well enough for me.
I would go into more detail, but there is only so much I can say I know in the day I have messed with this. I know that x is horizontal position and y is vertical, that w is for width and h is for height. The align value can be left, right, or center, and I have seen small, medium, and big sizes. Yes, big, not large.
You apparently CAN’T show cloak, rage, or charge levels properly, nor can you show ubercharge levels, or easily show your own ping. I tried all of that already.
January 29th, 2010 at 5:40 am
well played sir.
February 20th, 2010 at 4:17 pm
You are great!!!! I will try
February 21st, 2010 at 2:01 am
Hello
is there any way you could post to have the following layout in 1 page using 2 columns:
page1
team blue
player status player status
john alive bill dead
richard alive carl alive
page2
team red
player status player status
……..
even if names are cut it is not important to me
I would like to have a page for my team and one for the enely team
What is really important is to know in 1 page in a 6vs6 match who is dead and who is alive of each team. I am trying to modify your file but it doesnt seems to react to my modifications.
thanks
February 22nd, 2010 at 9:16 am
There is no way to get two columns like that based on team the way the system currently works, to my knowledge. Valve just hasn’t added support for any way to do that within the system.
February 22nd, 2010 at 10:59 am
Thanks cmptrwz, apparently you are the only one on the net who thought about getting the expensive g13 to do more than just having the time on its lcd for tf2.
If that option is not possible at this point I would even accept something like having on the same line the status of all the players (I am not even interested about the names)
exemple
D D A A D D A ….
where D stands for died and A for alive (I took your advice and could already replace Alive with the letter A)
Alternatively I would be interested in the the number of alive VS tot players for each team
exemple
16 out of 20 team blue
7 out of 20 team red
Is there any way to do it?
I would appreciate if you add me in Steam as friend we could have a short chat about it when you are available.
My name is: n!G³| Niceday!
Thanks again
February 22nd, 2010 at 12:17 pm
You can only get your team or all players. You can’t filter on enemy team.
I also don’t think you can do horizontal columns like that in general, although I could be mistaken. Just rows.
There is nothing available for counting players at this point, by flags or otherwise, either. The options are very limited, and the chances of valve adding more before they ship the required DLL with TF2 are slim.
April 20th, 2010 at 4:47 pm
[...] ein wenig Handarbeit die komplette Ausgabe nach seinen Vorlieben anpassen. Infos hierzu gibts im TF2 Newbs Blog wo ich auch die ganze Geschichte gefunden [...]
May 12th, 2010 at 11:01 pm
I love you with a passion
December 14th, 2010 at 4:09 am
Do you have some more screenshots of the keyboard? I currently use the tf2stats plugin which has some cool animations etc, however it doesn’t seem to be updated to include newer weapons or anything (http://www.smashd.de/TF2stats-G15-plugin/tf2stats-g15-plugin.html )
June 18th, 2011 at 10:25 pm
Woah. Will you da man!@