Sound replacer menu overhaul - #556
Open
TeeMeeFe wants to merge 113 commits into
Open
Conversation
…oming to do something in this god's forsaken addon
- Done using a very naive approach that consumes a lot of resources for no reason - Still delegates some calculations to the server to do them - Some things broken, such as single sound entities - Fallback to single sound is broken - I hate the state of this, rewrite coming soon enough! WIP
… have engine registration to work with the sound table
…its engine registration thing
- Move sound counting to its own local function - Throttle is now networked properly - Fix DoPitchVolumeAtRPM function to use pitch and width properly - Some other changes to documentation
…dd some safeguards to sound creation
…, labels still not updating
…ing correctly, added a sound path validation icon
…und creation, include the volume on pitchvolume mixing instead of just fallback
… instances, set idle NumWang minimum to 0
…ty with the sound replacer tool
* Add functionality to the soundgraph sound preview. You can now preview interpolated sounds. * Fix adding/removing soundbanks messing up soundgraph combobox choice names. * Add MARK's for VSCode.
…ted result of this function instead
* Init.lua now only networks Throttle/RPM. * Client can now request soundtable data from the server if needed. This is specially useful if the client had just joined the PAS of our engine after its been Active. * Optimize ENT:UpdateOutputs(SelfTbl). Seems to be slightly faster now. These changes need more testing though.
* Init.lua now only networks Throttle/RPM. * Client can now request soundtable data from the server if needed. This is specially useful if the client had just joined the PAS of our engine after its been Active. * Optimize ENT:UpdateOutputs(SelfTbl). Seems to be slightly faster now. These changes need more testing though.
…/ACF-3 into TMF/dev_Improved_sounds
…rmance impact. Fix a goober of mine with the soundcount
… menu. Remove debug print(once again)
… convert to the new table format. No path/muted engines are still bugged though
* Change some hardcoded values so they match correctly with the global value. * Add notification feedback when replacing/resetting entity sounds. * Fix engine overlay not updating when resetting its sounds.
TeeMeeFe
marked this pull request as ready for review
July 29, 2026 23:02
Author
Changelog+ Completely overhauled the sound replacer tool menu. Now with many potential options for players to choose according to the type of acf entity they want to replace their sounds.
+ Added sound bank support for acf_engine entities. Old engines are **NOT** impacted by this change and should continue to function as usual.
+ Added several acf globals. `SpeedOfSound, MaxSounds, MaxSoundBanks, NetSoundRPMBitLimit`.
+ Added a global function `GetHighestPowerOfTwo(Num)` to get the highest binary value as number that fits the number passed as parameter.
+ Added doppler effect support for entities that use `Sounds.UpdateAdjustableSound`. Should **NOT** break any other entities that use that but aren't `acf_engine` class entities.
+ Added several network strings:
+ (ACF_Sounds_Adjustable_Multi, ACF_Sounds_AdjustableCreate_Multi, ACF_Sounds_AdjustableRequest_Multi); relate to sound table networking;
+ (ACF_SoundMenu_Send_ID, ACF_SoundMenu_Get_Multi, ACF_SoundMenu_Set_Multi); relate to sound menu data networking;
+ Added Exhaust wire output to `acf_engine` to play exhaust sounds to any wired entities, only if the entity's sound table allows for this.
+ Added player notifications when attempting to replace/reset supported entity sounds.
+ Added 2 new overlay labels to engines. They show the amount of sound banks and total amount of sounds played by the engine.
* Overhauled `acfsound.lua` tool code to accomodate this patch's upcoming changes.
* Changed `tool_support_sh.lua` `acf_engine` support to work with soundbanks instead.
* Changed `ACF.Year` global to be the current year in development, with a comment explaining why.
* Changed clientside sound creation/deletion to work with tables instead. Old single sound entities should **NOT** be affected by this change.
* Documented """armour""" code existence in `init.lua`. (🤮 🤮 🤮)
- Removed serverside `DoPitchVolume` function at `init.lua`, as it's no longer needed. Sound pitch/volume calcs are now exclusively clientside.A few caveats from this PR:
|
…tion before the menu overhaul arrived. Although not really that overpowered.
…ect. Fix DoPitchVolumeAtRPM reading from the incorrect field
…e required sounds
…limit. Remove unused function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚨WIP: Overhauls the sound replacer menu to allow some entities to play multiple, interpolated sounds. 🚨WIP
This changes the way how sounds are played, by allowing multiple sounds to play from a single entity.
For engines this means:
For guns this means:
I have created a draft for this so others can look and possibly guide me on this, better ways to approach any problems that will arise, etc.Ideally i would go on and allow web sounds to be played, since this relies on the client having the sounds at disposition to be played in their respective machines, which is possible some other clients may not have.
EDIT: Now this PR is ready to be reviewed by the devs. I'll keep an eye for any issues, since i haven't been able to extensively test these changes. I will also keep it up-to-date with dev, and if there's a big upcoming patch, that too! Just hit me up when about its to merge those changes into dev!
Partially fixes #553