The resource pipeline builds again

RPL4.RES is compiled from authored sources by RPL4TOOL -b, the original 1996
resource tool, which still builds in this tree. That pipeline did not work:
the tool aborted on the very first model, so the resource file could only be
consumed, never regenerated. Content could not be changed at all.

It died in PlugStream_FindEntryAndWriteObjectID resolving resource=
Translocation01 from AUDIO/PLYINT.SCP, a name defined in no file under
CONTENT/RP. The obvious suspect was the AWE32 soundbank path, since
AudioCard::LoadSBK is stubbed to return 1 by the Win32 port - but that is a
red herring. Supplying the banks changes nothing because nothing reads them
at build time. CreateStaticAudioStreamResource opens audio\static.scp, which
declares all 154 patch resources as plain text mapping each name to a bank
and patch number, and CONTENT/RP simply does not have that file. The sda4
developer drive does. Two more scripts included by 27 vehicles, VTVINT.SCP
and VTVEXT.SCP, were missing the same way. All three are kept in recovered/
because they are the keystone and are small.

No engine change was needed. The pipeline was missing content, not code.

build-res.ps1 assembles a build tree from the 4.10 content, those three
scripts, and the soundbanks and ~547 VIDEO files that RP412 ships complete
and the content tree does not. It never overwrites an authored file with a
shipped one, so archival content stays authoritative where it exists.

A model missing a skeleton is dropped SILENTLY - the tool logs and carries
on, producing a resource file with fewer models rather than failing. Check
the model count, which is why the script reports unresolved inputs.

-RestoreCutVehicles uncomments dark, blkspk and blktrn, three vehicles taken
out of the .bld after 4.10 shipped with their model ids left in place. All
three build clean and take the count from 42 to 45, exactly retail's, each
with its full subsystems, segments, damage zones and control mappings.

