设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 112|回复: 0

[转载发布] Text Speed

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-2 17:23:29 | 显示全部楼层 |阅读模式
    I found no script to double text speed so I ended making one. Script also allows to slow down text or display it instantly.

    Edit v1.1: Added a fix for the window message reopening after each message

                    Ruby:       
    1. =begin
    2. ===============================================================================
    3. Text Speed
    4. Change text speed by Zero_G v1.1
    5. Version: RGSS3
    6. ===============================================================================
    7. == Description ==
    8. This script will allow you to change the speed the text is displayed.
    9. Text can be slowed down, speed up or to displayed instantly.
    10. == Terms of Use ==
    11. - Free for use in non-commercial projects.
    12. - Free for use in commercial projects.
    13. - Please provide credits to Zero_G.
    14. == Credits ==
    15. No one.
    16. == Usage ==
    17. Just add the plugin before main.
    18. == Changelog ==
    19. v1.1 Fix for the window message reopening after each message.
    20. --------------------------------------------------------------------------------
    21. =end
    22. module ZERO
    23.     # Speed of text, values -1, 0 and 1 for default speed
    24.     # 2 for double speed, 3 triple speed, ...
    25.     # -2 for half speed, -3 for 1/3 speed, ...
    26.     TEXT_SPEED = 2
    27.   
    28.     # Display text instantly, will ignore text speed
    29.     # Set to false for default, true for instant text
    30.     INSTANT_SPEED = false
    31. end
    32. class Window_Message < Window_Base
    33.   # Overwrite update_fiber
    34.   # Faster text
    35.   def update_fiber
    36.     if @fiber
    37.       @fiber.resume
    38.       for i in 2..ZERO::TEXT_SPEED
    39.           @fiber.resume unless @fiber.nil?
    40.       end
    41.     elsif $game_message.busy? && !$game_message.scroll_mode
    42.       @fiber = Fiber.new { fiber_main }
    43.       @fiber.resume
    44.     else
    45.       $game_message.visible = false
    46.     end
    47.   end
    48.   # Overwrite fiber_main
    49.   # Faster text
    50.   def fiber_main
    51.     $game_message.visible = true
    52.     update_background
    53.     update_placement
    54.     loop do
    55.       process_all_text if $game_message.has_text?
    56.       process_input
    57.       $game_message.clear
    58.       @gold_window.close
    59.       Fiber.yield
    60.       for i in 2..ZERO::TEXT_SPEED # Balance the fiber resumes
    61.           Fiber.yield
    62.       end
    63.       break unless text_continue?
    64.     end
    65.     close_and_wait
    66.     $game_message.visible = false
    67.     @fiber = nil
    68.   end
    69.   # Alias wait_for_one_character
    70.   # Slower text
    71.   alias zero_wait_for_one_character wait_for_one_character
    72.   def wait_for_one_character
    73.     zero_wait_for_one_character
    74.     for i in ZERO::TEXT_SPEED..-2
    75.         Fiber.yield unless @show_fast || @line_show_fast
    76.      end
    77.   end
    78.   # Overwrite update_show_fast
    79.   # Instant text
    80.   if ZERO::INSTANT_SPEED
    81.       def update_show_fast
    82.         @show_fast = true
    83.       end
    84.     end
    85. end # class Window_Message
    复制代码




    本贴来自国际rpgmaker官方论坛作者:Zero_G处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/text-speed.127033/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 09:25 , Processed in 0.137373 second(s), 54 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表