Archive for the Gaming Category

Toggle network cvars script for Team Fortress 2

While playing Team Fortress 2, I’ve found that some servers are set up for higher bandwidth usage allowing for a smoother game. To really take advantage of that, typically a few client side cvars need to be changed. However, many servers also run the default settings on their server and you’ll need to set the cvars back.

Conveniently, the source engine allows TF2 players the ability to create client side scripts / configs that will automate these changes. I have taken the liberty of creating a config that will let you bind a key to a “nextrate” command which will toggle the cvars between their High and Low rate settings.

First off, I am only changing the values for two CVARS, there may be more and they would be simple to add, but for the sake of this discussion I will be changing “rate” and “cl_updaterate” cvars.

The Low settings are:

rate: 30000
cl_updaterate: 20

The High settings are:

rate: 60000
cl_updaterate: 100

All that really needs to be done is, when connecting to a High rate server, in the console type:

rate 60000;cl_updaterate 100;

And when connecting to a Low rate server, in the console type:

rate 30000;cl_updaterate 20;

but who wants to type that everytime…. So, without further ado, enter the script:

alias ShowHighRateMsg echo rate set to 60000, cl_updaterate set to 100
alias ShowLowRateMsg echo rate set to 30000, cl_updaterate set to 20
alias SetHighrate "rate 60000; cl_updaterate 100;alias nextrate SetLowrate;ShowHighRateMsg;"
alias SetLowrate "rate 30000; cl_updaterate 20;alias nextrate SetHighrate;ShowLowRateMsg"
alias nextrate SetLowRate
nextrate

This uses the alias command which lets you set chains of console commands together and reference later by the name you give the alias.

Above five aliases are created:

1. ShowHighRateMsg – Simply echoes the text we want the user to see in the console after executing the nextrate command to set the High Rate settings

2. ShowLowRateMsg – Simply echoes the text we want the user to see in the console after executing the nextrate command to set the Low Rate settings

3. SetHighRate – Actually sets the cvars for High Rate server use. It also sets the alias for “nextrate” to SetLowRate. This is what implements the Toggle functionality. The user keeps calling “nextrate” and nextrate is pointed to different aliases every time it is called. It also displays the setting changes it is making in the console for the user to see if they bring up the console.

4. SetLowRate – Actually sets the cvars for Low Rate server use. It also sets the alias for “nextrate” to SetHighRate. This is what implements the Toggle functionality. The user keeps calling “nextrate” and nextrate is pointed to different aliases every time it is called. It also displays the setting changes it is making in the console for the user to see if they bring up the console.

5. nextrate – This declares the nextrate alias and by default points it to SetLowRate. This is the alias that you bind to a key. To bind it, it must exist first which is why it is by default pointed to SetHighRate (it assumes you play on more Low Rate servers then High Rate, besides it’s the default value from Valve so, hard to go wrong.)

The final line of the script is a call to nextrate, which as mentioned set to SetLowRate, so this actually execuste the nextrate alias and sets the cvars to Low Rate server use.

You could then bind a key to nextrate and execute it during the game. For example, in the console type:

bind m nextrate

Which will bind your M key to the nextrate alias. Pressing M at this point will execute the nextrate alias whenever it is pressed.

At this point, were you to paste the above script line by line into the console window of TF2, you could call nextrate over and over again and see it change. Well again, who’s going to paste all that in every time?

So you have 2 options at this point. Open up the AutoExec.cfg file in your TF2 cfg directory:

C:\program Files (x86)\steam\steamapps\<YOUR STEAM NAME>\team fortress 2\tf\cfg

and paste the entire script in there. You could also bind it to the key of your choice by adding the bind command from earlier here.

The other option, and I think the cleanest, is to create a new text file called “ServerRateToggle.cfg” in the \cfg\ directory (same place as the AutoExec.cfg) and paste the script into the new file. Then open the AutoExec.cfg and add the following line at the bottom:

exec ServerRateToggle.cfg

now, whenever the AutoExec.cfg file is parsed by TF2 (in this case, every time you start the game) it will execute the Rate toggle script which will reset the values to their defaults. You could also add the bind command in the autoexec.cfg after the call to exec ServerRateToggle and it will be bound forever more for your convenient use.

Here is a link to the ServerRateToggle.cfg to avoid copy and paste errors :-)

Enjoy, and let me know if you come up with anything better or more commands that need to be added to the cvars I’m currently setting!

Creating custom Team Fortress 2 Sprays for a PC

