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

Alt music/sound function and startup choice

Ouverte
#56 6 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
PHP
Étoiles
7
Forks
1
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Le problème décrit la modification du compilateur de correctifs pour prendre en charge une musique et des effets sonores alternatifs avec une sélection au démarrage. Considérez le fichier &opening.txt comme modèle pour &sound.txt ou divisez-le en &music et &sound. Les exemples de code montrent des appels PlayBGM et PlaySE utilisant GetGlobalFlag pour GAltBGMflow et GAltSEflow. Étudiez comment les drapeaux sont définis et persistés, et comment l'installateur ou le jeu détecte les dossiers BGM existants pour afficher conditionnellement les options. Vérifiez la logique FadeOutBGM pour les différents canaux. Le travail implique de comprendre le traitement des scripts du compilateur de correctifs et l'intégration du système audio.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Domaine
audio-video-rtc, game-dev
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.