Barotrauma

Barotrauma

1,825 次評價
Soundproof Walls 2.0
70
24
6
8
15
6
22
5
9
9
15
14
7
10
10
9
8
7
6
5
4
4
2
   
獎勵
加入最愛
已加入最愛
移除最愛
檔案大小
發佈於
更新時間
6.024 MB
2024 年 2 月 4 日 上午 2:37
9 月 24 日 下午 11:53
33 項更新註記 (檢視)

訂閱以下載
Soundproof Walls 2.0

描述
「那是什麼聲音?」
Soundproof Walls 2.0 是《Barotrauma》的一項全面音訊系統改造,透過增加真實的效果和獨特的聲音機制,增強了原作音景的衝擊力、恐怖感和氛圍,最終目標是讓聲音變得更有趣、更具沉浸感。


功能詳解
• 動態悶音
聲音和語音會根據路徑中阻礙物的層數,進行動態的低通濾波。當你獨自一人時,可能直到燈光熄滅,你才會意識到不對勁。

• 模擬殘響
聲音和語音會根據房間的大小產生真實的回音。在潛艇外,巨大的聲響會因聲波在歐羅巴冰壁間的反彈而傳播數里之遠。

• 強力失真
槍聲爆發時充滿力量,扭曲周遭的空氣,或在水中產生深沉的脈衝。

• 側鏈壓縮
爆炸和槍聲的衝擊力更強,會蓋過較安靜的聲音,創造更寬廣的動態範圍。

• 聲音遮蔽
聲音和語音會受到環境形狀的影響,若沒有直達聽者的路徑,聲音會變得稍微模糊。

• 真實距離衰減
音量衰減取決於聲音傳到玩家耳朵所經過的路徑,讓聲音可能在潛艇的迂迴曲折中消失。

• 沉浸式近距離語音
你叫得越大聲,聲音傳得越遠。溺水玩家的哭喊聲在充滿氣泡的海水中會變得扭曲。而你壞掉的無線電讓緊急通訊難以理解。

• 新機制:竊聽
將你的頭貼在門上,聆聽裡面的聲音。監視你的朋友、識別潛在威脅,或檢查房間的淹水情況。

• 新機制:水下聽音器監聽
透過潛艇的被動聲納麥克風,手動檢查周圍海洋是否存在危險,而無需使用主動聲納。學習如何辨識不同生物,解鎖一種全新的潛行玩法。

• 還有更多、更多!
請參閱 Configuration Guide 以了解所有功能和設定的完整說明。


需求
1. 此模組需要安裝客戶端的 Lua For Barotrauma——這與僅僅訂閱並啟用它不同。請遵循其工作坊頁面上的安裝說明。

2. 安裝好客戶端 Lua 後,在主選單左上角打開 LuaCs 設定選單,並勾選「Enable Csharp Scripting」。


使用方式
進入遊戲後,打開主控台(F3)並尋找初始化訊息:「Finished loading Soundproof Walls v2.x」,以確認模組正在運行。如果您沒看到,請重新檢查上述需求。

按下 Escape 鍵並點擊「Soundproof Walls 2.x」按鈕,或在主控台中輸入「spw」,即可進入設定選單。若想快速了解一些實用設定,請參閱 Configuration Guide 討論區。

當您主持多人遊戲時,您的設定會自動與其他玩家同步,包括在選單中應用的任何變更。專用伺服器也是如此,無需額外步驟。

如果您喜歡親自動手,設定選單中的「Advanced」分頁裡的「Custom Sounds」列表,讓您可以輕鬆地添加和混合您自己的音效。您可能會發現這對於將失真和側鏈效果應用於其他模組的音效是必要的,因為 Soundproof Walls 只包含對原版檔案的參照。如果您想與更多玩家分享您的混音,Soundproof Walls 允許您將「Custom Sounds」列表儲存並作為獨立的修補程式發佈到 Steam 工作坊。有關如何操作的說明,請參閱 Mixing Patches 討論區。


