Skip to content

Commit e3356cf

Browse files
committed
change: Still use spatialized sound when no speaker is defined, but just not coming from anywhere but the actor entity
1 parent aa5d26b commit e3356cf

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ CCAutoVCD assumes that you have a specific filestructure, and it's been designed
2424
1. Soundscripts:
2525
1. Soundscripts will get written to `<game>/scripts/soundscripts/vo/<actor_name>/<template_name>.txt`. Remember to include that directory in your `game_sounds_manifest.txt`!
2626

27-
2. CCAutoVCD assumes that there are certain operator stacks available. For spatialized VO it assumes the `update_dialog_spatial_<actor_name>` is available, and for unspatialized: `update_dialog_<actor_name>`. If the game doesn't have that sound operator stack defined it will **silently** fail to load the sound! Sound operator stack creation won't be covered here, however it is recommended to just look at the original stacks such as `update_dialog_spatial_cave` or other. Remember to add definitions to `soundmixers.txt` for soundmixers to work properly (since the paths to sound files are different based on the actor)!
27+
2. CCAutoVCD assumes that there are certain operator stacks available. It assumes the `update_dialog_spatial_<actor_name>` is available, and for when the `"speaker"` setting is not defined, it assumes the `position array` stack already has the 0th position defined as the source entity internally. If the game doesn't have that sound operator stack defined it will **silently** fail to load the sound! Sound operator stack creation won't be covered here, however it is recommended to just look at the original stacks such as `update_dialog_spatial_cave` or other. Remember to add definitions to `soundmixers.txt` for soundmixers to work properly (since the paths to sound files are different based on the actor)!
2828

2929
2. Scenes (VCDs):
3030
1. Scenes will get written to `<game>/scenes/<actor_name>/<scene_name>.vcd`

src/template_class.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,10 @@ def GetSoundscript(self):
160160
ents = list(ents)
161161

162162
if not ents:
163-
LOGGER.Warning(f"No specified speaker targets found in map {self.map} for {self.name}! Cannot spatialize sound, falling back to unspatialized.")
163+
LOGGER.Warning(f"No specified speaker targets found in map {self.map} for {self.name}! Cannot spatialize sound, falling back to actor only.")
164164

165165
# Fallback to unspatialized
166-
out += TAB3 + f'"import_stack" "update_dialog_{self.actor}"\n'
166+
out += TAB3 + f'"import_stack" "update_dialog_spatial_{self.actor}"\n'
167167
out += TAB2 + "}\n"
168168
out += TAB + "}\n"
169169
out += "}\n"
@@ -185,7 +185,7 @@ def GetSoundscript(self):
185185
out += TAB3 + "}\n"
186186

187187
else:
188-
out += TAB3 + f'"import_stack" "update_dialog_{self.actor}"\n'
188+
out += TAB3 + f'"import_stack" "update_dialog_spatial_{self.actor}"\n'
189189

190190
out += TAB2 + "}\n"
191191
out += TAB + "}\n"

0 commit comments

Comments
 (0)