User Tools

Site Tools


dromed:object_files

Working Out Which Files Are Associated With An Object

Summary

This tutorial will explain the process of determining which files a particular object requires. This will allow you to take an object from a package or Fan Mission and put it in your own mission without having extra, unnecessary files.

Assumptions

This tutorial would be very long and difficult to read if every little aspect of working with custom objects were explained in detail, so the following will be assumed:

  • You can already find your way round the object hierarchy, and know how to edit the archetypes, make new ones etc;
  • You are familiar with using a custom gamesys;
  • You can use programs like WinZip.

Introduction

If you would like to use a custom object from some package, or even from someone’s fan mission making it available in your own mission involves knowing which files are needed. There is the model (i.e. the file that defines the shape of the object), the texutres, and maybe even some sounds (though this is quite rare).

Packages such as DedX and the HMDK include a base/demo mission with a custom gamesys. All of the new objects are set up in the object hierachy, so that is where you can look to determine the necessary properties. If an example object has been placed in a demo mission (as in the HMDK), select it and then go to the Object Hierarchy. The archetype will already be selected. You’ll want to make a note of the properties and their values.

Ordinary Objects

Finding the Object Model

NOTEME This refers to ordinary objects. AI will be covered later.

The first property you’re interested in is Shape → Model Name. If this is newbook, then the model is stored in the file newbook.bin. Find where you installed the package and look for the obj folder. The .bin file will be in there. If the file isn’t there, it actually comes with the game (it’ll be in obj.crf). In the latter case you won’t need to extract it, but you’ll still need to open it for the next step.

Finding The Textures

Use a text editor to open the .bin file. Much of the content will be indecipherable, but near the start you will see some filenames, such as “cover.gif”. Note that objects don’t have to have textures, they can just use solid colour(s). When a colour is used, the RGB values are stored within the bin file, so no extra files are needed. For every .gif file mentioned, look in obj\txt or obj\txt16. If a .gif file isn’t found, that’s because the object is using one that comes with Thief. In that case, you can ignore that file. Sometimes an object will use .tga or .pcx files, so be on the lookout for those as well.

Once you’ve found the .bin file and any .gif, .tga or .pcx files, you can copy them and put them into your own obj folder. Make sure the .bin file goes into obj\ and the textures in obj\txt or obj\txt16 (just copy whatever arrangment the original author used, though if in doubt, use txt16). Remember that this does not include any file that was in obj.crf.

What If The Object Is An AI?

NOTEME This part does not apply to cameras, turrets or rats. They are delt with in the above section.

The process is very similiar: Find the Shape → Model Name. Instead of looking in obj, look in mesh. As well as looking for the .bin file, look for a .cal file with the same name (e.g. newnoble.bin and newnoble.cal)

AI Textures

The textures of an AI can be defined in the .bin file, but they can be changed via the Renderer → Mesh Textures property in Dromed. Check to see if the archetype/object has this property. Making custom AI is harder than normal objects, so a lot of people will try to use the Mesh Textures property where they can.

E.g. Two Haunts can use the same .bin file but the Mesh Textures property can be used to make one of them use a different texture.

It is also the case that a custom AI can use an original model, and rely solely on the Mesh Textures property. In this case, the only files you’d need to copy would be the replacement textures.

The ‘Carry’ Icon

When the player is carrying a body it’s nice to have a picture that roughly resembles what you’re carrying, so custom AI from other packages or FMs should include these. To work out what file you need, find the Inventory > Render Type property of the AI. Type should be Alternate Model and Resource will be the name of a .gif file. So if it says newguy, the image will be obj\newguy.gif (not in txt or txt16)

Voices

Few people will make new voices for an AI, for the following reasons:

  • A lot of files are needed for a complete voice set (alerts, mumbling, dying, etc);
  • Setting them up can be tricky, as can getting a good quality recording (no background noice etc);
  • Sound files don’t compress very well, so a lot of them would considerably increase the size of a zip file.

However, there may be times when there is a new voice. At this point it’s worth mentioning that unlike textures, sounds are not a ‘part of the model’. In other words, you can ignore AI voice files if you want to, and give the custom AI one of the original voices.

It may not be obvious whether the AI does have a custom voice or if it’s one you simply don’t hear very often, so finding out whether it’s custom or not is the first thing you need to do. All voices are listed in the schema files for the game. If you don’t already have them, they can be downloaded.

Getting The Schema Files

