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

Alt music/sound function and startup choice

Abierto
#56 6 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
PHP
Estrellas
7
Forks
1
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

El issue describe modificar el compilador de parches para admitir música y efectos de sonido alternativos con selección al inicio. Observa el archivo &opening.txt como plantilla para &sound.txt o divídelo en &music y &sound. Los ejemplos de código muestran llamadas a PlayBGM y PlaySE que usan GetGlobalFlag para GAltBGMflow y GAltSEflow. Investiga cómo se establecen y persisten las flags, y cómo el instalador o el juego detecta carpetas BGM existentes para mostrar opciones condicionalmente. Revisa la lógica de FadeOutBGM para diferentes canales. El trabajo implica comprender el procesamiento de scripts del compilador de parches y la integración del sistema de audio.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Área
audio-video-rtc, game-dev
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.