查看: 1522|回复: 3

[已经解决] 右上角始终显示回合数

[复制链接]
梦石
0
星屑
50
在线时间
38 小时
注册时间
2013-3-3
回帖
28
发表于 2013-3-20 13:43:39 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

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

×
在战斗中显示回合数,坐标之类简单的我自己改了,但是其他方面,因为注释是英文所以看不懂了
这个现在就是攻击的时候或者使用技能的时候回合数的显示就会消失,现在我就是想让回合数始终显示要怎么改?
[pre lang="" line="1"]
=begin
  
  ** Battle Turn Count Window v1.1 **
  by Mr. Bubble
  
  A simple script that creates a small window which displays the current turn
  in battle.
  
  This script was made for keeping better track of the turn number for projects
  in development.  Not very flashy for final products.
  
  Made compatible with the RPG Tankentai SBS and ATB.  Place this script below
  those battle system scripts if you're using them.

=end

module Bubs
  module BattleTurnCount
   
#--------------------------------------------------------------------------
# Turn Count Window User Customization Module
#--------------------------------------------------------------------------

    # Text before turn value.
    TURN_WINDOW_TEXT = "总回合数: "
    # Text font size.  Default VX font size is 20.  Very large sizes will not
    # fit well.
    TURN_WINDOW_TEXTSIZE = 20
    # Text font name(s).  Include an array of strings to specify multiple
    # fonts to be used in a desired order.  If the higher priority font does
    # not exist within the system, the second choice will be used instead and
    # so on.
    TURN_WINDOW_FONT = ["方正少儿简体"]

    # X-coordinate position of turn count window.
    TURN_COUNT_WINDOW_X = 410
    # Y-coordinate position of turn count window.
    TURN_COUNT_WINDOW_Y = 0
        
    # true: Show window skin  
    # false: Hide window skin
    # Only affects the Turn Count Window.  Text will still show.
    USE_WINDOWSKIN = false
   
    # true: Always use default skin for Turn Count Window
    # false: Use windowskin as defined for WINDOWSKIN_FILENAME
    # If you use a separate window skin changer script, you may want to
    # keep this true.
    USE_DEFAULT_WINDOWSKIN = true
    # File name of window skin in the Graphics/System folder.  
    # Only affects the Turn Count Window
    # USE_DEFAULT_WINDOWSKIN must be false for this to take effect
    WINDOWSKIN_FILENAME = "1"

#--------------------------------------------------------------------------
# End of Turn Count Window User Customization Module
#--------------------------------------------------------------------------
  end
end


class Window_BattleTurnCount < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     x : window X coordinate
  #     y : window Y coordinate
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 128, WLH + 32)
    # Added to provide compatibility with windowskin changer scripts
    if !Bubs::BattleTurnCount::USE_DEFAULT_WINDOWSKIN
      self.windowskin = Cache.system(Bubs::BattleTurnCount::WINDOWSKIN_FILENAME)
    end
    # Set windowskin opacity to 0 (text still shows)
    self.opacity = 0 if !Bubs::BattleTurnCount::USE_WINDOWSKIN
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    turn_num = $game_troop.turn_count + 1 # +1 because first turn value is 0.
    self.contents.font.color = normal_color
    # TCW Font Size
    self.contents.font.size = Bubs::BattleTurnCount::TURN_WINDOW_TEXTSIZE
    # TCW Font
    self.contents.font.name = Bubs::BattleTurnCount::TURN_WINDOW_FONT
    # unless Tankentai ATB is installed
    self.contents.draw_text(4, 0, 128, WLH,
Bubs::BattleTurnCount::TURN_WINDOW_TEXT + turn_num.to_s) unless defined?(::N02)
  end
end