If you’re using Dromed 1 (Thief TDP/Gold), get them here:
http://www.thief-thecircle.com/dromed/tools.asp You want the first two files, Schema Files and Schema Update. You don’t need to extract the files, but it might help (they don’t have to go into your Thief folder).

If you’re using Dromed 2 (Thief 2), get them here:
http://www.thiefmissions.com/telliamed/#T2Schema
The file you want is Updated Schemas. There’s no need to extract the files.

Back in Dromed, look for the property Speech → Voice on the AI, and make a note of the content (e.g vguardmen).

Open the schema file Speech.spc with a text editor, and search the file for whatever was in the Voice property. If it is found (as vguardmen will be), then it is not a custom voice (since this file is for the original game). In this case you won’t need to move any files.

If the voice isn’t found, you’ll have to find the necessary schema files, and the sound files. This is most likely the case when porting an AI from someone’s fan mission, or from, say, Thief 1 to Thief 2. An example of the latter scenario will be used here, since all of the files will be available, and organised. It may be the case that it’s obvious which files are needed, but if not, it can be worked out.

Place the Thief 2 schema files in Thief2\schema, ensuring there are no other sub=folders.

Recall the content of the Speech → Voice property. Search for all the Thief 1 schema files containing that text. The Windows search function won’t, by default, look in .sch, .spc or .arc files, but there are a number of ways around this.

Searching Non-Standard Files

Use it to add new file extensions to the types that the search function will use. For the searches to work, you’ll have to restart your computer after you’ve added the three extensions.

  • Convert the schema files to .txt (keep the originals somewhere as you’ll need them with the original extensions)
  • Some text editors (e.g. Notepad++) allow you to search in a number of files, so you could point the search function to all of the schema files.

Two or three files should be found: Speech.spc, an .sch file (usually named after the type of AI, e.g haunt.sch), and possibly conv.sch

Open up Speech.spc, and search the file for that Voice. You should find something like:

voice vsomething		//some description

Copy that text and paste it into the Thief 2 version of Speech.spc. The file will be divided into sections, so paste it into the voices section.

Next, copy the .sch file you found (the one that isn’t conv.sch) to your Thief 2 schema folder.

Now you have the schemas, and they’re in the correct place. You can now work out which sound files are required. The simplest way is to open up the newly added .sch file.

The schemas can look complicated, but they’re quite simple once you know what things are. All schemas will be written like this:

//Some comment
schema something
archetype SOMEWHERE
mono_loop something (or poly_loop something) - This line won't always be included
some filename(s)
schema_voice vsomething

Make a note of just one of the filenames from any of the schemas, and open up snd.crf with any zip program. When you find that file, it should be in a folder named after the type of AI. For a complete voice set, you’ll need all files in that folder. Extract them to Thief2\snd\ and ensure they remain in a suitably named subfolder.

You should now have all the files related to the AI (.bin, .cal, .gif, wav, and .sch). You’ll also need the

voice vsomething		//some description

line in your own Speech.spc file.

If you’re taking an AI from someone’s fan mission**, they may not have provided the schema file. In that case you can either ask the author if they still have them, or you can copy an original schema file and change the contents to point to the new wav files and refer to the new voice.

If the .wav files are not in a folder specific to the AI, you’ll have harder time identifying the correct ones. If the schema file is present you can look at the filenames referred to, and look for a pattern (e.g. they might all start with certain letters). If there is no schema file, you’ll have to just listen to different .wavs until you find a correct one, and then see if there’s a pattern in the filenames.

If the .wavs are not in a unique folder, there’s no pattern among the filenames, and there’s no schema file, things really are looking bad. You could try arranging the files by date modified. Perhaps all the files were made over a few days.

Installing The Object/AI In Your Own Mission

Once you have all of the files, you can place them among the resources for your own fan mission.
If using an ordinary object, place the .bin file in obj, and textures in obj\txt or obj\txt16
If using an AI, the .bin and .cal files should go in mesh and the textures in mesh\txt16, and the carry image should go in obj\

If The AI Uses A Custom Voice

Extract the original schema files to your Thief folder (e.g. so that the schema files are in Thief2\schema\), then place new schema file in there too. Open Speech.spc and add the line

voice vsomething		//some description

among the other voices. Do remember to replace vsomething with whatever schema_voice refers to in the schema file.

To make the new voice available, in Dromed use the command reload_schemas then save your gamesys.

You can now add the new object to the hierarchy, or simply modify an existing object.

The exact properties are for you to decide, though copying the properties as they are in the original gamesys, or on the original object, would be a good way to start.

dromed/object_files.txt · Last modified: 2008/11/19 18:28 by r_soul