This little tutorial will cover making custom TF2 sprays. How to make a static spray, a transparent spray, and animated sprays.

First, to give credit where credit is due. I found the information on making sprays from a few blogs/sites. Unfortunately, there was no comprehensive information for dealing with transparency and animation so this article you are reading now attempts to bring it all together in one place. Here are the direct links to the articles I used as a base:

Tools you will need:
  • - An image editing utility like Adobe’s Photoshop ($$$) or gimp (Free!). The tool must supporting saving to TGA (Targa) file-format and must support Alpha channels (for transparency)
  • - VTFEdit (v.1.2.5 Full seems to be the latest though it was release on 9/14/2007, also requires the .NET 2.0 Runtime and the Microsoft Visual C++ 2005 SP1 runtime as well, which likely your computer already has)
A note on Spray Image Resolutions and Spray file sizes:

Resolution: Sprays resolution maximum is: 256 x 256 pixels
They can be smaller, but they can’t be larger! If they are larger the 256 in either width or height, the spray simply will not show.

File Size: Currently the Source Engine (the Valve game platform that Team Fortress 2 is built on) has a file size limit for sprays of 120 KB do not exceed that or the spray will simply not work. This usually isn’t an issue with Non-Animated sprays, but Animated ones use 1 image per frame so you’re probably not going to get more than 4 or 5 frames with a resolution of 128 x 128 (note that is smaller then the largest supported spray resolution, we choose that to allow for more frames.)

In all cases, when we import images into VTFEdit, they are re-sampled to align to a resolution that is a power of 2, this is due to the rendering engine and an optimization for faster and easier rendering. Suffice it to say. the engine just needs them that way. VTFEdit gives you a drop-down box to give you further control. It defaults to “Nearest Power of 2” but there are options for “Smallest Power of 2” and “Largest Power of 2”.

During the import, VTFEdit looks at the dimensions of the image, for an example, let’s say our image is 220 x 220. If the image’s dimensions do not align to a power of 2 in both their X and Y dimensions, VTFEdit figures out the next largest and next smallest even power of 2 to align to and re-samples the image to these new dimensions. It uses the value in the drop-down list as a guide-line. In our case the next smallest is: 128 x 128 and the next largest is 256 x 256. If “Nearest Power of 2” is chosen, since 220 is closer to 256 then it is to 128, 256 x 256 is used. If our image size was 130 x 130, the next smallest is: 128 x 128 (again) and the next largest is: 256 x 256 (again), and 128 x 128 would be used. If you select “Next Smallest Power of 2” it will always pick the next smallest value, and likewise, should you choose “Next Largest Power of 2” it will always choose the next largest.

How do I know what the next powers of 2 are? Well I wrote a simple program to dump a bunch out for me and I just compared ;-) Below is a convenient table for your use:

2 to the Power of         Dec. Value         Bin Value
——————————————————————
2 ^ 0                            1                        0000000001
2 ^ 1                            2                        0000000010
2 ^ 2                            4                        0000000100
2 ^ 3                            8                        0000001000
2 ^ 4                          16                        0000010000
2 ^ 5                          32                        0000100000
2 ^ 6                          64                        0001000000
2 ^ 7                        128                        0010000000
2 ^ 8                        256                        0100000000
2 ^ 9                        512                        1000000000

Using square images (same X and Y dimensions) is easiest. But in the case of a rectangular image, the X and Y and handled separately, so an 65 x 130 image, using “Nearest Power of 2” ends up being 64 x 128, which may or may not stretch / compress your image inappropriately and you’ll want to either force the re-sampling or manually resample it with padding in the image to make the resolutions easier to work with. Square, as I mentioned is the easiest ;-)

Usually, leaving the default of “Nearest Power of 2” is sufficient, but I feel it’s better to resample the image yourself during the image preparation phase of the procedure because it is likely Gimp or Photoshop have a highly superior re-sampler then VTFEdit. I’m not saying it is, I’m just saying it’s likely, especially as the tool hasn’t been updated in 2+ years at this point. Plus it’s nice to know what’s really going on under the hood.

A note on Team Fortress 2 directories for saving the Spray to:

Sprays are stored in 2 places for Team Fortress 2. By default they are:

C:\Program Files\Steam\steamapps\<STEAM_ACCOUNT_NAME>\team fortress 2\tf\materials\VGUI\logos\

C:\Program Files\Steam\steamapps\<STEAM_ACCOUNT_NAME>\team fortress 2\tf\materials\VGUI\logos\UI\

where <STEAM_ACCOUNT_NAME> is the login name associated with your Steam account.