class Scene_Battle < Scene_Base
  
  #--------------------------------------------------------------------------
  # * Create Information Display Viewport
  #--------------------------------------------------------------------------
  alias create_iv_bubs_tcw create_info_viewport
  def create_info_viewport
    # (x,y) coordinates of TCW
    x = Bubs::BattleTurnCount::TURN_COUNT_WINDOW_X
    y = Bubs::BattleTurnCount::TURN_COUNT_WINDOW_Y
    @turn_count_window = Window_BattleTurnCount.new(x, y)
    @turn_count_window.visible = true
   
    create_iv_bubs_tcw
  end

  #--------------------------------------------------------------------------
  # * Start party command selection
  #--------------------------------------------------------------------------
  alias spcs_bubs_tcw start_party_command_selection
  def start_party_command_selection
    if $game_temp.in_battle
      @turn_count_window.refresh
      @turn_count_window.visible = true
      
      spcs_bubs_tcw
    end
  end
  
  #--------------------------------------------------------------------------
  # * Dispose of Information Display Viewport
  #--------------------------------------------------------------------------
  alias terminate_bubs_tcw terminate
  def terminate
    @turn_count_window.dispose

    terminate_bubs_tcw
  end
  
  #--------------------------------------------------------------------------
  # * Update Information Display Viewport
  #--------------------------------------------------------------------------
  alias update_iv_bubs_tcw update_info_viewport
  def update_info_viewport
    # if Tankentai ATB is installed
    if defined?(::N02)
      @turn_count_window.contents.clear
      turn_num = $game_troop.turn_count + 1
      @turn_count_window.contents.draw_text(4, 0, 128, 24,
Bubs::BattleTurnCount::TURN_WINDOW_TEXT + turn_num.to_s)
    end
    @turn_count_window.update
   
    update_iv_bubs_tcw
  end

  #--------------------------------------------------------------------------
  # * Victory Processing
  #--------------------------------------------------------------------------
  alias process_victory_bubs_tcw process_victory
  def process_victory
    # Hides TCW when winning a battle
    @turn_count_window.visible = false
   
    process_victory_bubs_tcw
  end
  
  #--------------------------------------------------------------------------
  # * Escape Processing
  #--------------------------------------------------------------------------
  alias process_escape_bubs_tcw process_escape
  def process_escape
    # Hides TCW when escaping
    @turn_count_window.visible = false

    process_escape_bubs_tcw
  end
  
  #--------------------------------------------------------------------------
  # * Start Execution of Battle Processing
  #--------------------------------------------------------------------------
  alias start_main_atb_bubs_tcw start_main
  def start_main(*args)
    # unless Tankentai ATB is installed
    @turn_count_window.visible = false unless defined?(::N02)
   
    start_main_atb_bubs_tcw(*args)
  end
end[/pre]
梦石
0
星屑
50
在线时间
38 小时
注册时间
2013-3-3
回帖
28
 楼主| 发表于 2013-3-20 15:20:41 | 显示全部楼层
回复

使用道具 举报

发表于 2013-3-20 19:13:42 | 显示全部楼层
测试好了,你搜索“@turn_count_window.visible = false”  意思是“显示=假”
全部改成“true” 或者直接删除都可以~
话说你也要自己试试啊,每次都提问- - 很难有进步的~

点评

刚大学毕业  发表于 2013-3-20 22:39
因为当时在上班嘛  发表于 2013-3-20 20:43

评分

参与人数 1星屑 +50 收起 理由
怪蜀黍 + 50 认可答案

查看全部评分

我想要到的是保护同伴的力量,能与同伴一起欢笑的未来的力量,如果无法做到的话,那就无需继承,如果是这样的彭格列的话,那我亲手毁掉它!
  
                       欢迎加入我们的家族~
回复

使用道具 举报

梦石
0
星屑
50
在线时间
38 小时
注册时间
2013-3-3
回帖
28
 楼主| 发表于 2013-3-20 19:33:44 | 显示全部楼层
彭格列第XI代 发表于 2013-3-20 19:13
测试好了,你搜索“@turn_count_window.visible = false”  意思是“显示=假”
{:5_166: ...

我研究了下,上面的部分我改了,因为看到后面的根据我的理解好像和我需要的效果没关系,但是改其他的好像又没起到作用,所以我就发帖了,主要还是因为这个贴是在公司发的,当时没太多时间测试来着

点评

大学毕业啊=w=  发表于 2013-3-20 22:48
你多大了0w0/  发表于 2013-3-20 22:10
公司- -?  发表于 2013-3-20 20:31
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部