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

Alt music/sound function and startup choice

Aperta
#56 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
PHP
Stelle
7
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

L'issue descrive la modifica del compilatore di patch per supportare musica ed effetti sonori alternativi con selezione all'avvio. Osserva il file &opening.txt come modello per &sound.txt o suddividilo in &music e &sound. Gli esempi di codice mostrano chiamate PlayBGM e PlaySE che utilizzano GetGlobalFlag per GAltBGMflow e GAltSEflow. Indaga come i flag vengono impostati e resi persistenti e come il programma di installazione o il gioco rileva le cartelle BGM esistenti per mostrare condizionalmente le opzioni. Controlla la logica di FadeOutBGM per i diversi canali. Il lavoro implica comprendere l'elaborazione degli script del compilatore di patch e l'integrazione del sistema audio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
audio-video-rtc, game-dev
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.