-If the C:\Program Files\Steam\steamapps\<STEAM_ACCOUNT_NAME>\team fortress 2\tf\materials\ directory does not have a sub-directory called “VGUI” create a new folder with that name there.

-If the VGUI folder does not have a logos directory, create a new folder with that name there. Once the .vtf is in here, you can import it from here using the TF2 Options –> Multi-Player, Import Spray option and browse to this directory. The importing process will create a file with the same name as the .vtf file but will have a .vmt extension (not sure what that is though, any thoughts?) This will also copy the .vtf and .vmt to the logos/UI directory.

-If the logos directory does not have a UI directory, create a new folder with that name there. One the .vtf and .vmt files are in this directory, they will appear in the Choose Spray drop-down list for choosing.

A note on image file naming for use while importing to VTFEdit

For most cases it does not matter what you name the image file that you import into VTFEdit. Whatever the file is named, will be used by VTFEdit as the default .vtf name for saving but you can always type a different name.

For Animated Sprays, it DOES matter however. Animated sprays are created by making a series of images, 1 per frame, and giving them a sequential file name so that VTFEdit recognizes them as multiple frames for the same spray. Basically, they just need to be alphabetized so when VTFEdit sorts the multi-selected images, it sorts the filenames alphabetically and frame 1 goes to the 1st file, frame 2 goes to the second, and so on. For ease of use you could use filenames like: “1-MySprayImage.tga”, “2-MySprayImage.tga”, “3-MySprayImage.tga”, etc.

Summary of the process:

The process is relatively simple, create or find an image you want to use as a spray. Make sure it is cropped or scaled down to a resolution of (at largest) 256 x 256. Open VTFEdit, on the File Menu, choose the Import item. Browse to the spray image and select it, verify the VTFEdit import options are correct (the tool remembers it’s last settings so typically you’ll only need to set it up the first time you make a spray) and hit OK.

A screenshot of pretty useable settings follows:

Non-Animated Spray:

VTFEdit Non-Animated Spray Settings

Animated Spray:

VTFEdit Animated Spray Settings

Please note, the only difference in the above two screen-shots is the value of the “Texture Type” drop-down list item. Non-Animated sprays use “Volume Texture”, animated ones use “Animated Textures”. It would be fine to use an Animated Texture with a 1 frame animation, but I have found no information to say use one method or another. I’ve successfully created non-animated sprays with Volume Texture and animated sprays with Animated Texture.

At this point VTFEdit will display to you the imported image and you simply go to the File menu again, choose the "Save As” item, browse to your local logos directory and save the file with whatever name you’d like with a .vtf extension.

You’re ready to use it! Just start Team Fortress 2, go to Options, then the MultiPlayer Options tab, then press the import spray button and browse to your logos directory (as mentioned above) and choose the new spray. Click apply, connect to your favorite server and spray away!

VTFEdit makes the whole process of creating the .vtf file for use by TF2 a very easy process. The hard part is preparing the image before importing it into VTFEdit. Non-Animated, Non-Transparent images are the easiest, they only require the correct 256 x 256 or smaller size constraint. Transparency requires Alpha channels and TGA file format.

Some of the Articles I listed at the beginning have more detail on making transparent images and animation image preparation, I urge you to check them out if you are unsure.

Good luck!

Spray in action, click for larger view!

Here is a link to a Quicktime movie of the actual spray in game showing the animation. Not very exciting but enjoy! Click here to view the movie!

Bad customer experience: Valve and Steam delivered games

I returned home from a week long vacation out of state to find my internet connection is down, which after some calls to tech support, yields a technician coming to my house in three days. At any rate, as I’m a pretty avid gamer, I have a stash of single player games which typically I save for these “rainy days”.

Well, over time, it seems I have picked up a fair amount of single player games which were purchased and delivered on Valve’s Steam system, which I am a pretty big fan of. The ability to just download and play the games you have already purchased is awesome!

Now normally, when your internet connection temporarily goes down, Steam supports an “Offline Mode” which allows you to play your games even though it can not connect to the Valve servers to validate the purchase. And usually it works fine. Games which require internet access don’t work so well, but you’d run into that with or with-out Steam, no doubt.

The problem I have run into however is, I would have to call a bug. As I mentioned I have been away for a week and my machine was turned off. So after some period of time, the Steam client decides it needs to check for an update, which ultimately falls as the internet connection is down. So, really that’s fine, the problem is, when an update fails the Steam client will not allow anything else to happen and closes Steam. An even more frustrating, it pops up the dialog which let’s you either Cancel running Steam or to start it in “Offline Mode”, however, when a Steam client update fails, it can only close steam and will not allow “Offline Mode” to proceed.

