07th-mod / umineko-question

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Text speed is reset at start of each chapter in normal mode/base game (Question & Answer)

drojf opened this issue · comments

A user reported that the text speed is reset at start of each chapter. I think this affects both question and answer arcs of our mod, and also the base game too. Possibly, ADV mode may reset the text speed even more often.

I dug into it, and found the following:

  • The setwindow command is called at the start of each chapter (it is called from eye1, the eyecatch function which separates chapters).
  • The setwindow command contains a 'Default text speed' argument. In all our scripts this is set to a fixed value of 20 which is the 'default' text speed. So whenever setwindow is encountered in the script, the text speed resets to 20.
    • The setwindow3 command works similarly
  • The text speed when you press 1,2, and 3 come from defaultspeed 40,20,0 (which corresponds to the 1,2 and 3 keys)

We should be able to replacing the fixed value of 20 in setwindow with a saved variable, to ensure the speed is kept. However, there is the issue of actually setting the variable/conflict with the existing shortcuts.

I haven't looked into how the '1/2/3' speed select shortcuts work - whether they're implemented at the engine level or at the script level. If it was at the script level, it would be easy to make this work with our new variable (or even add a mod-menu way to adjust the speed with more granularity). But if it's at the engine level, then there may be some conflict in the text speeds (especially since there doesn't appear to be a way to read the current text speed), and we would have to tell users not to use the 1/2/3 keys to set the text speed.

edit: I'm pretty sure it's in-engine, both from looking at the script and this quote from the reference: "Although (P)ONScripter does not provide a menubar, you can select among the textspeeds using keystrokes: '1' for slow, '2' for medium, '3' for fast, and '0' to toggle between all three."


Note that the !sd function does not change the default text speed, rather it sets the 'current speed' to the 'default speed'. Likewise the !s function does not overwrite the 'default speed', it just changes the 'current speed'. So both !sd and !s don't seem to affect this issue, unless there is a !s without a matching !sd to reset the speed (there are lots of redundant !sd in the script, so this is probably not an issue).

Note: Please note that in ADV mode, some of the setwindow commands have been replaced with adv_default_text_speed_restore_window which then calls setwindow - it was necessary to implement the ADV mode textbox)

commented

The 1/2/3 stuff is implemented at engine level. The only real way to affect its operation is defaultspeed, which allows to set the exact speeds corresponding to each key. Sadly, I don't think there's a sensible way of implementing this functionality with the keys themselves. If we want to do this, I suggest "disabling" the keys by setting all defaultspeeds to the same value and then implementing options in the mod menu that will call textspeed and defaultspeed with a new value when they are selected, plus setting the variable like you described. This approach has the additional bonus of allowing us more than 3 textspeeds if we wanted to, but it still sounds like a royal pain in the ass to implement.

Setting all the defaultspeed to the same value sounds like a great idea to 'disable' it.

This approach has the additional bonus of allowing us more than 3 textspeeds if we wanted to, but it still sounds like a royal pain in the ass to implement.

shouldn't it be the same as how the voice volume currently works (have a button to increase/decrease the value)? but I'd just be happy to fix the issue at all by implementing 3 fixed speeds if it's easier.

commented

I don't mind having increases/decreases, perhaps with a step of 10 -- just keep in mind that lower values are faster, which is mildly confusing.

commented

On that note, if this is implemented, the image at en/bmp/title/manual.png (and, what's worse, its Japanese equivalent) would have to be updated. This is the image:
manual

-_- if it were up to me, I would just replace this menu with engine text (like the mod menu) to avoid messing with more image assets, but I feel like people wouldn't like that.

I could get the background, red text, and logo in there, but not the rounded-square border or the different sized text, and the font would be different.

commented

I'd definitely like to see more text speed options, in addition to fixing the main issue. Currently, the slowest mode is too slow, and the normal mode is slightly too fast for my tastes.

commented

I'd definitely like to see more text speed options, in addition to fixing the main issue. Currently, the slowest mode is too slow, and the normal mode is slightly too fast for my tastes.

As a temporary workaround, feel free to just change the defaultspeed line in the script to speeds you yourself are comfortable with.

commented

Ah, good idea, thanks.

This is not exactly the purpose of this thread, but a user requested an "instant text" option.

I found a quick and dirty way to implement this was to insert a textspeed 0 command in the *pretext function, which is executed before every text is displayed.

;*************************************
;文章表示前の割り込みルーチン
*pretext
      if %save_on_flg = on saveon
      check_new_page_required ; NOTE: this line might not be in some script versions, you can ignore it
      textspeed 0
return
;*************************************

Making the textspeed 0 conditional on a variable would be an easy way to add this option, and something similar might come in handy for custom text speed options. The main issue is that this will override any existing textspeed commands (afaik Umineko usually only makes the speed instant for some automatic lines, it never makes it very slow or very fast)