Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 6eeced4

Browse files
committed
Update changelog with sound changes
1 parent 5ed4b32 commit 6eeced4

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
143143

144144
- Added new lua `Vector` functions: `GetRadRotated(angle)` and `GetDegRotated(angle)`. They return a rotated copy of the vector without modifying it.
145145

146+
- Added `Enum` binding for `SoundSet SoundSelectionCycleMode`: `RANDOM = 0, FORWARDS = 1, ALL = 2`.
147+
148+
- Added `Enum` binding for SoundContainer SoundOverlapMode`: `OVERLAP = 0, RESTART = 1, IGNORE_PLAY = 2`.
149+
150+
- New `SoundContainer` function `Restart`, which allows you to restart a playing `SoundContainer`. Also another `Play` function, that lets you just specify the player to play the sound for.
151+
152+
- New `HDFirearm` INI property `PreFireSound`, which allows you to specify a sound that will play exactly once before the weapon fires. Note that this was designed primarily for things like flamethrowers, semi-auto weapons may wonky with it, and full-auto weapons may fire multiple shots in the first burst, if you don't also set an `ActivationDelay`.
153+
154+
- `SoundSets` have been made a bit more fully featured, they can now have sub `SoundSets` and their own SoundSelectionCycleMode` and they now have a Lua binding so you can create them in Lua with `local mySoundSet = SoundSet()`. They have the following INI and Lua properties:
155+
`SoundSelectionCycleMode` (INI and Lua R/W) - Determines how sounds in this `SoundSet` will be selected each time it is played (or when `SelectNextSounds` is called). Note that sub `SoundSets` can have different `SoundSelectionCycleModes`. `SoundSets` with sub `SoundSets` and sounds whose `SoundSelectionCycleMode` is `FORWARDS` will first go through their sounds, then each sub `SoundSet`.
156+
157+
`soundSet.SubSoundSets` (Lua R) - An iterator over the sub `SoundSets` of this `SoundSet`, allowing you to manipulate them as you would any `SoundSet`.
158+
`soundSet:HasAnySounds(includeSubSoundSets)` (Lua) - Whether or not this `SoundSet` has any sounds, optionally including its sub `SoundSets`.
159+
`soundSet:SelectNextSounds()` (Lua)` - Selects the next sounds for this `SoundSet`. Note that playing a `SoundContainer` will always also do this, so this is only really useful to allow you to skip sounds when `SoundSelectionCycleMode` is set to `FORWARDS`.
160+
`soundSet:AddSound("Path/to/sound")` (Lua) - Adds the sound at the given path with no offset, 0 minimum audible distance, and default attenuation start distance.
161+
`soundSet:AddSound("Path/to/sound", offset, minimumAudibleDistance, attenuationStartDistance)` (Lua) - Adds the sound at the given path with the given parameters.
162+
`soundSet:AddSoundSet(soundSetToAdd)` (Lua) - Adds the given `SoundSet` as a sub `SoundSet` of this `SoundSet`.
163+
164+
Additionally, `AddSound` and `AddSoundSet` INI properties work for `SoundSets`. They are exactly the same as they are for `SoundContainers`.
165+
166+
- You can get the top level `SoundSet` of a `SoundContainer` with `soundContainer:GetTopLevelSoundSet` and manipulate it as described above. This allows you full interaction with all levels of `SoundSets` in a `SoundContainer`.
167+
146168
### Changed
147169

148170
- Codebase now uses the C++17 standard.
@@ -236,6 +258,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
236258

237259
- `Scenes` with a `PresetName` containing the strings "Test", "Editor" and "Tutorial" are no longer excluded from the scenarios screen and from the MetaGame.
238260

261+
- `SoundContainer` is now a concrete Lua entity. This means it can now be created with `CreateSoundContainer("PresetName", "DataModule.rte")` and has all the standard functionality like cloning, etc. To support these changes, a bunch of Lua functionality has been added and modified:
262+
`soundContainer.Immobile` - Whether or not the `SoundContainer` is immobile. Immobile sounds are generally used for GUI elements and will never be automatically panned, pitched or attenuated.
263+
`soundContainer.AttenuationStartDistance` - Formerly INI only, this property is now gettable and settable through Lua. See previous changelog entries for details on it.
264+
`soundContainer.Pos` - Rather than updating the `SoundContainer's` position through `AudioMan`, you should now use the `Pos` property.
265+
`soundContainer.Volume` - In addition to attenuation based volume changes, it is now possible to set a `SoundContainer's` overall volume. This works together with volume changes caused by attenuation.
266+
`soundContainer.Pitch` - Rather than updating the `SoundContainer's` pitch through `AudioMan`, you should now use the `Pitch` property. Also note that this now works properly with the game's global pitch so no complicated handling is necessary.
267+
268+
- `AddSound` and `SelectNextSoundSet` Lua bindings have been moved from `SoundContainer` to `SoundSet`. The latter has been renamed and the former have been trimmed down slightly since some complexity is no longer needed. Their speciifcs are mentioned in the `Added` section.
269+
239270
### Fixed
240271

241272
- Fix crash when returning to `MetaGame` scenario screen after activity end.
@@ -260,6 +291,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
260291

261292
- Pressing escape at the options, mod manager, game editors and credits screens no longer quits the game.
262293

294+
- `HDFirearm` INI property `DeactivationSound` now works properly instead of constantly playing.
295+
296+
- Gold mining sound has been set to restart its playback everytime it's played, making it way less annoying. It's still pretty wonky, but it's better.
297+
298+
- Sound panning should now work properly around scene seams. Additionally, sounds should be less stuttery (e.g. distant jetpacks) and generally sound better.
299+
263300
### Removed
264301

265302
- Removed the ability to remove scripts from objects with Lua. This is no longer needed cause of code efficiency increases.
@@ -276,6 +313,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
276313

277314
- Removed `Activity` property `FundsOfTeam#`, use `Team#Funds` instead.
278315

316+
- Some functionality has been moved from `AudioMan` to `SoundContainer`. As such, the following `AudioMan` Lua bindings are no longer available:
317+
`SetSoundPosition(soundContainer), SetSoundPitch(soundContainer, PlaySound(filePath, position, player, loops, priority, pitchOrAffectedByGlobalPitch, attenuationStartDistance, immobile)`
318+
The lengthy `PlaySound` function should be replaced by making a `SoundContainer` in your `Create` function and setting properties appropriately. This can be done by creating one defined INI with `soundContainer = CreateSoundContainer(...)`, or by making an empty one with `soundContainer = SoundContainer()`.
319+
279320
***
280321

281322
## [0.1.0 pre-release 2][0.1.0-pre2] - 2020/05/08

0 commit comments

Comments
 (0)