Soldier of Fortune is a first-person action shooter title from Raven Software. You play a soldier-for-hire who must travel to some of the world's most dangerous political hotspots in order to carry out your task. Take part in over 30 missions with tasks such as locating nukes on a speeding freight train to searching out an Iraqi oil refinary. You'll be utilizing the world's most lethal weaponry, including a sniper rifle, white phosphorous grenades, and prototype microwave pulse guns. With realistic body damage, interactive 3D environments, and the Quake II engine with new GHOUL technology to back it up Soldier of Fortune is placing you into a realistic world filled with violence.

Post tutorial Report RSS How to setup Trenchbroom for SoF1 mapping

This is a tutorial on how to install eGax's Trenchbroom plugin for SoF1 and start mapping for the game.

Posted by on - Basic Mapping/Technical

If you want to talk about SoF1 I recommend joining the SoF1 discord here.

Introduction

When Soldier of Fortune 1 released in 1999 it's sdk shipped with a single level editor. SoFRadiant. This was a fork of Qeradiant; the editor Id used to make Quake 2's levels.

1

SoFRadiant is really sub par as a level editor and lacks a lot of qol features. Fun fact Raven used this same editor largely unchanged to make Star Trek Voyager Elite Force, Jedi Outcast and Jedi Academy.

Fans over the years have either suffered with SoFRadiant, or used a custom fanmade editor like Worldcraft or QuARK. In 2020 eGax on Github created a custom Trenchbroom plugin for the game.

99159175 5063a180 26a8 11eb 9290

This custom plugin is pretty easy to install however it comes with 1 downside.

Trenchbroom as of the writing of this tutorial does not support Soldier of Fortune 1's texture format .m32. So to install the plugin you will need to convert SoF1's textures to .tga. This tutorial will go over the process.

What you will need

  1. Trenchbroom
  2. Soldier of Fortune's sdk
  3. eGax's custom Trenchbroom plugin
  4. .m32 to .tga
  5. PAK Explorer 1.2

Installing the SoF1 sdk

Extract the SoF1 sdk's zip and install it. I recommend installing it into the game's directory under a folder like \sdk\. In my case I installed the sdk to C:\Games\SOF1\sdk.

Screenshot 2023 08 05 012929

Installing Trenchbroom and the plugin

Next install Trenchbroom and copy eGax's plugin into the \Trenchbroom\games\ folder.

Screenshot 2023 08 05 013108

You have now successfully installed the plugin.

Extracting SoF1's textures

Now we'll need to extract SoF1's textures. This'll let us convert them into .tga for use with mapping. Unfortunately extracting SoF1's pak0.pak isn't straight forward as very few tools can open it. However I did find one that works extremely well which is PAK Explorer 1.2.

Install PAK Explorer 1.2 and open pak0.pak inside the \base\ folder in the Soldier of Fortune directory. Now right click the textures folder and extract it.

2

Congratulations you have now extracted SoF1's textures. You should now see them in the base folder under \textures\

Screenshot 2023 08 05 015336

Converting SoF1's textures

Due to Trenchbroom not supporting .m32 textures we'll need to convert them to .tga. There's a few ways to do this but the easiest way I've observed is to use .m32 to .tga. When you extract .m32 to .tga you'll see this.

Screenshot 2023 08 05 015513

The two files to pay attention to are conv_m32.bat and m32totga.exe.

Now copy both of these files into every individual texture folder. Starting with armory and ending with uganda. And run conv_m32.bat individually in each folder. It will now convert all of the textures in each folder.

3

Once you've run it in each folder you can then delete both files from the folders.

Setting up Trenchbroom for SoF1

Now that we have the textures we can start mapping for SoF1. Open up Trenchbroom and select new map. Then scroll down to the bottom and select SoF (experimental).

4

Now you can select SoF1's textures and spawn SoF1 entities.

5

There's not much else that's special with SoF1. It's compiling programs are provided with the sdk in the \bin\ folder. As a bonus I'll provide a screenshot of my build process.

6

Now compile and run the game and level. You should now be all done.

2023 08 05 091536 525

Custom textures

As a bonus I'll throw this one in here. To import custom textures into SoF1 we'll need two files. A .tga and a .m32. In-order to convert the .tga to .m32 we'll need another tool. .m32 tool.

Once we've opened .m32. Go up to file->import and import your .tga. In this case I'll import Star Wars Dark Forces 2: Jedi Knight's default developer texture dflt. When it asks if you want to import mipmaps click yes.

7

Now copy both the .m32 and the .tga into a folder within the \textures\ folder. Now you can view it in Trenchbroom and assign it.
8

2023 08 05 092450 677

That's it. Now you can make maps with less of a headache. I recommend downloading some of the other samples I've reuploaded to moddb.

Note there is a sequel to this tutorial located here.

Post comment Comments
xaGe
xaGe - - 92 comments

Looks good, hopefully it will help some people.

Reply Good karma Bad karma+2 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: