07th-mod / 07th-mod/higurashi-patch-compiler

Alt music/sound function and startup choice

未关闭
#56 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
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.

贡献指南

这个仓库没有索引到贡献指南

调研方向

The issue describes modifying the patch compiler to support alternative music and sound effects with startup selection. Look at the &opening.txt file as a template for &sound.txt or split into &music and &sound. The code examples show PlayBGM and PlaySE calls using GetGlobalFlag for GAltBGMflow and GAltSEflow. Investigate how flags are set and persisted, and how the installer or game detects existing BGM folders to conditionally show options. Check the FadeOutBGM logic for different channels. The work involves understanding the patch compiler's script processing and audio system integration.

由索引模型根据 Issue 内容生成。

评估

领域
audio-video-rtc, game-dev
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。