常見問答
Q: 這個模組對效能有多大影響?
基本上為零。您可以啟用「Show Performance」選項(在「Advanced」分頁中)來對您的系統進行基準測試。

Q: 這個模組在進行中的戰役中使用安全嗎?
是的。Soundproof Walls 不會修改持久性資料,可以隨時在戰役中添加或移除,不會有任何問題。

Q: 這個模組與 X 相容嗎?
是的。Soundproof Walls 作為原版遊戲的擴展運行,使其與 100% 基於 XML 的模組以及所有目前已知的 Lua/Cs 模組相容。

Q: 我遇到了錯誤,該怎麼辦?
試著在主控台中輸入「cl_reloadlua」。如果不行,請查看 Report Bugs 討論區以了解已知問題和解決方案。如果您的問題未被列出,請嘗試取消訂閱、重啟 Steam,然後重新訂閱。如果問題仍然存在,請提交報告或留言。


關於此專案
Soundproof Walls 2.0 是用《Barotrauma》的原生語言 C# 編寫的,並利用遊戲內建的 OpenAL Soft 音訊引擎來實現動態悶音、殘響和失真效果。原版的聲音 DFS 尋路演算法已被 A* 演算法取代,以獲得更優質且能追蹤障礙物的路徑。聲音遮蔽是透過簡單的光線投射完成的,側鏈效果是事件驅動的,並依賴於「Custom Sounds」列表(在「Advanced」分頁中)的參照,而其他效果,如無線電濾波器和靜態模式的殘響濾波器,則是參考常見的實作(例如 Schroeder 式殘響、硬削波失真等)從零開始建構的。如果您想查看程式碼或自行編譯,您可以在 GitHub[github.com] 上找到此專案及建構說明。

Soundproof Walls 的開發始於 2023 年 10 月,最初的目標很簡單,就是讓原版的悶音效果更強烈。我當時想,如果我不加任何額外的東西,大概幾天就能搞定。
2024 年 2 月,四個月後。Soundproof Walls 1.0 完成了。不用說,我加了些額外的東西——但或許這一切都值得。這個模組廣受好評,維持著 99% 的正評,並迅速成為工作坊上最受歡迎的模組之一。不久之後,《Barotrauma》的開發者將他們的低通頻率從 1600Hz 改為 600Hz。大成功。我回來更新了幾次模組,以添加一些被要求的功能或修復錯誤——有幾個我修不好,但總體來說,我對將模組維持在那個狀態感到滿意。
直到 2025 年 1 月,我開始著手一個目前尚未發布的專案,也與聲音有關,並到了需要與 Soundproof Walls 相互相容的階段。於是,我重新打開了專案檔案,幾乎立刻就遇到了其結構上的問題。我需要先把它稍微清理一下,才能回到我的另一個專案。我想說這大概只需要幾天,畢竟,我沒打算加新東西。
2025 年 9 月。Soundproof Walls 2.0 發布了。過去這八個月如夢一場,我老實說很難回憶起我製作這個模組的確切過程,但感覺就像每次我完成某個東西,我就會找到一個更好的作法,然後就想整個重來。
簡而言之,我最終重寫了整個模組,原本大約 4,000 行程式碼,加了一些我認為會是不錯的額外功能,結果不知怎麼地就變成了 15,000 行程式碼?這很奇怪,在我開始做《Barotrauma》的模組前,我的遊戲時數大約是 80 小時。從那之後我就沒怎麼真正玩過這遊戲了,但現在我滑鼠移到 Steam 上的《Barotrauma》時,它顯示我有將近 2,000 小時。


支持我
如果您覺得我的模組有意義地改善了您的《Barotrauma》體驗,或者您只是喜歡我的作品,歡迎在 Ko-fi[ko-fi.com] 上請我喝杯咖啡,為我的失眠做出點貢獻。
我未來還有一些很棒的模組點子,並計劃在大學畢業後全職開發自己的遊戲,所以現在能得到的任何支持對我來說都意義非凡。

