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

[转载发布] Regen/Degen Battle Log

[复制链接]
累计送礼:
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 12:25:55 | 显示全部楼层 |阅读模式
    Regen Battle Log 2019/03/09

    Creator name: Ru/むっくRu (Rutan)​


    Introduction
    Possible to see Regeneration/Degeneration message in the battlelog.

    Note: This script is based on futokoro's DisplayRegenerateMessage.js to VX Ace

    Features
    Displays amount of HP / MP / TP in the battle log at the end of the turn

    Screen




    Also works for poison status.

    How to Use
    Paste this script above Main.

    Script link
    https://raw.githubusercontent.com/ovate/torigoya-rgss3/main/torigoya_RegenLog.rb

                    Code:       
    1. # encoding: utf-8
    2. #===============================================================================
    3. # ■ Regeneration in battle log
    4. #-------------------------------------------------------------------------------
    5. # 2019/03/09 Ruたん
    6. # License - Public Domain, allows commercial use and credit is not necessary
    7. #-------------------------------------------------------------------------------
    8. # Conversion of futokoro's FTKR_DisplayRegenerateMessage.js to VX Ace
    9. # https://github.com/futokoro/RPGMaker/blob/master/FTKR_DisplayRegenerateMessage.ja.md
    10. #-------------------------------------------------------------------------------
    11. # Displays amount of HP / MP / TP in the battle log at the end of the turn
    12. #-------------------------------------------------------------------------------
    13. # 【Changelog】
    14. # 2019/03/09 Released
    15. #-------------------------------------------------------------------------------
    16. #===============================================================================
    17. # ● Setting
    18. #===============================================================================
    19. module Torigoya
    20.   module DisplayRegenerateMessage
    21.     module Template
    22.       HP_MESSAGE = {
    23.         # ● Message when HP recovers
    24.         #    %1 … Target's name
    25.         #    %2 … Status name
    26.         #    %3 … Increased amount
    27.         gain: '%1 recovered %3 %2!',
    28.         # ● Message when HP decreases
    29.         #    %1 … Target's name
    30.         #    %2 … Status name
    31.         #    %3 … Increased amount
    32.         lose: '%1 lost %3 %2!',
    33.       }
    34.       MP_MESSAGE = {
    35.         # ● Message when MP recovers
    36.         #    %1 … Target's name
    37.         #    %2 … Status name
    38.         #    %3 … Increased amount
    39.         gain: '%1 recovered %3 %2!',
    40.         # ● Message when MP decreases
    41.         #    %1 … Target's name
    42.         #    %2 … Status name
    43.         #    %3 … Increased amount
    44.         lose: '%1 lost %3 %2!',
    45.       }
    46.       TP_MESSAGE = {
    47.         # ● Message when TP recovers
    48.         #    %1 … Target's name
    49.         #    %2 … Status name
    50.         #    %3 … Increased amount
    51.         gain: '%1 recovered %3 %2!',
    52.         # ● Message when TP decreases
    53.         #    %1 … Target's name
    54.         #    %2 … Status name
    55.         #    %3 … Increased amount
    56.         lose: '%1 lost %3 %2!',
    57.       }
    58.     end
    59.   end
    60. end
    61. #===============================================================================
    62. # ↑   Setting   ↑
    63. # ↓ Script part ↓
    64. #===============================================================================
    65. module Torigoya
    66.   module DisplayRegenerateMessage
    67.     class << self
    68.       def in_turn_end_process?
    69.         !!@in_turn_end_process
    70.       end
    71.       def turn_end_process(&block)
    72.         @in_turn_end_process = true
    73.         block.call
    74.         @in_turn_end_process = false
    75.       end
    76.       def generate_message(type, name, value)
    77.         template, status =
    78.           case type
    79.           when :hp
    80.             [Template::HP_MESSAGE, Vocab.hp]
    81.           when :mp
    82.             [Template::MP_MESSAGE, Vocab.mp]
    83.           when :tp
    84.             [Template::TP_MESSAGE, Vocab.tp]
    85.           else
    86.             raise 'must not happen'
    87.           end
    88.         template[value > 0 ? :lose : :gain].gsub('%1', name).gsub('%2', status).gsub('%3', value.abs.to_s)
    89.       end
    90.     end
    91.   end
    92. end
    93. class Window_BattleLog < Window_Selectable
    94.   #--------------------------------------------------------------------------
    95.   # ● Automatic status display (alias)
    96.   #--------------------------------------------------------------------------
    97.   alias torigoya_display_regenerate_message_display_auto_affected_status display_auto_affected_status
    98.   def display_auto_affected_status(target)
    99.     display_regenerate_message(target) if Torigoya::DisplayRegenerateMessage.in_turn_end_process?
    100.     torigoya_display_regenerate_message_display_auto_affected_status(target)
    101.   end
    102.   #--------------------------------------------------------------------------
    103.   # ● Display recovery message
    104.   #--------------------------------------------------------------------------
    105.   def display_regenerate_message(target)
    106.     [:hp_damage, :mp_damage, :tp_damage].each do |name|
    107.       next if target.result.public_send(name) == 0
    108.       add_text(Torigoya::DisplayRegenerateMessage.generate_message(:hp, target.name, target.result.public_send(name)))
    109.       wait
    110.     end
    111.   end
    112. end
    113. class Scene_Battle < Scene_Base
    114.   #--------------------------------------------------------------------------
    115.   # ● End of turn (alias)
    116.   #--------------------------------------------------------------------------
    117.   alias torigoya_display_regenerate_message_turn_end turn_end
    118.   def turn_end
    119.     Torigoya::DisplayRegenerateMessage.turn_end_process do
    120.       torigoya_display_regenerate_message_turn_end
    121.     end
    122.   end
    123. end
    复制代码


    Credit and Thanks
    - Original Author: futokoro
    - Conversion: Rutan

    License - Public Domain | MIT License: http://opensource.org/licenses/mit-license.php

    Source
    https://github.com/rutan/torigoya_rpg_maker_vxace_rgss3


    本贴来自国际rpgmaker官方论坛作者:ovate处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/regen-degen-battle-log.115350/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-17 11:38 , Processed in 0.137039 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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