User Tools

Site Tools


Schema Files

Parts of a schema

schema schema_name
archetype ARCHETYPE
mono_loop 0 0
volume -750
env_tag (Event EventTag) (ExtraTag TagValue)
This is the name of your schema. Dromed will create an archetype with this name when you reload the schemas.
This is the archetype under which the new schema will be created. These are defined in the file BASE.ARC, though I think you can probably define them anywhere so long as it is loaded before any schema that uses them. Any file with the extension .ARC should work. They are basically empty schemas that are only used for sorting other schemas under.

Again, you do not create these schema archetypes manually. The reload_schemas command will handle it all.

This specifies that this schema is to be looped continuously.
The volume at which the schema should be played. -1 is full volume, the farther into the negative you go, the quieter the schema will play.
A list of the WAV files your schema should use, separated by spaces or newlines. You can also specify the frequency with which a particular wave file will be played by following the wavefile name with freq and then a number, for example:
MySample1 freq 1 MySample2 freq 1 MySample3 freq 2

In this example, MySample2 will be as likely to be chosen as the other two samples combined.
The tags for this archetype. Used in conjunction with the Schema→Class Tags property, and usually scripts that play schemas (such as the elevator script).
(Event EventTag)
The Event tag is required for all schemas. The possible events are defined in EnvSound.spc.
(ExtraTag TagValue)
Other tags are optional. The tag types and values are defined in EnvSound.spc.


mono_loop takes 2 arguments, min_delay and max_delay. If you use mono_loop 0 0 with a single SampleName then you get a continuous loop, as there’s no delay or switching between sounds.

schema blah
archetype AMB_MISC
mono_loop 25000 45000
volume -800
exp1 exp2 exp3 exp4 exp5 exp6

This randomly chooses one of the six WAV files and plays it, then waits a random time between 25 and 45 seconds before doing it again. It’s nice for offering an occasional supplement to the primary looping ambient.

poly_loop has an additional argument before the time values. It is the number of ambients that are allowed to play simultaneously. If you had something like:

schema blah
archetype AMB_MISC
poly_loop 2 5000 8000
volume -200
exp1 exp2 exp3 exp4 exp5 exp6

And some of those sounds were longer than 8 seconds, the schema would allow them to overlap and would start the next sound before the last one finished.

Make a new elevator type schema

Create a schema file for your new sample set and put in something like this:

schema myvator_loop
archetype DEVICE_LIFT
mono_loop 0 0
volume -750
env_tag (Event ActiveLoop) (ElevType MyNewVator)

schema myvator_stop
archetype DEVICE_LIFT
volume -750
env_tag (Event Deactivate) (ElevType MyNewVator)

Where the myvator_loop and myvator_stop are unique names for the new schemas. MyStartSample and MyStopSample are the names of the WAV files you want to play. The name MyNewVator is the new elevator type.

Now open EnvSound.spc and add your new elevator type to the list. Find the line:

tag ElevType Elev1Plat Elev2Hmr Elev3WHdoor TubeLift SkyLight LightHseFloor DumbWaiter MovingTarget

… and then add your new tag to the end of the list, like this:

tag ElevType Elev1Plat Elev2Hmr Elev3WHdoor TubeLift SkyLight LightHseFloor DumbWaiter MovingTarget MyNewVator

You’ll probably want to use better names than the ones I’ve used in my examples.

dromed/schema_files.txt · Last modified: 2007/06/26 17:40 (external edit)