熱門討論 檢視全部(7)
215
10 月 17 日 下午 5:28
置頂: Report Bugs
Plag
29
9 月 7 日 下午 4:06
置頂: Configuration Guide
Plag
0
9 月 5 日 下午 7:07
置頂: Mixing Patches
Plag
852 則留言
lucky_washa 6 小時以前 
@plag- yes even when set to classic for "effect processing mode" the problem still occurs.
Plag  [作者] 10 小時以前 
@kirP - Okay cool, that answers all my questions. Thanks man, you've been very helpful. Have a good one!
Plag  [作者] 17 小時以前 
@kirP - Wow, thanks for going through the effort of testing this. That's strange, but it does match up with your performance stats. For your system, it seems like it's less about how Soundproof Walls processes sounds and more about how many sounds are playing.

To confirm this with one last test, could you please try setting "Max Playing Sounds" to 32 and "Max Simultaneous Instances" to 5? These are the vanilla values. Then compare the frame drop you get with Soundproof Walls enabled and disabled (you can use the "Enable Mod" toggle in the General tab).

If there's still a drop when disabled, it indicates your system just struggles to play Barotrauma's sounds in general for some mysterious reason. Which would explain why there weren't huge numbers in the mod's "Show Performance" overlay. Instead, the large update times are likely in the vanilla game's "showperf" overlay.
kirP 18 小時以前 
Nuked my install of barotrauma clean, reinstalled the game, reinstalled lua, made sure only lua & this mod was enabled and the lever+door(s) combo was still destroying performance.

Dropping max playing sounds to ~45 stopped FPS from going from 100 to single digits and instead to 90
Plag  [作者] 10 月 22 日 上午 10:30 
@TheDreamer, @Lagmanor - The mod is working. Every Barotrauma update requires a new Lua version and until the new version releases no Lua/C# mods work.
Lagmanor 10 月 22 日 上午 6:46 
Uhh, sure it's not a Lua problem? I mean, it's Lua dependent, and one *does* break after every update of the game...
I'm not at all making any statements here, mind you. It just seems that the devs focused purely on server lists sorting witht this one, and I as a totally random dude have no clue how would that break the sound logic...
Do not mind me though, I'm just bored here waiting for the Lua update, lol.
Plag  [作者] 10 月 22 日 上午 1:24 
@lucky_washa - Sorry to hear that. I'll add that as a known issue for Mac in the Report Bugs discussion and I'll see if I can figure out a solution in a future update. By the way, does the problem still happen with your "Effect Processing Mode" (General tab) set to Classic?
Plag  [作者] 10 月 22 日 上午 1:21 
@kirP - Your Soundproof Walls update time is spiking from 0.05ms to 0.2ms. This is likely from the mod's increased max sound limit (you can tweak this with "Max Playing Sounds" in the Advanced tab).

To put that in perspective, 60 FPS requires the combined update time to stay under 16.67ms. Your 0.15ms spike is not large enough to cause this lag alone, so something else must be taking up considerable resources.

You can type "showperf" in console to see your combined update time and a breakdown of all contributing processes. Your "Items" update time is probably high.

I tested your lever setup and the mod's spikes were 0.04 to 0.047 (high-end Windows PC) and 0.07 to 0.09 (low-end Linux PC), these jumps being considerably lower also points toward something else on your system using the resources. My combined update time never went high enough to see any frame drops.

Is it possibly caused by another mod? Also, you only get this issue in this specific door situation, correct?
kirP 10 月 21 日 下午 6:05 
"It's unlikely related to the mod. Can you please verify using "Show Performance" in the Advanced tab?"
Not sure what I should be looking for but here:
https://cdn.steamusercontent.com/ugc/14134035929568009136/217D566669F44F8F75D638D05AC66B6AE361BFBF/

Don't have this issue with the mod disabled