Here are some screenshots of the process:

1) So far, so good, starts up and tries to update

1

2) Starts doing something, in fact it gets to 27% pauses for a second, then retries. It will try 3 times in total never getting past the original 27% . This is likely due to the fact that the internet connection this machine is currently using is a tethered mobile phone using the 3G network of my provider. I’m not blaming Steam for this. With absolutely no internet connection, this #2 shot never happens, it just proceeds to #3.

2

3) After 3 failed attempts at completing the download and update, it errors out.

3

4) We are now presented with an option to Retry, Quit, or Start in Offline Mode. Retry repeats items 1 thru 3. Quit simply quits the steam client here. We then try the “Start in Offline Mode” to get to our games list or onto the game we started via Steam generated shortcut.

4

5) The Steam client update is apparently a MUST HAVE to proceed, and since it has failed (and in this case can never proceed as no internet connection is available). We are denied starting in “Offline Mode”

5

6) Surprise, surpise, there is a problem with the internet connection… We knew that, but I am now being denied access to any of my PURCHSED ($$$) games delivered by Steam.

WTF IS THAT ABOUT?!?

6

Surely this is normally a temporary inconvenience but I can’t play games I’ve paid for for 4 days, plus however long the internet connection actually was done while I was away… It’s not Valve or Steam’s fault, but it is there problem.

Regards!

Team Fortress 2 Achievements

header_blog

While I’m at it, I’ve heard of a convenient way to help grind these things out. I don’t know if it’s ethical or not but, I’ll leave that decision to you.

1.) Start a server
2.) from console: mp_teams_unbalance_limit 0
2.) from console: sv_cheats 1
3.) from console (as many as you want): bot -team red -class scout
4.) from console: sv_cheats 0
5.) from console (DO NOT FORGET TO DO THIS!!): retry

6.) EARN YOUR ACHIEVEMENTS

7.) from conosle (just in case as some achievements require death): kill
8.) You’re done.

Notes:
This turns cheats on to add the bots, then turns it off. The retry tells the client to retry the last connection which will allow the client to detect that cheats are not on anymore (which means you can earn achievements). The bots will stay after the retry command.

To move them around you can use the console command: bot_mimic
bot_mimic 1 turns it on, bot_mimic 2 turns it off.

The only reason I know about it is because I don’t have a large set of steam friends and some of these achievements can’t be earned. Again, just disseminating information. I don’t know how Valve views this practice but it seems ok in my book (that and 5 bucks will get you a coffee at Starbucks) so don’t shoot the messenger.

Game: Dead Space first thoughts

Dead Space

“Only the Dead Survive.

A massive deep-space mining ship goes dark after unearthing a strange artifact on a distant planet. Engineer Isaac Clarke embarks on the repair mission, only to uncover a nightmarish blood bath — the ship’s crew horribly slaughtered and infected by alien scourge. Now Isaac is cut off, trapped, and engaged in a desperate fight for survival.” –Steampowered.com

So, being completed disgusted with the lack-luster array of games on the market today, I thought, ok, what the heck I’m bored, I’ll give this one a try, plus it was $39.99 instead of the mandatory $49.99 games seem to be fetching these days and got some decent reviews. At any rate, <shock>I’m glad I did!</shock>

It’s an XBOX title that has been “ported” to PC, which, if you’ve tried a few of these before, you know can be hit and miss especially with mapping controls from a controller to a keyboard and mouse. I’ll give it to ‘em, they did a pretty good job. The mouse is a little sluggish when moving around the Save Game menu, but other then that, no problems.

It’s a third-sh person sci-fi horror shooter. By Third-ish I mean, you get a 3rd person view of yourself, but they did something pretty interesting. Your character is offset to the lover left corner of the display. So at first it seems a little odd to play, however what it does allow is the menu-ing system (inventory, objectives, etc) have a fairly large and readable view in the right area of the screen (click image for larger view):

HUD Screenshot

It’s actually pretty damn cool, if you pan your camera around, the HUD moves around and perspective changes. Well done fellas!

The game also features a purchasing system for upgrading your suit, weapons, ammo, etc. Which initially I am not a huge fan of but it’s limited enough to not be overwhelming and big enough to give you some options. I was a bit confused with what weapons used what ammo, perhaps a read through the manual would have been useful. But it’s not rocket science by a long shot.