What this cannot do yet: eleven maps have no source. Five survive only on the
sda4 drive in a 1996 state older than retail, and otto, frstrm, burnt,
brewers, headoff and headmf are gone entirely - the .CAM cameras and .XST
existence boxes are here but the .MAP files are not. So a build from these
sources yields 45 models and zero maps against RP411's nine, and is not yet a
drop-in replacement for assets/RP411/RPL4.RES.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-08-06 17:12:00 -05:00
co-authored by Claude Opus 5
parent cf59ac9f4b
commit 8e2e00d8d3
5 changed files with 3769 additions and 0 deletions
+118
View File
@@ -0,0 +1,118 @@
# Rebuilding RPL4.RES
`RPL4.RES` is Red Planet's resource file — every vehicle, map, model, damage
zone, control mapping and audio stream the game loads. It is *compiled* from
authored sources by `RPL4TOOL -b`, the original 1996 resource tool, which
still builds in this tree as `Release\RPL4TOOL.exe` (see `BUILD.md`).
Until now that pipeline did not work. `RPL4TOOL -b` aborted on the very first
model, so `assets/RP411/RPL4.RES` could only be consumed, never regenerated.
This folder makes it build again.
```powershell
# rebuild exactly what RP411 ships (minus the maps, see below)
powershell -ExecutionPolicy Bypass -File tools\resbuild\build-res.ps1
# ...plus the three vehicles that were cut after 4.10
powershell -ExecutionPolicy Bypass -File tools\resbuild\build-res.ps1 -RestoreCutVehicles
```
Output lands in `%TEMP%\rp412-resbuild\rpl4.res`. Inspect any resource file
with `Release\RPL4TOOL.exe -l <file>`; that listing is the acceptance test for
anything built here. **The result is not yet a drop-in replacement for
`assets/RP411/RPL4.RES`** — see *What is still missing*.
## Why it was broken
`RPL4TOOL -b` died in `PlugStream_FindEntryAndWriteObjectID` while building
`player.mod`'s audio stream, resolving `resource=Translocation01` from
`AUDIO/PLYINT.SCP`. That name is defined in no file in `CONTENT/RP`.
The first guess — that it needed the AWE32 soundbanks through
`AudioCard::LoadSBK`, which the Win32 port stubbed to `return 1` — was wrong.
Supplying the banks changes nothing, because nothing reads them at build time.
The real answer is `L4AudioResourceManager::CreateStaticAudioStreamResource`
(`MUNGA_L4/L4AUDRES.cpp`), which opens **`audio\static.scp`**. That file
declares all 154 of RP's patch resources as plain text:
```
[PatchLevelOfDetail]
bank_ID=2
patch_ID=29
name=Translocation01LOD1
...
[PatchResource]
audio_level_of_detail=0.0, Translocation01LOD1
name=Translocation01
```
Every model's audio script resolves its `resource=` names against those, so
without `static.scp` the first model aborts and no `.res` is ever written.
`CONTENT/RP/AUDIO` does not have it — but the sda4 developer drive does.
No engine change was needed. The pipeline was missing content, not code.
## What the build tree is made of
`build-res.ps1` assembles three sources, and never overwrites an authored file
with a shipped one — archival content stays authoritative where it exists.
| source | provides |
|---|---|
| `TeslaRel410\CONTENT\RP` | models, solids, gauge art, audio scripts, `RPL4.BLD` |
| `recovered\` (this folder) | `STATIC.SCP`, `VTVINT.SCP`, `VTVEXT.SCP` |
| `assets\RP411\` | `AUDIO1/2.RES` soundbanks, ~547 `VIDEO` files |
The three recovered scripts came from `TeslaRel410\sda4\RPDAVE\AUDIO` (identical
to `RPLIVE`) and are kept here because they are the keystone and are small.
`VTVINT.SCP` and `VTVEXT.SCP` are `[include]`d by 27 vehicle audio scripts and
are absent from `CONTENT/RP` as well.
The `VIDEO` gap is mostly `.SKL` skeletons — `MAN.SKL`, `BAN.SKL`, `BUN.SKL`,
`DUN.SKL` and their `S` variants. A model missing one logs
`video\<x>.skl is empty or missing!`, then `<model> has no Segments!`, and is
**silently dropped from the build** — the tool does not fail, it just produces
a resource file with fewer models. Always check the model count.
## What is still missing
**Eleven maps have no source in any tree.** The build reports each one and
carries on:
| map | source |
|---|---|
| `wise`, `yip`, `pain`, `blade`, `lyzlane` | only in `sda4\RPDAVE\MAPS` (1996 dev state, older than retail) |
| `otto`, `frstrm`, `burnt`, `brewers`, `headoff`, `headmf` | **nowhere** |
`CONTENT/RP/MAPS` has the `.CAM` camera files and `SOLIDS` has the `.XST`
existence boxes, but the `.MAP` files themselves are gone. So a build from
here produces 45 GameModels and **zero maps**, against RP411's 9. Until those
are recovered, this pipeline can rebuild vehicles but cannot replace the
shipped resource file.
## The three cut vehicles
`-RestoreCutVehicles` uncomments three lines in `RPL4.BLD` that were commented
out after 4.10 shipped, with their model IDs left in place:
```
//Armadillo Class
model=puck.mod /id:19
//model=dark.mod /id:56 <- dark puck
//Experimental Vehicles
//model=blktrn.mod /id:47 <- black tornado
//model=blkspk.mod /id:48 <- black speck
```
All three build clean, taking the model count from 42 to 45 — exactly retail's
count. Each gets its full resource set: GameModel, Model List, VideoModel,
Subsystems, Segments, DamageZones, ControlsMappings and GaugeImage.
Two caveats. `blktrn` has no audio script anywhere (`BLKTRN.SCP` is absent from
every tree) and no gauge block in `L4GAUGE.CFG`, so its cockpit panel has no
layout to select — `dark` and `blkspk` still have theirs. And nothing has been
verified in-game; building is not the same as playable.
See `docs/CONTROL-PRESETS.md` for what these vehicles carry and the preset
tables they shipped with.
+103
View File
@@ -0,0 +1,103 @@
# ============================================================================
# build-res.ps1 - rebuild RPL4.RES from the 4.10 content sources
# ============================================================================
#
# Assembles a build tree from three places and runs the original resource
# compiler (Release\RPL4TOOL.exe -b). See README.md in this folder for what
# each piece is and why it is needed.
#
# 1. TeslaRel410\CONTENT\RP the authored content: models, solids,
# audio scripts, gauge art, the .bld script
# 2. recovered\ three audio scripts missing from (1),
# recovered from the sda4 developer drive.
# Without STATIC.SCP nothing builds at all.
# 3. assets\RP411\ the soundbanks and the .SKL skeletons that
# (1) is missing - RP412 ships complete sets
#
# Usage: powershell -ExecutionPolicy Bypass -File tools\resbuild\build-res.ps1
# [-Content <path>] [-Out <dir>] [-RestoreCutVehicles]
#
param(
[string]$Content = 'C:\VWE\TeslaRel410\CONTENT\RP',
[string]$Out = "$env:TEMP\rp412-resbuild",
# Uncomment dark / blkspk / blktrn in the .bld before building. They were
# commented out after 4.10 shipped; their sources are all still here.
[switch]$RestoreCutVehicles
)
$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
$tool = Join-Path $root 'Release\RPL4TOOL.exe'
$assets = Join-Path $root 'assets\RP411'
$recovered = Join-Path $PSScriptRoot 'recovered'
if (-not (Test-Path $tool)) { throw "$tool not found - build the solution first (BUILD.md 2)." }
if (-not (Test-Path $Content)) { throw "content tree not found: $Content" }
# --- assemble ---------------------------------------------------------------
Write-Host "Assembling build tree in $Out"
if (Test-Path $Out) { Remove-Item -Recurse -Force $Out }
New-Item -ItemType Directory -Force $Out | Out-Null
Copy-Item "$Content\*" $Out -Recurse -Force
# The soundbanks. AUDIO.INI names audio\audio1.res and audio2.res; the content
# tree carries only a 1-byte AUDIO.RES stub. RP412's copies are hash-identical
# to the 1996 originals in the pod image.
foreach ($bank in 'AUDIO1.RES', 'AUDIO2.RES') {
Copy-Item (Join-Path $assets "AUDIO\$bank") "$Out\AUDIO\" -Force
}
# The keystone. CreateStaticAudioStreamResource opens audio\static.scp, which
# defines all 154 PatchResources by name (Translocation01 -> bank 2, patch 29
# and so on). Every model's audio script resolves its resource= names against
# them, so without this file the very first model aborts the build.
Copy-Item "$recovered\*.SCP" "$Out\AUDIO\" -Force
# Skeletons and geometry the content tree is missing (BAN/BUN/DUN/MAN.SKL and
# their S variants at least). Fill gaps only - never overwrite authored content
# with the shipped copy, so archival files stay authoritative where they exist.
$filled = 0
foreach ($src in Get-ChildItem (Join-Path $assets 'VIDEO') -File) {
$dst = Join-Path "$Out\VIDEO" $src.Name
if (-not (Test-Path $dst) -or (Get-Item $dst).Length -eq 0) {
Copy-Item $src.FullName $dst -Force; $filled++
}
}
Write-Host " filled $filled missing VIDEO file(s)"
if ($RestoreCutVehicles) {
$bld = Join-Path $Out 'RPL4.BLD'
(Get-Content $bld -Raw) -replace '(?m)^//(model=(dark|blkspk|blktrn)\.mod)', '$1' |
Set-Content $bld -Encoding ascii
Write-Host " restored dark, blkspk, blktrn in RPL4.BLD"
}
Copy-Item $tool $Out -Force
# --- build ------------------------------------------------------------------
# RPL4TOOL ends in _getch() (RPL4TOOL.cpp:76), so it never exits on its own
# when stdout is redirected. Run it detached and reap it once the file lands.
Write-Host "Building..."
$log = Join-Path $Out 'build.log'
$p = Start-Process -FilePath (Join-Path $Out 'RPL4TOOL.exe') `
-ArgumentList '-b', 'rpl4.bld' -WorkingDirectory $Out `
-RedirectStandardOutput $log -PassThru -WindowStyle Hidden
if (-not $p.WaitForExit(300000)) { Start-Sleep -Seconds 2 }
if (-not $p.HasExited) { Stop-Process -Id $p.Id -Force }
$res = Join-Path $Out 'rpl4.res'
if (-not (Test-Path $res)) {
Get-Content $log -Tail 20 | ForEach-Object { Write-Host " $_" }
throw "build produced no rpl4.res - see $log"
}
# --- report -----------------------------------------------------------------
$missing = Select-String -Path $log -Pattern 'Does not exist!|is empty or missing!|has no Segments!' |
ForEach-Object { $_.Line.Trim() } | Sort-Object -Unique
Write-Host ("rpl4.res: {0:N0} bytes" -f (Get-Item $res).Length)
if ($missing) {
Write-Host "Unresolved inputs ($($missing.Count)) - see README.md 'What is still missing':"
$missing | ForEach-Object { Write-Host " $_" }
}
Write-Host "Output: $res"
Write-Host "List it with: Release\RPL4TOOL.exe -l `"$res`""
File diff suppressed because it is too large Load Diff
+534
View File
@@ -0,0 +1,534 @@
#
#------------------------------------------------------------------
# External VTV Audio Script
#------------------------------------------------------------------
#
#
#------------------------------------------------------------------
# AudioRenderTypes
#
# TransientAudioRenderType = 0
# SustainedAudioRenderType = 1
#
#------------------------------------------------------------------
# AudioSourcePriority
#
# MinAudioSourcePriority = 0
# LowAudioSourcePriority = 1
# MedAudioSourcePriority = 2
# HighAudioSourcePriority = 3
# MaxAudioSourcePriority = 4
#
#------------------------------------------------------------------
# AudioSourceMixPresence
#
# ManualAudioSourceMixPresence = 0
# MaxAudioSourceMixPresence = 1
# HighAudioSourceMixPresence = 2
# MedAudioSourceMixPresence = 3
# LowAudioSourceMixPresence = 4
# MinAudioSourceMixPresence = 5
#
#------------------------------------------------------------------
# AudioControlID
#
# NullAudioControlID = 0
# StartAudioControlID = 1
# StopAudioControlID = 2
# VolumeAudioControlID = 3
# PitchAudioControlID = 4
# BrightnessAudioControlID = 5
# AttackVolumeAudioControlID = 6
# AttackTimeAudioControlID = 7
# AudioControlIDCount = 8
#
#
#------------------------------------------------------------------
# Audio locations
#------------------------------------------------------------------
#
[L4AudioLocation]
location_offset=0.0,0.0,0.0
name=OriginLocation
#
#------------------------------------------------------------------
# Audio source components
#------------------------------------------------------------------
#
#
# Engine combo component
#
[Dynamic3DPatchSource]
location=OriginLocation
resource=EngineComboExt01
priority=1
mix_presence=2
volume_mix_level=0.95
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=0
compression_duration=0.0
name=EngineComboComponent
#
# Collision component
#
[Dynamic3DPatchSource]
location=OriginLocation
resource=CollisionExt01
priority=1
mix_presence=2
volume_mix_level=1.0
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=1
compression_duration=1.0
name=CollisionComponent
#
# Booster component
#
[Dynamic3DPatchSource]
location=OriginLocation
resource=BoosterExt01
priority=1
mix_presence=2
volume_mix_level=1.0
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=1
compression_duration=1.0
name=BoosterComponent
#
# Booster loop component
#
[Dynamic3DPatchSource]
location=OriginLocation
resource=BoosterLoopExt01
priority=1
mix_presence=2
volume_mix_level=1.0
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=1
compression_duration=1.0
name=BoosterLoopComponent
#
# Death component1
#
[Dynamic3DPatchSource]
location=OriginLocation
resource=DeathExt01
priority=1
mix_presence=2
volume_mix_level=1.0
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=1
compression_duration=2.0
name=DeathComponent1
#
# Death component2
#
[Dynamic3DPatchSource]
location=OriginLocation
resource=DeathExt01
priority=1
mix_presence=2
volume_mix_level=1.0
pitch_mix_offset=-200
brightness_mix_level=1.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=1
compression_duration=2.0
name=DeathComponent2
#
# Horn component
#
[Dynamic3DPatchSource]
location=OriginLocation
resource=Horn01
position=0
priority=1
mix_presence=0
volume_mix_level=1.0
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=0
compression_duration=0.0
name=HornComponent
#
#------------------------------------------------------------------
# Non-trigger watchers
#------------------------------------------------------------------
#
#------------------------------------------------------------------
#
# Engine combo : amplitude smoother -> amplitude
#
[AudioControlSmoother]
audio_component=EngineComboComponent
number_of_samples=4
control_ID=3
name=EngineComboAmplitudeSmoother
#
# Engine combo : amplitude mixer -> amplitude smoother
#
[AudioControlMixer]
audio_component=EngineComboAmplitudeSmoother
first_input_control_ID=100
last_input_control_ID=103
output_control_ID=3
name=EngineComboAmplitudeMixer
#
# Engine combo : linear acceleration -> amplitude mixer
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalAcceleration
motion_type=0
motion_value=3
audio_component=EngineComboAmplitudeMixer
attribute_value_boundary1=0.0
attribute_value_boundary2=7.0
control_ID=3
control_value_boundary1=0.0
control_value_boundary2=1.0
exponent=0.2
dump_value=0
#
# Engine combo : linear velocity -> amplitude mixer
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=EngineComboAmplitudeMixer
attribute_value_boundary1=0.0
attribute_value_boundary2=250.0
control_ID=3
control_value_boundary1=0.0
control_value_boundary2=1.0
exponent=0.2
dump_value=0
#
# Engine combo : linear velocity -> pitch
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=EngineComboComponent
attribute_value_boundary1=0.0
attribute_value_boundary2=250.0
control_ID=4
control_value_boundary1=-700.0
control_value_boundary2=1200.0
exponent=0.5
dump_value=0
#
# Engine combo : linear velocity -> filter
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=EngineComboComponent
attribute_value_boundary1=0.0
attribute_value_boundary2=250.0
control_ID=5
control_value_boundary1=1.0
control_value_boundary2=0.78
exponent=2.0
dump_value=0
#------------------------------------------------------------------
#
# Collision : resource select
#
[AudioResourceSelector]
audio_source=CollisionComponent
audio_resource_index=CollisionExtIndex
control_ID=100
min_control_value=0.0
max_control_value=1.0
dump_value=0
name=CollisionResourceSelect
#
# Collision : collision speed -> resource select
#
[AudioScalarScale]
subsystem=Entity
attribute=CollisionSpeed
motion_type=0
motion_value=3
audio_component=CollisionResourceSelect
attribute_value_boundary1=2.0
attribute_value_boundary2=30.0
control_ID=100
control_value_boundary1=0.0
control_value_boundary2=1.0
exponent=0.3
dump_value=0
#
# Collision : collision speed -> attack time
#
[!AudioScalarScale]
subsystem=Entity
attribute=CollisionSpeed
audio_component=CollisionComponent
attribute_value_boundary1=0.0
attribute_value_boundary2=30.0
control_ID=7
control_value_boundary1=0.18
control_value_boundary2=0.0
exponent=0.2
dump_value=0
#
# Collision : collision speed -> attack volume
#
[AudioScalarScale]
subsystem=Entity
attribute=CollisionSpeed
audio_component=CollisionComponent
attribute_value_boundary1=2.0
attribute_value_boundary2=30.0
control_ID=6
control_value_boundary1=0.9
control_value_boundary2=1.0
exponent=0.5
dump_value=0
#
# Collision : linear velocity -> pitch
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=CollisionComponent
attribute_value_boundary1=0.0
attribute_value_boundary2=200.0
control_ID=4
control_value_boundary1=0.0
control_value_boundary2=-400.0
exponent=0.3
dump_value=0
#
#------------------------------------------------------------------
# Trigger watchers
#------------------------------------------------------------------
#
#
#------------------------------------------------------------------
# Engine combo trigger
#------------------------------------------------------------------
#
# HACK - seem to require this for when the replicant first appears
[AudioControlSend]
audio_component=EngineComboComponent
control_ID=1
control_value=0.0
[AudioStateTrigger]
subsystem=Entity
attribute=SimulationState
audio_component=EngineComboComponent
trigger_state=0
inverse_trigger=0
control_ID=1
control_value=0.0
dump_value=0
[AudioStateTrigger]
subsystem=Entity
attribute=SimulationState
audio_component=EngineComboComponent
trigger_state=2
inverse_trigger=0
control_ID=2
control_value=0.0
dump_value=0
#
#------------------------------------------------------------------
# Collision trigger
#------------------------------------------------------------------
#
[AudioStateTrigger]
subsystem=Entity
attribute=CollisionState
audio_component=CollisionComponent
trigger_state=1
inverse_trigger=0
control_ID=1
control_value=1.5
dump_value=0
#
#------------------------------------------------------------------
# Booster trigger
#------------------------------------------------------------------
#
[AudioLogicalTrigger]
subsystem=Entity
attribute=BoosterOn
audio_component=BoosterComponent
attribute_match_value=1
control_ID=1
control_value=0.0
dump_value=0
[AudioLogicalTrigger]
subsystem=Entity
attribute=BoosterOn
audio_component=BoosterComponent
attribute_match_value=0
control_ID=2
control_value=0.0
dump_value=0
[AudioLogicalTrigger]
subsystem=Entity
attribute=BoosterOn
audio_component=BoosterLoopComponent
attribute_match_value=1
control_ID=1
control_value=0.0
dump_value=0
[AudioLogicalTrigger]
subsystem=Entity
attribute=BoosterOn
audio_component=BoosterLoopComponent
attribute_match_value=0
control_ID=2
control_value=0.0
dump_value=0
#
#------------------------------------------------------------------
# Death trigger
#------------------------------------------------------------------
#
[AudioStateTrigger]
subsystem=Entity
attribute=SimulationState
audio_component=DeathComponent1
trigger_state=2
inverse_trigger=0
control_ID=1
control_value=0.0
dump_value=0
[AudioStateTrigger]
subsystem=Entity
attribute=SimulationState
audio_component=DeathComponent1
trigger_state=2
inverse_trigger=1
control_ID=2
control_value=0.0
dump_value=0
[AudioStateTrigger]
subsystem=Entity
attribute=SimulationState
audio_component=DeathComponent2
trigger_state=2
inverse_trigger=0
control_ID=1
control_value=0.0
dump_value=0
[AudioStateTrigger]
subsystem=Entity
attribute=SimulationState
audio_component=DeathComponent2
trigger_state=2
inverse_trigger=1
control_ID=2
control_value=0.0
dump_value=0
#
#------------------------------------------------------------------
# Horn trigger
#------------------------------------------------------------------
#
[AudioIntegerTrigger]
subsystem=Entity
attribute=HornBlast
audio_component=HornComponent
attribute_value_threshold=0.0
control_ID_on=1
control_ID_off=2
control_value_on=0.0
control_value_off=0.0
inverse_trigger=0
dump_value=0
+901
View File
@@ -0,0 +1,901 @@
#
#------------------------------------------------------------------
# VTV Audio Script
#------------------------------------------------------------------
#
#
#------------------------------------------------------------------
# AudioRenderTypes
#
# TransientAudioRenderType = 0
# SustainedAudioRenderType = 1
#
#------------------------------------------------------------------
# AudioSourcePriority
#
# MinAudioSourcePriority = 0
# LowAudioSourcePriority = 1
# MedAudioSourcePriority = 2
# HighAudioSourcePriority = 3
# MaxAudioSourcePriority = 4
#
#------------------------------------------------------------------
# AudioSourceMixPresence
#
# ManualAudioSourceMixPresence = 0
# MaxAudioSourceMixPresence = 1
# HighAudioSourceMixPresence = 2
# MedAudioSourceMixPresence = 3
# LowAudioSourceMixPresence = 4
# MinAudioSourceMixPresence = 5
#
#------------------------------------------------------------------
# AudioControlID
#
# NullAudioControlID = 0
# StartAudioControlID = 1
# StopAudioControlID = 2
# VolumeAudioControlID = 3
# PitchAudioControlID = 4
# BrightnessAudioControlID = 5
# AttackVolumeAudioControlID = 6
# AttackTimeAudioControlID = 7
# AudioControlIDCount = 8
#
#
#------------------------------------------------------------------
# Audio locations
#------------------------------------------------------------------
#
[L4AudioLocation]
location_offset=0.0,0.0,0.0
name=OriginLocation
#
#------------------------------------------------------------------
# Includes
#------------------------------------------------------------------
#
[include]
file=audio\colint.scp
file=audio\buttons.scp
file=audio\scoring.scp
#
#------------------------------------------------------------------
# Audio source components
#------------------------------------------------------------------
#
#
# Cockpit wind component
#
[DirectPatchSource]
location=OriginLocation
resource=CockpitWindDrone01
position=0
priority=1
mix_presence=0
volume_mix_level=0.9
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=1
use_attack_time_scale=0
has_compression_curve=0
compression_duration=0.0
name=CockpitWindComponent
#
# Cockpit turbulence component
#
[DirectPatchSource]
location=OriginLocation
resource=CockpitWindRush01
position=0
priority=1
mix_presence=3
volume_mix_level=1.0
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=1
use_attack_time_scale=0
has_compression_curve=0
compression_duration=0.0
name=CockpitTurbComponent
#
# Engine thrust component
#
[DirectPatchSource]
location=OriginLocation
resource=EngineThrustInt02
position=1
priority=1
mix_presence=3
volume_mix_level=1.0
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=1
use_attack_time_scale=0
has_compression_curve=0
compression_duration=0.0
name=EngineThrustComponent
#
# Scrape component
#
[Static3DPatchSource]
location=OriginLocation
resource=ScrapeInt01
priority=1
mix_presence=0
volume_mix_level=1.0
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=0
compression_duration=0.0
name=ScrapeComponent
#
# Booster component
#
[DirectPatchSource]
location=OriginLocation
resource=BoosterInt01
position=1
priority=3
mix_presence=2
volume_mix_level=0.95
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=1
compression_duration=6.0
name=BoosterComponent
#
# Booster loop component
#
[DirectPatchSource]
location=OriginLocation
resource=BoosterLoopInt01
position=1
priority=3
mix_presence=2
volume_mix_level=0.95
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=1
compression_duration=6.0
name=BoosterLoopComponent
#
# Death components
#
[DirectPatchSource]
location=OriginLocation
resource=DeathInt01
position=0
priority=4
mix_presence=1
volume_mix_level=0.95
pitch_mix_offset=0.0
brightness_mix_level=0.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=0
compression_duration=0.0
name=DeathComponent01
[DirectPatchSource]
location=OriginLocation
resource=DeathInt02
position=1
priority=4
mix_presence=1
volume_mix_level=1.0
pitch_mix_offset=-200
brightness_mix_level=0.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=0
compression_duration=0.0
name=DeathComponent02
#
# Horn component
#
[DirectPatchSource]
location=OriginLocation
resource=Horn01
position=0
priority=3
mix_presence=0
volume_mix_level=0.95
pitch_mix_offset=0.0
brightness_mix_level=1.0
use_brightness_scale=0
use_attack_time_scale=0
has_compression_curve=0
compression_duration=0.0
name=HornComponent
#
#------------------------------------------------------------------
# Non-trigger watchers
#------------------------------------------------------------------
#
#------------------------------------------------------------------
#
# Cockpit wind : linear velocity -> amplitude
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=CockpitWindComponent
attribute_value_boundary1=5.0
attribute_value_boundary2=200.0
control_ID=3
control_value_boundary1=0.0
control_value_boundary2=1.0
exponent=0.3
dump_value=0
#
# Cockpit wind : linear velocity -> pitch
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=CockpitWindComponent
attribute_value_boundary1=5.0
attribute_value_boundary2=300.0
control_ID=4
control_value_boundary1=-1800.0
control_value_boundary2=2800.0
exponent=0.3
dump_value=0
#
# Cockpit wind : linear velocity -> filter
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=CockpitWindComponent
attribute_value_boundary1=5.0
attribute_value_boundary2=300.0
control_ID=5
control_value_boundary1=1.0
control_value_boundary2=0.4
exponent=2.0
dump_value=0
#------------------------------------------------------------------
#
# Cockpit turb : linear velocity -> amplitude
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=CockpitTurbComponent
attribute_value_boundary1=70.0
attribute_value_boundary2=200.0
control_ID=3
control_value_boundary1=0.0
control_value_boundary2=1.0
exponent=0.2
dump_value=0
#
# Pitch Mixer : pitch mixer -> pitch
#
[AudioControlMixer]
audio_component=CockpitTurbComponent
first_input_control_ID=100
last_input_control_ID=102
output_control_ID=4
name=CockpitTurbPitchMixer
#
# Cockpit turb : linear velocity -> pitch mixer
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=CockpitTurbPitchMixer
attribute_value_boundary1=70.0
attribute_value_boundary2=250.0
control_ID=100
control_value_boundary1=-100.0
control_value_boundary2=0.0
exponent=1.0
dump_value=0
#
# Cockpit turb : angular velocity -> pitch mixer
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=1
motion_value=3
audio_component=CockpitTurbPitchMixer
attribute_value_boundary1=0.0
attribute_value_boundary2=0.3
control_ID=101
control_value_boundary1=-200.0
control_value_boundary2=0.0
exponent=1.0
dump_value=0
#
# Cockpit turb : filter smoother -> filter
#
[AudioControlSmoother]
audio_component=CockpitTurbComponent
number_of_samples=7
control_ID=5
name=CockpitTurbFilterSmoother
#
# Cockpit turb : angular velocity -> filter smoother
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=1
motion_value=3
audio_component=CockpitTurbFilterSmoother
attribute_value_boundary1=0.0
attribute_value_boundary2=0.3
control_ID=5
control_value_boundary1=0.1
control_value_boundary2=0.8
exponent=0.4
dump_value=0
#------------------------------------------------------------------
#
# Engine thrust : amplitude smoother -> amplitude
#
[AudioControlSmoother]
audio_component=EngineThrustComponent
number_of_samples=20
control_ID=3
name=EngineThrustVolumeSmoother
#
# Engine thrust : amplitude mixer -> amplitude smoother
#
[AudioControlMixer]
audio_component=EngineThrustVolumeSmoother
first_input_control_ID=100
last_input_control_ID=103
output_control_ID=3
name=EngineThrustAmplitudeMixer
#
# Engine thrust : linear acceleration -> amplitude mixer
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalAcceleration
motion_type=0
motion_value=3
audio_component=EngineThrustAmplitudeMixer
attribute_value_boundary1=0.1
attribute_value_boundary2=7.0
control_ID=100
control_value_boundary1=0.0
control_value_boundary2=1.0
exponent=0.4
dump_value=0
#
# Engine thrust : angular velocity -> amplitude mixer
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=1
motion_value=3
audio_component=EngineThrustAmplitudeMixer
attribute_value_boundary1=0.0
attribute_value_boundary2=2.0
control_ID=101
control_value_boundary1=0.0
control_value_boundary2=1.0
exponent=1.0
dump_value=0
#
# Engine thrust : linear velocity -> amplitude mixer
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=EngineThrustAmplitudeMixer
attribute_value_boundary1=10.0
attribute_value_boundary2=250.0
control_ID=102
control_value_boundary1=0.0
control_value_boundary2=-2.0
exponent=1.5
dump_value=0
#
# Engine thrust : height above terrain -> amplitude mixer
#
[AudioScalarScale]
subsystem=Entity
attribute=HeightAboveTerrain
audio_component=EngineThrustAmplitudeMixer
attribute_value_boundary1=0.0
attribute_value_boundary2=40.0
control_ID=103
control_value_boundary1=0.25
control_value_boundary2=-0.75
exponent=1.0
dump_value=0
#
# Engine thrust : pitch smoother -> pitch
#
[AudioControlSmoother]
audio_component=EngineThrustComponent
number_of_samples=30
control_ID=4
name=EngineThrustPitchSmoother
#
# Engine thrust : pitch mixer -> pitch smoother
#
[AudioControlMixer]
audio_component=EngineThrustPitchSmoother
first_input_control_ID=100
last_input_control_ID=102
output_control_ID=4
name=EngineThrustPitchMixer
#
# Engine thrust : linear acceleration -> pitch mixer
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalAcceleration
motion_type=0
motion_value=3
audio_component=EngineThrustPitchMixer
attribute_value_boundary1=0.1
attribute_value_boundary2=7.0
control_ID=100
control_value_boundary1=-600.0
control_value_boundary2=200.0
exponent=1.0
dump_value=0
#
# Engine thrust : angular velocity -> pitch mixer
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=1
motion_value=3
audio_component=EngineThrustPitchMixer
attribute_value_boundary1=0.0
attribute_value_boundary2=2.0
control_ID=101
control_value_boundary1=0.0
control_value_boundary2=200.0
exponent=1.0
dump_value=0
#
# Engine thrust : height above terrain -> pitch mixer
#
[AudioScalarScale]
subsystem=Entity
attribute=HeightAboveTerrain
audio_component=EngineThrustPitchMixer
attribute_value_boundary1=0.0
attribute_value_boundary2=40.0
control_ID=102
control_value_boundary1=-100.0
control_value_boundary2=100.0
exponent=1.0
dump_value=0
#
# Engine thrust : filter multiplier -> filter
#
[AudioControlMultiplier]
audio_component=EngineThrustComponent
first_input_control_ID=100
last_input_control_ID=101
output_control_ID=5
name=EngineThrustFilterMultiplier
#
# Engine thrust : hinge -> filter multiplier
#
[AudioHingeScale]
subsystem=Entity
attribute=ThrusterPitch
audio_component=EngineThrustFilterMultiplier
attribute_value_boundary1=-1.321
attribute_value_boundary2=1.321
control_ID=100
control_value_boundary1=1.0
control_value_boundary2=0.7
exponent=1.0
dump_value=0
#
# Engine thrust : filter smoother -> filter multiplier
#
[AudioControlSmoother]
audio_component=EngineThrustFilterMultiplier
number_of_samples=15
control_ID=101
name=EngineThrustFilterSmoother
#
# Engine thrust : linear acceleration -> filter smoother
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalAcceleration
motion_type=0
motion_value=3
audio_component=EngineThrustFilterSmoother
attribute_value_boundary1=0.1
attribute_value_boundary2=7.0
control_ID=101
control_value_boundary1=0.5
control_value_boundary2=1.0
exponent=0.3
dump_value=0
#------------------------------------------------------------------
#
# Scrape : collision speed -> attack time
#
[!AudioScalarScale]
subsystem=Entity
attribute=CollisionSpeed
audio_component=ScrapeComponent
attribute_value_boundary1=0.0
attribute_value_boundary2=70.0
control_ID=7
control_value_boundary1=0.2
control_value_boundary2=0.1
exponent=1.0
dump_value=0
#
# Scrape : linear velocity -> amplitude
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=ScrapeComponent
attribute_value_boundary1=0.0
attribute_value_boundary2=100.0
control_ID=3
control_value_boundary1=0.8
control_value_boundary2=1.0
exponent=0.2
dump_value=0
#
# Scrape : linear velocity -> pitch
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=ScrapeComponent
attribute_value_boundary1=0.0
attribute_value_boundary2=200.0
control_ID=4
control_value_boundary1=-400.0
control_value_boundary2=400.0
exponent=0.5
dump_value=0
#------------------------------------------------------------------
#
# Booster : resource select
#
[AudioResourceSelector]
audio_source=BoosterComponent
audio_resource_index=BoosterIntIndex
control_ID=100
min_control_value=0.0
max_control_value=1.0
dump_value=0
name=BoosterResourceSelect
#
# Booster : Linear velocity -> resource select
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=BoosterResourceSelect
attribute_value_boundary1=30.0
attribute_value_boundary2=150.0
control_ID=100
control_value_boundary1=0.0
control_value_boundary2=1.0
exponent=1.0
dump_value=0
#
# Boost Loop : filter smoother -> filter
#
[AudioControlSmoother]
audio_component=BoosterLoopComponent
number_of_samples=7
control_ID=5
name=BoosterLoopFilterSmoother
#
# Boost Loop : angular velocity -> filter smoother
#
[AudioMotionScale]
subsystem=Entity
attribute=LocalVelocity
motion_type=1
motion_value=3
audio_component=BoosterLoopFilterSmoother
attribute_value_boundary1=0.0
attribute_value_boundary2=0.3
control_ID=5
control_value_boundary1=0.1
control_value_boundary2=0.8
exponent=0.4
dump_value=0
#
#------------------------------------------------------------------
# Trigger watchers
#------------------------------------------------------------------
#
#
#------------------------------------------------------------------
# Wind trigger
#------------------------------------------------------------------
#
[AudioMotionTrigger]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=CockpitWindComponent
attribute_value_threshold=5.0
control_ID_on=1
control_ID_off=2
control_value_on=0.0
control_value_off=0.0
inverse_trigger=0
dump_value=0
#
#------------------------------------------------------------------
# Turbulence trigger
#------------------------------------------------------------------
#
[AudioMotionTrigger]
subsystem=Entity
attribute=LocalVelocity
motion_type=0
motion_value=3
audio_component=CockpitTurbComponent
attribute_value_threshold=70.0
control_ID_on=1
control_ID_off=2
control_value_on=0.0
control_value_off=0.0
inverse_trigger=0
dump_value=0
#
#------------------------------------------------------------------
# Engine thrust trigger
#------------------------------------------------------------------
#
# HACK - seems to require this for when the entity first appears
[AudioControlSend]
audio_component=EngineThrustComponent
control_ID=1
control_value=0.0
[AudioStateTrigger]
subsystem=Entity
attribute=SimulationState
audio_component=EngineThrustComponent
trigger_state=0
inverse_trigger=0
control_ID=1
control_value=0.0
dump_value=0
[AudioStateTrigger]
subsystem=Entity
attribute=SimulationState
audio_component=EngineThrustComponent
trigger_state=2
inverse_trigger=0
control_ID=2
control_value=0.0
dump_value=0
#
#------------------------------------------------------------------
# Scrape trigger
#------------------------------------------------------------------
#
[L4AudioCollisionTrigger]
subsystem=Entity
attribute=CollisionState
normal_attribute=CollisionNormal
audio_component=ScrapeComponent
trigger_state=2
control_ID=1
control_value=0.0
dump_value=0
[AudioStateTrigger]
subsystem=Entity
attribute=CollisionState
audio_component=ScrapeComponent
trigger_state=2
inverse_trigger=1
control_ID=2
control_value=0.0
dump_value=0
#
#------------------------------------------------------------------
# Death trigger
#------------------------------------------------------------------
#
[AudioStateTrigger]
subsystem=Entity
attribute=SimulationState
audio_component=DeathComponent01
trigger_state=2
inverse_trigger=0
control_ID=1
control_value=0.0
dump_value=0
[AudioStateTrigger]
subsystem=Entity
attribute=SimulationState
audio_component=DeathComponent02
trigger_state=2
inverse_trigger=0
control_ID=1
control_value=0.0
dump_value=0
[AudioStateTrigger]
subsystem=Entity
attribute=SimulationState
audio_component=DeathComponent01
trigger_state=2
inverse_trigger=1
control_ID=2
control_value=0.0
dump_value=0
[AudioStateTrigger]
subsystem=Entity
attribute=SimulationState
audio_component=DeathComponent02
trigger_state=2
inverse_trigger=1
control_ID=2
control_value=0.0
dump_value=0
#
#------------------------------------------------------------------
# Horn trigger
#------------------------------------------------------------------
#
[AudioIntegerTrigger]
subsystem=ControlsMapper
attribute=HornBlast
audio_component=HornComponent
attribute_value_threshold=0.0
control_ID_on=1
control_ID_off=2
control_value_on=0.0
control_value_off=0.0
inverse_trigger=0
dump_value=0