Hachimi-Hachimi / Hachimi

はちみーをなめると〜 Game enhancement and translation mod for Honse Game.
https://hachimi.leadrdrk.com
GNU General Public License v3.0
17 stars 0 forks source link

Evaluate tags in training param change dialog content before inserting. #27

Closed KevinVG207 closed 2 months ago

KevinVG207 commented 2 months ago

Because certain training dialogues use format strings, it's possible that a localized_dict string which has a format tag for UI reasons, gets inserted into a format string that uses {0} etc. The training dialogue boxes write one or more characters at a time, meaning it's possible for an incomplete format tag to show up for a brief second before it is fully inserted and interpreted by Hachimi.

I believe the solution here is to add a step before format strings are executed (would this be possible by hooking some function in the game?) and, before the values are inserted into the format string, and if the value itself is a string:

I don't know how difficult this would be to implement.

Here an example of a tag being half-drawn before it disappears. image image