Combat is definitely part of the game, but it by no means is the main purpose of the game (aka Doom3, and most other FPS titles). The story line, while a bit cliché (go to help a ship in space and surprise its deserted except for the baddies), really draws you in. Not so much with the plot but how the game integrates it all together and really makes you want to learn more. Just the right combination.

During my first play, I went completely through the first mission and well into the second, and I was pretty tired when I started, it just sucked me in and kept me going. An interesting factor it has is anti-gravity sections. Your suit has some variety of magnet shoes with it, but in these anti-grav sections, you can walk on walls and ceilings and what not, pretty neat, although so far it seems to only be a “hey that’s cool” factor. These things are always a little hard to negotiate and definitely ripped me out of the world to consider how I have to move and use what controls to get to where I need to go. But so far it’s been pretty limited, so maybe it’s not a big deal.

The only annoying part is the game was published by EA which I am not a fan of, but Monolith made a damn good title here, DAMN GOOD!

A thought or two on Left 4 Dead

Left 4 Dead

Right off the bat, let me say, this is a great game! Fun, suspenseful, and Co-Op! If you enjoy shooting zombies, You just can’t go wrong here. Hats off to Valve.

Single player and Co-Op (THANK YOU VALVE for bringing it back!!) are great.

Versus… Well, I just don’t like it much… Random team, random player? Why the long respawn for the infected? The survivors have far superior fire-power…

What about 32 player Death Match and some CTF?

Alas…

Totally awesome game otherwise, go buy it!

And the heavens shall tremble

Diablo III

Diablo 3, ‘Nuff said!

www.Quake-Revolution.net

Due to a DNS registrar issues, Quake-Revolution.com is now available at www.quake-revolution.net and will be returning once the registrar issues have been resolved.

 The team apologizes for the inconvenience and offers a reminder, “No good deed goes unpunished” :-)

Regards!

Quake Revolution, so much for d34d :-)

This is the most active dead Quake III Mod I’ve ever seen.

Version 1.39Beta6 Released. Head on over to quake-revolution.com for a full list of changes

Additionally, they’ve added 3 new developers: Duality, Whinger, and donvito. Duality and Whinger have volunteered to help with the Quake 3 mod, whilst donvito is going to help Lucron and I work on a Quake 4 mod.

Quake4 Mod eh, Hmmz I say :-)

The Quake Revolution Tournament needs at least 3 more teams to sign up for participation, so, dust off that Railgun, hop on over to the Quake Revolution Project Forums and sign your team on up!

City of Heroes / City of Villians

On the urgings of a new co-worker friend, I hopped on over to http://www.plaync.com and purchased City of Heroes. As it turns out, one can purchase the combo set of Cities of Heroes and Villians for $29.95 USD.  The downside of course, would be the $14.99 USD a month subscription fee (the 1st month is for free.) It is worth pointing out that if you buy in 3 / 6 / or 12 month blocks, the per month fee is somewhat lowered.

Now, PlayNC is the same guys who brought you Guild Wars and Dungeons Runners. All 3 of these games are VASTLY different. Though I believe they all run on the same 3rd person based game engine.

Once you buy the game online and download it (it can also be purchased in stores and activated online). It hooks to your exising plaync account and while the client is a hefty 2.4 GB of download, the servers seem to be pretty responsive. A few hours and you’re good to go.

When you login, you create a character and pick a server. Each server seems to be named for various virtues like Liberty, Freedom, Gaurdian, etc. It also seems that you have 12 character slots per server. Apparently there is a way to transfer between them at a $9.99 USD. cost.

At any rate, the character designer is pretty damn AWESOME!! You could seriously just make heroes or villains all day in whatever depth of customizable skins and powers as you can dream.

Of course, you start with just a few powers and as you progress through the game more and more unlock and are available to you.

I’ve only created a single hero and am just getting used to the interface. It differs from guild wars. It is themed well for a super hero type game, but it seems more… N00bish, if you will. I guess I can’t say thats a bad thing but it has a ton of features and I find them pretty difficulat to find wheras, Guild Wars seemed much more intuitive. Although, I have played many Fantasy themed RPG’s in the past so maybe it’s just more of a mature and demanding market.

Any way you slice it, it’s a fun game. I probably will not extend the original month much past 1 perhaps as I have an erratic gaming schedule and would like to allow myself the chance to find something new.

Anyway, I recommend it, it’s fun. You know you’ve always wanted to be a super hero and villain, you know it!

Grassy Nole will w00p j00!