07th-mod / 07th-mod/higurashi-patch-compiler
Alt music/sound function and startup choice
- 主要言語
- PHP
- スター
- 7
- フォーク
- 1
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
As mentioned on Discord, I've been playing around with the alt bgm and se functions, and I had the idea of having a startup option like the opening movie, I copied the &opening.txt file and used that to make a &sound.txt file, but that could be split into music being &music and sound effects being &sound to give a mix and match startup choice.
[&sound.txt](https://github.com/07th-mod/higurashi-patch-compiler/files/3040538/sound.txt)
Currently it sets the GAltSEflow flag to match the BGM, except for Anime and MangaGamer, as I'm guessing they would use the same SE as the original, so I've set them to flag 0 too.
I have it set to check the GAltBGM flag as GAltBGMFlow doesn't seem to need it so I'd left it at 0 to ask me every time, it could probably use its own flag and maybe have it ask whether you want it to never ask about the music again which would set it to 1.
example videos
Showing startup select with Original, New Patch & Console, same as posted in discord
https://www.youtube.com/watch?v=dAztNBA5jyk
Old MangaGamer OST
https://www.youtube.com/watch?v=OPVGLOGRmy4
I don't have the anime music from the anime music mod but it's there as an option
I've been doing it like for BGM
```
if (GetGlobalFlag(GAltBGMflow) == 0) { PlayBGM( 2, "Original\msys01", 128, 0); }
if (GetGlobalFlag(GAltBGMflow) == 1) { PlayBGM( 2, "NewUpdate\msys01", 128, 0); }
if (GetGlobalFlag(GAltBGMflow) == 2) { PlayBGM( 2, "Console\hm01_01", 128, 0); }
if (GetGlobalFlag(GAltBGMflow) == 3) { PlayBGM( 2, "Anime\msys01", 128, 0); }
if (GetGlobalFlag(GAltBGMflow) == 4) { PlayBGM( 2, "MangaGamer\msys01", 128, 0); }
```
and for SE
the console sound effect probably doesn't match as I don't know what console sounds are supposed to play where, so I just picked the nearest sound I heard as a placeholder
```
if (GetGlobalFlag(GAltSEflow) == 0) { PlaySE( 4, "Original\wa_020", 128, 64 ); }
if (GetGlobalFlag(GAltSEflow) == 1) { PlaySE( 4, "NewPatch\wa_020", 128, 64 ); }
if (GetGlobalFlag(GAltSEflow) == 2) { PlaySE( 4, "Console\vse_do_s", 128, 64 ); }
```
As for FadeOutBGM, if all soundtracks are to fade at the same time, then the current
` FadeOutBGM( 2, 1000, TRUE );`
should work no matter the music, but if console music fades in a different place than the rest, then I'm wondering if something like an if not command could be made work to fade everything but console, the best I could do was setting flag 2 to fade a high number channel and everything else to fade the music. I'm not sure what the TRUE/FALSE parts are for, so it's FALSE from testing. A far from ideal method, but it seemed to work
` if (GetGlobalFlag(GAltBGMflow) == 2) { FadeOutBGM( 20, 1000, FALSE ); } else { FadeOutBGM( 2, 1000, TRUE ); }`
Getting original and the new patch sound done first might be easiest.
Also the MangaGamer OST has tracks used for multiple parts so the file names could be renamed to mg01, mg02 and use one file, for example mangagamer track 1 is used for msys01, msysre and msysmi. The file I downloaded from https://steamcommunity.com/sharedfiles/filedetails/?id=802920332 to try it has duplicated tracks, but it could be cut down.
I'm not sure how possible it would be, but having a way to detect if there's a folder in the bgm folder and only activate flags if it's there would be nice for people that only want some of the soundtracks and not to download all of them, so if someone only wants original, console and mangagamer, then have the game look for those folders in bgm and if they are there then show those 3 options on the ost selector, and the flag switch hotkey would skip it like 0-2-4. If possible this could use an addon selector in the installer that Italo mentioned to download only what you want, or all.
I haven't seen any way to get the hotkey to work while in game, by that I mean you can change the flag with the hotkey, but it won't update the music until the next music change, and if you get to a music change, then save the game after, change the flag, then reload, it will still be the music from the old flag, so Original Music>Save>Change Flag to Console>Load will still play Original Music until it gets to a point where a new console track will play. I'm also not sure how a fallback would work if you did start after choosing console music for example, but didn't have the files as right now it would just play nothing.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
このissueは、スタートアップ選択機能付きの代替BGMと効果音をサポートするためにパッチコンパイラを変更することを説明しています。&opening.txtファイルを&sound.txtのテンプレートとして参照するか、&musicと&soundに分割します。コード例では、GAltBGMflowとGAltSEflowに対してGetGlobalFlagを使用するPlayBGMおよびPlaySE呼び出しを示しています。フラグの設定と永続化の方法、およびインストーラーまたはゲームが既存のBGMフォルダを検出して条件付きでオプションを表示する方法を調査します。異なるチャンネルに対するFadeOutBGMのロジックを確認します。この作業には、パッチコンパイラのスクリプト処理とオーディオシステム統合の理解が必要です。
索引モデルが issue の本文から書いたものです。
評価
- 領域
- audio-video-rtc, game-dev
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100