This tutorial explains how to define custom sounds schemas. All names are without the enclosing quotes unless otherwise noted.
Custom schemas for ambient sounds
1. Save your .wav file in IMA ADPCM 22Khz 4 bit Mono format in a ‘\snd\myconv\English\’ subdirectory of your main Thief directory.
2. Create a subdirectory of your main Thief directory named ‘schema’ Download the following files and extract to the directory you just created:
SCHEMAS_UPDATE.ZIP3. Create a plain text file in the schema entitled ‘myschema.sch’ Put the following information in it:// This is a comment
// Define new archtype under Object->Sound->Schema->AMBIENTS
keehit_s // name of .wav file(s) minus extension, replace with the name of your custom sound.
4. Open DromEd, and type ‘reload_schemas’ at the command prompt. Type ‘play_schema myschema’ to test your sound. Note this constitutes a change to the gamsys, and thus you will have to save the gamsys.
5. Create an ambient sound as you normally would, and set the Schema to ‘myschema’
A description of the schema tags follows:
archetype AMBIENTS – The archetype of the current schema in the Object Hierarchy.
schema myschema – Defines the name of the current schema.
mono_loop 0 0 – ‘As is’ will continualy loop the specified schemas. It works in miliseconds so you could use mono_loop 5000 7000 which would loop the next sound within 5 to 7 seconds of the previous. In other words there would be a 5 to 7 second pause between each sound. If you wanted there to be an absolute pause, say 5 seconds, you could use mono_loop 5000 5000. (thanks DarkAngel)
poly_loop 0 0 – exact usage unkown.
volume -500 – The relative volume of the schema. It’s a negative value, the closer to positive 1 it is, the louder it is.
Custom schemas for conversations
using custom schemas in conversations takes a little more work. Here’s what you need to do in addition to the process detailed above:
1. Create a plain text file in the schema directory, ‘myconv.spc’ with the following content:
// This is a comment
concept myconv 4 // define a custom sound concept.
voice vcustom // define a custom voice to play the sound.
2. Add the following line to myschema.sch:
schema_voice vcustom 1 myconv (LineNo 1 1) // defines the voice and line information for conv.
This line is a bit confusing, so let’s break it down:
‘schema_voice vcustom’: defines the voice that is used to play this schema
‘1’: unknown. but necessary. 🙂
‘myconv’: defines the concept that this schema is attached to. This is what you put in the first argument for a Play Sound/Motion.
‘(LineNo 1 1)’: defines line number. This is what you put in second argument for a Play Sound/Motion.
3. Open DromEd if necessary, and type ‘reload_schemas’ at the command prompt. Type ‘play_schema myschema’ to test your sound.
4. Create a conversation. If you need help on this, follow THIS TUTORIAL. For the first argument, use ‘myconv’. Second argument is ‘LineNo 1’. Set the actor’s voice to ‘vcustom’.
Using custom schemas with existing voices
The problem with the above method is the inability to have an AI use the existing voices with the new schemas. There is, however, an easy to solution to this problem. Instead of using the voice, ‘vcustom’ in the conversation information line, use the name of the original voice. For example, if I wanted to have a guard with the original voice, ‘guard1’ and a new conversation line, I’d put ‘guard1’ in place of ‘vcustom’ and set the AI’s Speech>Voice property to ‘guard1’