AdmiralCurtiss / SenPatcher

Fixes and customizations for the Trails of Cold Steel games on Windows.
Other
87 stars 6 forks source link

CS1: Game does not play dialogue 'bloops' when a voice file is referenced but does not exist. #25

Open AdmiralCurtiss opened 4 years ago

AdmiralCurtiss commented 4 years ago

This mostly matters when using JP audio, since all referenced files should exist in English.

This might be connected to #23, not sure.

AdmiralCurtiss commented 3 years ago

(note: this can and probably should be done without IO by checking the loaded t_voice.tbl)

richardziegler commented 1 year ago

I believe the function that determines if the game should load a sound effect, english voice, or japanese voice file is at: 0056f6c0 in ed8.exe.

AdmiralCurtiss commented 1 year ago

Mhm, appreciated, but I don't think that's quite what we need here. That function takes a parameter that already knows whether it's a sound effect or a voice (and which one, for that matter) and returns the path on disk for it. What this needs is the code that sets the flag for whether a textbox should produce bloops per character or not -- presumably it should be in the vicinity of the code that parses the voice clip ID from the text.

richardziegler commented 1 year ago

Mhm, appreciated, but I don't think that's quite what we need here. That function takes a parameter that already knows whether it's a sound effect or a voice (and which one, for that matter) and returns the path on disk for it. What this needs is the code that sets the flag for whether a textbox should produce bloops per character or not -- presumably it should be in the vicinity of the code that parses the voice clip ID from the text.

Ahhh, okay. Understood. If I have time this weekend I will see if I can dig deeper and see what I can find from xrefs of that function.

AdmiralCurtiss commented 1 year ago

Some notes: (all addresses refer to CS2 English 1.4.2)

AdmiralCurtiss commented 1 year ago

The MOV at 0x572a06 sets the flag. 0 -> bloops, 1 -> no bloops. The voice itself doesn't affect this directly, you can have both voice and bloops if the flag is set to 0 but the voice command is still processed.

richardziegler commented 1 year ago

The MOV at 0x572a06 sets the flag. 0 -> bloops, 1 -> no bloops. The voice itself doesn't affect this directly, you can have both voice and bloops if the flag is set to 0 but the voice command is still processed.

In the scenario where the flag is set to 0 and the voice command is processed - that should/would play the voice in game, correct? Or does this need to be tested?

AdmiralCurtiss commented 1 year ago

It both plays the voice and generates the bloops, yes.

AdmiralCurtiss commented 1 year ago

I think it's the function at 0x5780e0 that you're searching for -- that is, for #115. If I'm interpreting this correctly, that function returns at any given timepoint whether the mouth should be animating or not.

e: equivalent code in all the games, I think:

CS1: 0x5f8750 CS2: 0x5780e0 CS3: ~0x140317832 CS4: ~0x1402f8e22