Tribes Winamp Monitor
Programmed by: Taurik (Sneeky)
Documentation and skin design by: Lucid
Hosted by Clan Orb - www.clanorb.com


Overview
Tribes Winamp Monitor is a program for online game players (particularly Tribes players) who wish to tell everyone in the server what song they're currently listening to on Winamp. The program will monitor the song you're listening to on Winamp 1.x, Winamp 2.x or Winamp 5.x, and keep a script containing the song's name up to date. You can then execute that script with your game. For example, it could be a .cs file executed by Tribes, or a .cfg file executed by Quake 2. The contents of the script and the script's filename are fully customizable. It can be used with any game or other software that can execute plain-text client side scripts. Optionally, the program can also update a file (containing the current song's name) on your website via FTP. This would be useful for forum signatures, blogs, etc.

If the game you're using can also write information to files, then you can take advantage of the (optional) Winamp Controls. This program can monitor a file (updated by your game) for special commands that can stop/play/pause the current song, etc. This means you could skip to the next song or go back to the previous song while playing your full-screen game. :)

Please note : In all of the following setups, the word %song will automatically get replaced with the actual song name when the script is made. Do not type any song names into this box. Also in all of the following setups your customized output quote should not contain double quotes > " < in the customizable part of the config. Your customizable quote may be contained within 2 double quotes.
say "Im playing %song"
: Correct
say "Im playing "%song" " : Incorrect


Setting up the script for Tribes 1.


This document will assume you are setting up the script for use with Tribes. Click the Browse button next to the Save song to box, then type in a filename to start saving to. It should be in your config folder. Example:
C:\Dynamix\TRIBES\config\currentsong.cs

Then, in the File contents box, customize the contents of the script.  The red parts are required for this to work in Tribes 1.
Example:
say(0, "I'm listening to %song, and you should be too!");

Now click the Save Configuration button and load an MP3 with Winamp (if it isn't already running). Then go into Tribes and open your console by pressing the tilde key (~). Type exec("currentsong.cs"); (change currentsong.cs to whatever you named the script) into the console whenever you want to say the current song's name. As an alternative, you could bind a key to exec the script whenever you press it. This example will bind the F9 key:
bindCommand(keyboard0, make, "F9", TO, "exec(\"currentsong.cs\");");
 

Setting up the script for Tribes : Vengeance.


This works for the Tribes Beta

The path for your output file needs to be in the content\system directory. It is recommended you use the .cs ending to your file.
Tribes Vengeance\Content\System\song.cs

Then, in the File contents box we need to adjust this for the T:V engine. The red parts are required for this to work in T:V.
say "I'm listening to %song, and you should be too!"

Now click the Save Configuration button and load an MP3 with Winamp (if it isn't already running). Then go into Tribes:Vengeance and open your console by pressing the tilde key (Scroll Lock) (console must be enabled by adding -console to the end of your shortcut to Tribes:Vengeance.).

Set key to a desired key to trigger this. Set the filename to the filename alone. i.e. song.cs, do not include the path to the file.
set input <key> exec <filename>
example : set input f11 exec song.cs
 

Setting up the script for Quake 3.


This has been tested by Quake 3, but should work for all other quake games in the exact same way.

The path for this one must be in the mod folder for the mod your playing in q3. It is recommended you use the .cfg ending to your file.
Quake 3\baseq3\song.cfg

Then, in the File contents box, customize the contents of the script. The red parts are required for this to work in Quake 3.
Example:
say "I'm listening to %song, and you should be too!"

Now click the Save Configuration button and load an MP3 with Winamp (if it isn't already running). Then go into Quake 3 and open your console by pressing the tilde key (~).

Set key to a desired key to trigger this. Set the filename to the filename alone. i.e. song.cs, do not include the path to the file.
bind <key> exec <filename>
example : bind f11 exec song.cfg
 

Setting up the script for Steam (new half-life engine)


The path for this one must be in the mod folder for the mod your playing in steam. It is recommended you use the .cfg ending to your file, as this is the way most steam scripts are handled.
for Day of Defeat
Steam\SteamApps\your@email.here\day of defeat\dod\song.cfg
for Counterstrike :
Steam\SteamApps\your@email.here\counter-strike\cstrike\song.cfg
for Half-Life base :
Steam\SteamApps\your@email.here\half-life\valve\song.cfg

for Non-Steam Mods
(Specialists)
Steam\SteamApps\your@email.here\half-life\ts\song.cfg
(SvenCoop)
Steam\SteamApps\your@email.here\half-life\SvenCoop\song.cfg
(Natural Selection)
Steam\SteamApps\your@email.here\half-life\ns\song.cfg


Then, in the File contents box, customize the contents of the script. The red parts are required for this to operate properly for Steam.
Example:
say "I'm listening to %song, and you should be too!"

Now click the Save Configuration button and load an MP3 with Winamp (if it isn't already running). Then go into Steam and open your console by pressing the tilde key (~).

Set key to a desired key to trigger this. Set the filename to the filename alone. i.e. song.cs, do not include the path to the file.
bind <key> exec <filename>
example : bind f11 exec song.cfg
 

 

Other Games.


In the following games, we attempted to create a setup that would work properly with that game. We were unable to figure out how to get these to work in these games.

Battlefield 1942 & Battlefield Vietnam - Unable to get the game to exec an outside file.

Tribes 2 - Uses an excessively complicated console binding system, additionally , we were unable to figure out how to get tribes to exec a file despite being in the proper place.
 


Notes


This program only works with Winamp v1.x, v2.x, or v5.x. It does not work with Winamp 3. (Well, it might, with some command-line tinkering... but why not just upgrade? Heh.) Also, the option to "Scroll title in the Windows taskbar" must be off for this program to work. (Winamp -> Preferences -> General Preferences)
This program may not be fully compatible with Windows Millennium (Windows ME), but should work fine on 98/2000/XP.
Please note if a change you have done appears not to be working, try changing songs, or restarting the app.

Optional Winamp Controls (Advanced)
If you want, you can control Winamp from inside Tribes by using this program. When you type a filename into the Receive cmds from box, Winamp Monitor automatically checks that file every second to see if it contains any special commands. If it finds one, it executes that command and then deletes the file.

Warning: Any file you type into the Receive cmds from box will be deleted if it contains any commands that this program recognizes. I really shouldn't have to explain this, but just in case, don't do something like choose boot.ini to store your Winamp commands in.

With that out of the way, the commands are listed below. If the game you're using supports outputting data to files, then you can export these commands to an input file (which Tribes Winamp Monitor will then read).
WINAMP_PLAY - Starts playing the current song
WINAMP_STOP - Stops the current song
WINAMP_PAUSE - Pauses the current song
WINAMP_PREV - Plays the previous song on your playlist
WINAMP_NEXT - Plays the next song on your playlist
If you're using Tribes, I have included a pre-made script that creates functions you can call to export these commands. To use it, copy the file WinampFunctions.cs (in the same folder as this program) to your Tribes\config folder. Then add the line exec("WinampFunctions.cs"); to your autoexec.cs file. The Tribes functions it creates are:
winamp::play();
winamp::stop();
winamp::pause();
winamp::prev();
winamp::next();
You can now bind these functions to keys, to manipulate Winamp with the touch of a button from inside a full-screen Tribes game! For example, this line of code would make your F10 key play the next song on your playlist:
bindCommand(keyboard0, make, "F10", TO, "winamp::next();");

Optional Website Updating via FTP (Advanced)
If you want, Winamp Monitor can keep the song on your website up to date, as well as the song in your Tribes/Quake/etc game. To use this feature, you will need FTP access to your website. Click the FTP button on the main window, then:
  • In the Hostname/Address box, type the domain name or IP address that you use to FTP into your site. Example: yourdomain.com
  • In the Username box, type your username
  • In the Password box, type your password
  • In the Directory to u/l to box, type the folder name (on your website) that contains the song file you want to update. Don't specify the filename, just the directory. Example: /web/song
  • In the Filename box, type the name of the file that you want created/updated on your website. This file will contain only the current song name. Example: song.txt
  • Warning: If you use the FTP feature, your FTP password will be auto-saved to the configuration file, so you don't have to type it again next time. The password is protected by basic encoding only, and no encoding system is 100% uncrackable. This is fine if you're the only person who uses your computer, but don't use the FTP feature from a public terminal. By using the FTP feature, you agree that the creator of (and any contributer to) this program is not responsible for any data loss or other damage that occurs from its use. In short, if you think your friend might get on the computer and crack the password, please don't use the FTP feature.

    How it works: If you fill in all 5 text boxes in the FTP Options window, the feature is considered to be active. To disable the feature, make sure one or all of the boxes are empty. If it's enabled, the program will attempt to access your website via FTP and upload a new copy of the song file, whenever the song changes. If it's working, the program will not give you any error messages (and your website will get updated). If it doesn't work, check this troubleshooting list:
    Common Problems:
  • I get the error Can't call method "login" - This means that the FTP server you specified doesn't exist, or there was a problem connecting to it. Click OK (not Cancel) on the pop-up, then click the FTP button and make sure the Hostname/Address is correct.
  • I get the error Incorrect username or password - The user you specified doesn't exist, or the password for that user is wrong. Click the FTP button and verify the username/password.
  • I am using a personal firewall, and Winamp Monitor locks up - This happens with Kerio Personal Firewall, and presumably others. Symptom: You enable Website Updating, your firewall asks you if you want to allow the connection, you allow it, and Winamp Monitor freezes. Solution: Examine the firewall's alert message to ensure that Winamp Monitor is connecting to the site you asked it to, and then allow the connection. If the program freezes, Use the Task Manager (CTRL+SHIFT+ESC on Windows XP or 2000) to close winampmon.exe, then open your firewall's Application List and allow outgoing/incoming connections to Tribes Winamp Monitor.



  • Thank you for using Tribes Winamp Monitor! You can check for the latest version of this software, view screenshots, and send feedback by clicking here.