|
The Mods Document.
Or, Once the Foundation is Laid.
Okay, now that you’ve built yourself a Thief mission, suppose you want
other Thief fans to be able to play it? Of course, you can load up
any mission you want with DromEd, but to play a newly-made mission with
just a copy of Thief requires a few simple changes to the Thief installation.
I. A Brief Tutorial on Thief Data Files
Thief keeps its game data packed in "resource" files with the .crf extension.
Examples are easy to find on your CD, and some resource files may be copied
to the directory where you installed Thief. These resource files
are compressed using the "zip" compression format, and may be managed just
at if they were .zip files by any compatible compression application.
No such application is included with DromEd, but they are available
widely on the net as shareware, with very reasonable registration agreements.
It’s possible to change Thief configuration without ever editing these
.crf files (see below), but
you’ll really want a zip archive program to let you browse through
the existing data. These resource files are packed versions of a varying
number of original source files, complete with directory paths. To
change this data you can either edit the version of the file in the resource
archive, or you can simply create a file with the same name and directory
path under the directory where you installed Thief. If such a file
exists it will be used in preference to the version in the .crf file.
This is the key to modifying your Thief install without doing any permanent
damage to the default installation that lets people play the normal Thief
missions. You can make your own resources to override the .crf files
without actually editing the originals, and when you’re done with your
"modification" you can just delete the local resource files and let Thief
see the versions in the .crf again.
II. Text for Mission Objectives
For example, suppose you want to actually have the mission objectives
for your new mission appear on the Objectives screen with appropriate text
descriptions (fancy that). Assuming you’ve installed the English
version of Thief, the file that contains these descriptions is in the intrface.crf
archive. It’s called miss/english/goals.str, where miss is the actual
name of the mission in question. So, let’s start by looking at mission
names.
Each mission has an ID number n and a name of the form "missn."
The filename of the mission file should be the same as this mission name,
with a .mis extension. So, if I wanted to make a new mission and
call it mission 15, I’d use the filename miss15.mis, and place that file
in the main Thief directory. There’s also a couple of pieces of data
you have to set in DromEd to correspond to this mission number. On
the Editors menu, select "Mission Parameters…" On the resulting dialog,
select "Dark Mission Description" and click OK. The resulting dialog
will have a field you can fill in for "Mission Number" and "Mission Pathname."
So for mission 15, I’d fill in "15" in the first field and "miss15" in
the second. Mission numbers outside the normal mission sequence (i.e.
15 and up) are a good idea because the filename of your new mission will
not conflict with that of any shipping Thief mission.
Now, getting back to setting text for the goals of my new mission.
Any of the existing goals.str files in the intrface archive will serve
as an example. Open one of them with a text editor, like Wordpad,
and you’ll see that for each goal ID number there’s a "fiction" string
and a "text" string. The "fiction" string is used in the pre-mission
briefing, while the "text" string is used in the in-game Objectives screen.
Usually the "text" versions are shorter, since we need to do less explaining,
and space may be tight if we’ve added objectives since the beginning of
the mission. If you want, you can make both strings the same, as
long as everything fits on the Objectives screen.
To set objective text for my new mission 15, I make an intrface sub-directory
of my Thief directory (if there isn’t one there
already). Under that, I make a sub-directory called miss15.
Under that, I add an english directory (actually, in any case where
a language-dependent subdirectory like this is called for, I can omit it,
and all that will happen is that I’ll get the same resource no matter what
language I’ve installed Thief in). Now I write up a goals.str file,
using any text editor (such as Notepad) and put it here. Now, when
I load mission 15 in DromEd and go into game mode, I can go to the Objectives
screen and see my new text for these mission objectives. The mission directories
in the intrface resource also contain data files for the map which appears
on the in-game Map screen. Thief requires some of this data.
This document covers how to set up a PCX format image to be displayed on
the in-game Map screen. A blank page is provided with DromEd as page001.pcx.
To make your own map will require a paint program capable of editing PCX
files.
Each map page is a separate file in the intrface resource, named pageddd.pcx,
where ddd is some three-digit number. Number pages sequentially,
without gaps. Mission quest variables are used to indicate which
pages to look for. You should create variables named map_min_page and map_max_page
whose values indicate the highest- and lowest-numbered page present.
Setting up Thief to highlight Garrett’s current location on the map
is outside of the scope of this document.
III. Playing New Missions from Thief
Suppose you want to be able to play a newly-created Thief mission without
using DromEd to load in the mission file. By running the mission
from Thief itself you can set difficulty levels, purchase loadout, and
trade the new mission with your friends who may not have DromEd themselves.
Also, any difficulty-dependent changes in the mission layout (using "Difficulty/Delete"
and similar object properties) will be processed automatically when you
go into the mission, without your having to issue a separate process_difficulty
command in DromEd.
Setting up Thief to run a new mission is actually rather easy: only
one data file needs to be changed. Take a look at the file missflag.str
in the strings.crf archive. Each mission can have a number of these
"flags" describing how it fits into the mission sequence, allowing for
example it to skip its loadout or briefing movie. Unless you’re going
to make your own briefing movie, the "no_briefing" flag will be very handy!
Note how there’s also a flag which allows a mission to be skipped entirely,
as you will see was done with the mysterious mission 8.
To set Thief up to play my new mission 15, then, all I have to do is
make a strings subdirectory in the main Thief directory, and place a missflag.str
file in it. This will override the version in strings.crf.
To start with, I just copy the file from the .crf archive. Edit
the flags for every mission so that they are the same as mission 8: "skip"
and no other flags. Then I add a new line for mission 15, as follows:
miss_15: "no_briefing,end"
Now, if I start Thief and select New Game, it will skip all of the usual
Thief missions and start me at mission 15. If I had created a whole
sequence of missions I could just add them as missions 16, 17, etc. and
only set the "end" flag for the last mission. Whenever I finished
a mission in the sequence I would automatically proceed to the next one,
just like in the real game.
Actually, you may want to leave mission 1 alone, since that’s the training.
If you do decide to "skip" mission 1 in the missflag.str file, then whenever
you load up Thief and select the training mission, you will instead be
taken to the custom mission you created.
Subsequently, if you choose to "skip training," you will still be taken
to the custom mission. So, regardless of whether or not you choose
to play the training mission in Thief, you will be taken directly to the
custom mission if you included in the missflag.str file the "skip" parameter
for mission 1.
When you’re just starting out, you may also want to add the "no_loadout"
flag and skip setting up a "Store" of objects for the
player to purchase. Setting up a "Store" is much like setting
the player’s starting inventory, but is outside of the scope of this document.
The Stone cannot know why the Chisel cleaves it,
The Iron cannot know why the Fire scorches it,
When thy life is cleft and scorched, When Death and despair
leap at thee,
Beat not thy breast and curse thy evil fate,
But thank the Builder for the trials that shape thee.
--The Hammer Book of Tenets
Go back to Official Guides & Tutorials
|