furrycat

Non-destructive modding for Tiger Woods 2003


The goal when modding for any game is to add content rather than replace existing stuff. Having a new shirt for golfers to wear is no good if it overwrites existing gear.

Such non-destructive modding can be done in Tiger Woods 2003, although the game was clearly not designed with modding in mind and we do have to jump through a few hoops to get things working. Furthermore, it doesn't look as though it would be possible to run several mods at one time.

Hardcoded resource sizes

Since the game assumes no one will be attempting to mod it, it is also free to assume that the data it has to work with won't change. Customise your golfer, for example, and you can choose from one of 14 shirt textures. If the game was designed to allow for adding content, it would see that there were 14 textures available and let you scroll through them. However it isn't, and what it actually does is let you look through 14 textures because it knows that that's how many there are.

In other words, even if you successfully add textures to the game (described later) you won't be able to choose them from the customise golfer screen.

Inflexible archiving

In Tiger Woods 2002, game data files were stored under the installation directory. For 2003, Headgate have packed the files into TBF archives. Rather than drop our new files into the game directory structure, we have to go to the trouble of reconstructing TBF archives before we can test our mod.

Example mod

Here I will demonstrate adding some tacky clothes to the game. Don't worry if you don't understand the steps involved, they will be documented in other articles. This is really only a proof of concept.

The new textures

We'll start off with a set of stereotypically awful golfing gear made for a laugh by [Don_T_Shoot]. There's a shirt:

Tacky shirt

A cringe-inducing pair of trousers:

Horrible pants

And some shoes your granny wouldn't get you for Christmas:

Awful shoes

In a real mod we'd save copies of these in various sizes so people with less texture memory to play with can still use them. For the purposes of this demonstration, you can assume that the above pics are actually high resolution images!

Opening up the archive

The first step is to open up the game's texture archive and see how many existing images there are. We will then add our new stuff to the archive.

For this we need the TBF tools.

Having first changed into the Tiger Woods 2003\Data\Golfers directory, we run the command:

tbfunpack Textures.tbf Textures

This creates a directory named Textures and fills it with the texture files packed into Textures.tbf.

Determining which files to add

Looking at the contents of the new textures directory, we see that there are files named shirt512_0.dds up to shirt512_47.dds - 48 shirt textures in all. Our goal is to add a 49th texture, so we need to save the tacky shirt as shirt512_48.dds.

You may wonder why we can't pick some number at random, thus allowing us to make a mod that would coexist with some future work. Sadly we can't. As soon as the game finds there's no shirt 14 it won't bother looking for shirts 15 and above.

We also save our trousers as pants512_17.dds and our shoes as shoe256_14.dds.

Repacking the archive

The next step is to rebuild the TBF archive so the game can find our new textures.

tbfpack Textures

Easy enough. A new copy of Textures.tbf will have been created. In real life we'd back up the original before performing this step...

Configuring your golfer

If you load up Tiger Woods 2003 now and try to select your new TackyWear, you'll be disappointed. The game is hardcoded into thinking that there are 48 shirts, 17 pairs of trousers and 14 pairs of shoes and it won't even attempt to display any others in the Customise Golfer screen.

Not to worry, we can hex edit the player configuration files and open up the new textures.

Unless you have read and understood the PLR file format, just take my word for it that the following is what you need to do.

  1. Open up Players\yourgolfer.plr from your game directory.
  2. Change the two octets at 0x001f to 0x04 0x0a (shoes #14).
  3. Change the two octets at 0x001f to 0x10 0x20 (shirt #48).
  4. Change the two octets at 0x001f to 0x11 0x00 (pants #17).
  5. Save the file.

Now you can load up the game and play in suitable attire. Just don't change your shoes, shirt or trousers in the Customise Golfer screen or you'll be unable to change them back without resorting to the same hexing.

TackyWear in action

Feedback

Send any comments to golf@furrycat.net.

Please note I have configured ICQ to ignore messages from individuals not on my contact list.