Hi Keinart, your suggestion is very possible. You can measure the character count of the printed dialog line with len(_last_say_what). From there I came up with an approach that supports both the original and your suggestion via a switch that looks at player settings.
Newly added code is marked in green, blue shows edits.
- New function (you can put it anywhere) is_csp_instant_or_fast looks at the csp the player has chosen in their preferences. 180 is just some cut-off number for what I consider fast.
- If it's 'normal csp': goes with the old way of telling when the lipflap animation should end. See the edited line in function speaker_callback.
- If it's 'fast csp': ends the animation based on dialog length. See function live2d_lip_flapping. Change the 20 value to what looks good for your animation cycle. I added this same number as a buffer to len(_last_say_what) to guarantee at last some animation even if the text is short.
