查看: 2610|回复: 5

[已经解决] 关于脚本(战斗显示脸图的修改)请教

[复制链接]
梦石
0
星屑
50
在线时间
86 小时
注册时间
2009-12-2
回帖
113
发表于 2016-5-3 10:00:20 | 显示全部楼层 |阅读模式

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

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

×
请求帮助, https://rpg.blue/thread-223765-1-1.html  这个脚本默认无法显示TP,想在上面在添加一个TP值的显示。
   Question3.JPG
  
  

漾夕☽星化残月☾

梦石
0
星屑
8611
在线时间
3858 小时
注册时间
2015-5-12
回帖
2022

剧作品鉴家

发表于 2016-5-3 22:03:30 | 显示全部楼层
你先试试把34行的 $data_system.opt_display_tp 改成 true 试试吧?
回复

使用道具 举报

梦石
0
星屑
60
在线时间
62 小时
注册时间
2016-5-2
回帖
173
发表于 2016-5-4 07:31:31 | 显示全部楼层
本帖最后由 李牧羊 于 2016-5-4 08:23 编辑

你好!

@若得若失

1.  将63行改为“    return true”即可显示tp,但是MP就被替换掉了。已测可行。这个脚本的原意在下猜测应该是【在某种情况下】才显示TP

2.  感觉不稳定,但是解决了这个问题的方法
已测代码可行
  1. $脸图战斗 = true
  2. $imported = {} if $imported.nil?
  3. module YEA
  4.   module BATTLE
  5.     SKIP_PARTY_COMMAND = true
  6.     BATTLESTATUS_NAME_FONT_SIZE = 20
  7.     BATTLESTATUS_TEXT_FONT_SIZE = 16
  8.     BATTLESTATUS_NO_ACTION_ICON = 185
  9.     BATTLESTATUS_HPGAUGE_Y_PLUS = 11
  10.     BATTLESTATUS_CENTER_FACES   = false
  11.     HELP_TEXT_ALL_FOES        = "全体敌人"
  12.     HELP_TEXT_ONE_RANDOM_FOE  = "单个敌人"
  13.     HELP_TEXT_MANY_RANDOM_FOE = "%d个随机敌人"
  14.     HELP_TEXT_ALL_ALLIES      = "全体队友"
  15.     HELP_TEXT_ALL_DEAD_ALLIES = "全体死亡队友"
  16.     HELP_TEXT_ONE_RANDOM_ALLY = "单个随机队友"
  17.     HELP_TEXT_RANDOM_ALLIES   = "%d个随机队友"
  18.   end
  19. end
  20. class Game_Battler
  21.   def can_collapse?
  22.     return false unless dead?
  23.     unless actor?
  24.       return false unless sprite.battler_visible
  25.       array = [:collapse, :boss_collapse, :instant_collapse]
  26.       return false if array.include?(sprite.effect_type)
  27.     end
  28.     return true
  29.   end
  30.   def draw_mp?
  31.     return true
  32.   end
  33.   def draw_tp?
  34.     return $data_system.opt_display_tp
  35.   end
  36. end
  37. module Icon
  38.   def self.no_action; return YEA::BATTLE::BATTLESTATUS_NO_ACTION_ICON; end
  39. end
  40. class Game_Temp
  41.   attr_accessor :battle_aid
  42.   attr_accessor :evaluating
  43. end
  44. class Game_Action
  45.   alias evaluate_item_with_target_abe evaluate_item_with_target
  46.   def evaluate_item_with_target(target)
  47.     $game_temp.evaluating = true
  48.     result = evaluate_item_with_target_abe(target)
  49.     $game_temp.evaluating = false
  50.     return result
  51.   end
  52. end

  53. class Game_Actor < Game_Battler
  54.   def draw_mp?
  55.     return true unless draw_tp?
  56.     for skill in skills
  57.       next unless added_skill_types.include?(skill.stype_id)
  58.       return true if skill.mp_cost > 0
  59.     end
  60.     return false
  61.   end
  62.   def draw_tp?
  63.     return false #unless $data_system.opt_display_tp
  64.     for skill in skills
  65.       next unless added_skill_types.include?(skill.stype_id)
  66.       return true if skill.tp_cost > 0
  67.     end
  68.     return false
  69.   end
  70. end

  71. class Window_BattleStatus < Window_Selectable
  72.   def initialize
  73.     super(0, 0, window_width, window_height)
  74.     self.openness = 0
  75.     @party = $game_party.battle_members.clone
  76.   end
  77.   def col_max; return $game_party.max_battle_members; end
  78.   def battle_members; return $game_party.battle_members; end
  79.   def actor; return battle_members[@index]; end
  80.   def update
  81.     super
  82.     return if @party == $game_party.battle_members
  83.     @party = $game_party.battle_members.clone
  84.     refresh
  85.   end
  86.   def draw_item(index)
  87.     return if index.nil?
  88.     clear_item(index)
  89.     actor = battle_members[index]
  90.     rect = item_rect(index)
  91.     return if actor.nil?
  92.     draw_actor_face(actor, rect.x+2, rect.y+2, actor.alive?)
  93.     draw_actor_name(actor, rect.x, rect.y, rect.width-8)
  94.     draw_actor_action(actor, rect.x, rect.y)
  95.     draw_actor_icons(actor, rect.x, line_height*1, rect.width)
  96.     gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS
  97.     contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE
  98.     draw_actor_hp(actor, rect.x+2, line_height*1.5+gx, rect.width-4)#HP
  99.     draw_actor_mp(actor, rect.x+2, line_height*2+gx, rect.width-4)
  100.     draw_actor_tp(actor, rect.x+2, line_height*3, rect.width-4)
  101. #~     draw_actor_tp(actor, rect.x + 156, rect.y, 64)
  102. #     if draw_tp?(actor) && draw_mp?(actor)
  103. #       dw = rect.width/2-2
  104. #       dw += 1 if $imported["YEA-CoreEngine"] && YEA::CORE::GAUGE_OUTLINE
  105. #       draw_actor_tp(actor, rect.x+2, line_height*3, dw)
  106. #       dw = rect.width - rect.width/2 - 2
  107. #       draw_actor_mp(actor, rect.x+rect.width/2, line_height*3, dw)
  108. #     elsif draw_tp?(actor) && !draw_mp?(actor)
  109. #       draw_actor_tp(actor, rect.x+2, line_height*3, rect.width-4)
  110. #     else
  111. #       draw_actor_mp(actor, rect.x+2, line_height*3, rect.width-4)
  112. #     end

  113.   end
  114.   def item_rect(index)
  115.     rect = Rect.new
  116.     rect.width = contents.width / $game_party.max_battle_members
  117.     rect.height = contents.height
  118.     rect.x = index * rect.width
  119.     if YEA::BATTLE::BATTLESTATUS_CENTER_FACES
  120.       rect.x += (contents.width - $game_party.members.size * rect.width) / 2
  121.     end
  122.     rect.y = 0
  123.     return rect
  124.   end
  125.   def draw_face(face_name, face_index, dx, dy, enabled = true)
  126.     bitmap = Cache.face(face_name)
  127.     fx = [(96 - item_rect(0).width + 1) / 2, 0].max
  128.     fy = face_index / 4 * 96 + 2
  129.     fw = [item_rect(0).width - 4, 92].min
  130.     rect = Rect.new(fx, fy, fw, 92)
  131.     rect = Rect.new(face_index % 4 * 96 + fx, fy, fw, 92)
  132.     contents.blt(dx, dy, bitmap, rect, enabled ? 255 : translucent_alpha)
  133.     bitmap.dispose
  134.   end
  135.   def draw_actor_name(actor, dx, dy, dw = 112)
  136.     reset_font_settings
  137.     contents.font.size = YEA::BATTLE::BATTLESTATUS_NAME_FONT_SIZE
  138.     change_color(hp_color(actor))
  139.     draw_text(dx+24, dy, dw-24, line_height, actor.name)
  140.   end
  141.   def draw_actor_action(actor, dx, dy)
  142.     draw_icon(action_icon(actor), dx, dy)
  143.   end
  144.   def action_icon(actor)
  145.     return Icon.no_action if actor.current_action.nil?
  146.     return Icon.no_action if actor.current_action.item.nil?
  147.     return actor.current_action.item.icon_index
  148.   end
  149.   def draw_tp?(actor)
  150.     return actor.draw_tp?
  151.   end
  152.   def draw_mp?(actor)
  153.     return actor.draw_mp?
  154.   end
  155.   def draw_current_and_max_values(dx, dy, dw, current, max, color1, color2)
  156.     change_color(color1)
  157.     draw_text(dx, dy, dw, line_height, current.to_s, 2)
  158.   end
  159.   def draw_actor_hp(actor, dx, dy, width = 124)
  160.     draw_gauge(dx, dy, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
  161.     change_color(system_color)
  162.     cy = (Font.default_size - contents.font.size) / 2 + 1
  163.     draw_text(dx+2, dy+cy, 30, line_height, Vocab::hp_a)
  164.     draw_current_and_max_values(dx, dy+cy, width, actor.hp, actor.mhp,
  165.       hp_color(actor), normal_color)
  166.     end
  167.   def draw_actor_mp(actor, dx, dy, width = 124)
  168.     draw_gauge(dx, dy, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
  169.     change_color(system_color)
  170.     cy = (Font.default_size - contents.font.size) / 2 + 1
  171.     draw_text(dx+2, dy+cy, 30, line_height, Vocab::mp_a)
  172.     draw_current_and_max_values(dx, dy+cy, width, actor.mp, actor.mmp,
  173.       mp_color(actor), normal_color)
  174.     end
  175.    def draw_actor_tp(actor, dx, dy, width = 124)
  176.      draw_gauge(dx, dy, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
  177.      change_color(system_color)
  178.      cy = (Font.default_size - contents.font.size) / 2 + 1
  179.      draw_text(dx+2, dy+cy, 30, line_height, Vocab::tp_a)
  180.      change_color(tp_color(actor))
  181.      draw_text(dx + width - 42, dy+cy, 42, line_height, actor.tp.to_i, 2)
  182.    end
  183. #   def draw_actor_tp(actor, x, y, width = 124)
  184. #     draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
  185. #     change_color(system_color)
  186. #     draw_text(x, y, 30, line_height, Vocab::tp_a)
  187. #     change_color(tp_color(actor))
  188. #     draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 2)
  189. #   end
  190. end
  191. class Window_BattleActor < Window_BattleStatus
  192.   def show
  193.     create_flags
  194.     super
  195.   end
  196.   def create_flags
  197.     set_select_flag(:any)
  198.     select(0)
  199.     return if $game_temp.battle_aid.nil?
  200.     if $game_temp.battle_aid.need_selection?
  201.       select(0)
  202.       set_select_flag(:dead) if $game_temp.battle_aid.for_dead_friend?
  203.     elsif $game_temp.battle_aid.for_user?
  204.       battler = BattleManager.actor
  205.       id = battler.nil? ? 0 : $game_party.battle_members.index(battler)
  206.       select(id)
  207.       set_select_flag(:user)
  208.     elsif $game_temp.battle_aid.for_all?
  209.       select(0)
  210.       set_select_flag(:all)
  211.       set_select_flag(:all_dead) if $game_temp.battle_aid.for_dead_friend?
  212.     elsif $game_temp.battle_aid.for_random?
  213.       select(0)
  214.       set_select_flag(:random) if $game_temp.battle_aid.for_random?
  215.     end
  216.   end
  217.   def set_select_flag(flag)
  218.     @select_flag = flag
  219.     case @select_flag
  220.     when :all, :all_dead, :random
  221.       @cursor_all = true
  222.     else
  223.       @cursor_all = false
  224.     end
  225.   end
  226.   def update_cursor
  227.     if @cursor_all
  228.       cursor_rect.set(0, 0, contents.width, contents.height)
  229.       self.top_row = 0
  230.     elsif @index < 0
  231.       cursor_rect.empty
  232.     else
  233.       ensure_cursor_visible
  234.       cursor_rect.set(item_rect(@index))
  235.     end
  236.   end
  237.   def cursor_movable?
  238.     return false if @select_flag == :user
  239.     return super
  240.   end
  241.   def current_item_enabled?
  242.     return true if $game_temp.battle_aid.nil?
  243.     if $game_temp.battle_aid.need_selection?
  244.       member = $game_party.battle_members[@index]
  245.       return member.dead? if $game_temp.battle_aid.for_dead_friend?
  246.     elsif $game_temp.battle_aid.for_dead_friend?
  247.       for member in $game_party.battle_members
  248.         return true if member.dead?
  249.       end
  250.       return false
  251.     end
  252.     return true
  253.   end
  254. end
  255. class Window_BattleStatusAid < Window_BattleStatus
  256.   attr_accessor :status_window
  257.   def initialize
  258.     super
  259.     self.visible = false
  260.     self.openness = 255
  261.   end
  262.   def window_width; return 128; end
  263.   def show
  264.     super
  265.     refresh
  266.   end
  267.   def refresh
  268.     contents.clear
  269.     return if @status_window.nil?
  270.     draw_item(@status_window.index)
  271.   end
  272.   def item_rect(index)
  273.     return Rect.new(0, 0, contents.width, contents.height)
  274.   end
  275. end
  276. class Window_BattleEnemy < Window_Selectable
  277.   def initialize(info_viewport)
  278.     super(0, Graphics.height, window_width, fitting_height(1))
  279.     refresh
  280.     self.visible = false
  281.     @info_viewport = info_viewport
  282.   end
  283.   def col_max; return item_max; end
  284.   def show
  285.     create_flags
  286.     super
  287.   end
  288.   def create_flags
  289.     set_select_flag(:any)
  290.     select(0)
  291.     return if $game_temp.battle_aid.nil?
  292.     if $game_temp.battle_aid.need_selection?
  293.       select(0)
  294.     elsif $game_temp.battle_aid.for_all?
  295.       select(0)
  296.       set_select_flag(:all)
  297.     elsif $game_temp.battle_aid.for_random?
  298.       select(0)
  299.       set_select_flag(:random)
  300.     end
  301.   end
  302.   def set_select_flag(flag)
  303.     @select_flag = flag
  304.     case @select_flag
  305.     when :all, :random
  306.       @cursor_all = true
  307.     else
  308.       @cursor_all = false
  309.     end
  310.   end
  311.   def select_all?
  312.     return true if @select_flag == :all
  313.     return true if @select_flag == :random
  314.     return false
  315.   end
  316.   def update_cursor
  317.     if @cursor_all
  318.       cursor_rect.set(0, 0, contents.width, contents.height)
  319.       self.top_row = 0
  320.     elsif @index < 0
  321.       cursor_rect.empty
  322.     else
  323.       ensure_cursor_visible
  324.       cursor_rect.set(item_rect(@index))
  325.     end
  326.   end
  327.   def cursor_movable?
  328.     return false if @select_flag == :user
  329.     return super
  330.   end
  331.   def current_item_enabled?
  332.     return true if $game_temp.battle_aid.nil?
  333.     if $game_temp.battle_aid.need_selection?
  334.       member = $game_party.battle_members[@index]
  335.       return member.dead? if $game_temp.battle_aid.for_dead_friend?
  336.     elsif $game_temp.battle_aid.for_dead_friend?
  337.       for member in $game_party.battle_members
  338.         return true if member.dead?
  339.       end
  340.       return false
  341.     end
  342.     return true
  343.   end
  344.   def enemy; @data[index]; end
  345.   def refresh
  346.     make_item_list
  347.     create_contents
  348.     draw_all_items
  349.   end
  350.   def make_item_list
  351.     @data = $game_troop.alive_members
  352.     @data.sort! { |a,b| a.screen_x <=> b.screen_x }
  353.   end
  354.   def draw_item(index); return; end
  355.   def update
  356.     super
  357.     return unless active
  358.     enemy.sprite_effect_type = :whiten
  359.     return unless select_all?
  360.     for enemy in $game_troop.alive_members
  361.       enemy.sprite_effect_type = :whiten
  362.     end
  363.   end
  364. end
  365. class Window_BattleHelp < Window_Help
  366.   attr_accessor :actor_window
  367.   attr_accessor :enemy_window
  368.   def update
  369.     super
  370.     if !self.visible and @text != ""
  371.       @text = ""
  372.       return refresh
  373.     end
  374.     update_battler_name
  375.   end
  376.   def update_battler_name
  377.     return unless @actor_window.active || @enemy_window.active
  378.     if @actor_window.active
  379.       battler = $game_party.battle_members[@actor_window.index]
  380.     elsif @enemy_window.active
  381.       battler = @enemy_window.enemy
  382.     end
  383.     if special_display?
  384.       refresh_special_case(battler)
  385.     else
  386.       refresh_battler_name(battler) if battler_name(battler) != @text
  387.     end
  388.   end
  389.   def battler_name(battler)
  390.     text = battler.name.clone
  391.     return text
  392.   end
  393.   def refresh_battler_name(battler)
  394.     contents.clear
  395.     reset_font_settings
  396.     change_color(normal_color)
  397.     @text = battler_name(battler)
  398.     icons = battler.state_icons + battler.buff_icons
  399.     dy = icons.size <= 0 ? line_height / 2 : 0
  400.     draw_text(0, dy, contents.width, line_height, @text, 1)
  401.     dx = (contents.width - (icons.size * 24)) / 2
  402.     draw_actor_icons(battler, dx, line_height, contents.width)
  403.   end
  404.   def special_display?
  405.     return false if $game_temp.battle_aid.nil?
  406.     return false if $game_temp.battle_aid.for_user?
  407.     return !$game_temp.battle_aid.need_selection?
  408.   end
  409.   def refresh_special_case(battler)
  410.     if $game_temp.battle_aid.for_opponent?
  411.       if $game_temp.battle_aid.for_all?
  412.         text = YEA::BATTLE::HELP_TEXT_ALL_FOES
  413.       else
  414.         case $game_temp.battle_aid.number_of_targets
  415.         when 1
  416.           text = YEA::BATTLE::HELP_TEXT_ONE_RANDOM_FOE
  417.         else
  418.           number = $game_temp.battle_aid.number_of_targets
  419.           text = sprintf(YEA::BATTLE::HELP_TEXT_MANY_RANDOM_FOE, number)
  420.         end
  421.       end
  422.     else
  423.       if $game_temp.battle_aid.for_dead_friend?
  424.         text = YEA::BATTLE::HELP_TEXT_ALL_DEAD_ALLIES
  425.       elsif $game_temp.battle_aid.for_random?
  426.         case $game_temp.battle_aid.number_of_targets
  427.         when 1
  428.           text = YEA::BATTLE::HELP_TEXT_ONE_RANDOM_ALLY
  429.         else
  430.           number = $game_temp.battle_aid.number_of_targets
  431.           text = sprintf(YEA::BATTLE::HELP_TEXT_RANDOM_ALLIES, number)
  432.         end
  433.       else
  434.         text = YEA::BATTLE::HELP_TEXT_ALL_ALLIES
  435.       end
  436.     end
  437.     return if text == @text
  438.     @text = text
  439.     contents.clear
  440.     reset_font_settings
  441.     draw_text(0, 0, contents.width, line_height*2, @text, 1)
  442.   end
  443. end
  444. class Window_SkillList < Window_Selectable
  445.   def spacing
  446.     return 8 if $game_party.in_battle
  447.     return super
  448.   end
  449. end
  450. class Window_ItemList < Window_Selectable
  451.   def spacing
  452.     return 8 if $game_party.in_battle
  453.     return super
  454.   end
  455. end
  456. class Scene_Battle < Scene_Base
  457.   attr_accessor :enemy_window
  458.   attr_accessor :info_viewport
  459.   attr_accessor :spriteset
  460.   attr_accessor :status_window
  461.   attr_accessor :status_aid_window
  462.   attr_accessor :subject
  463.   alias scene_battle_create_all_windows_abe create_all_windows
  464.   def create_all_windows
  465.     scene_battle_create_all_windows_abe
  466.     create_battle_status_aid_window
  467.     set_help_window
  468.   end
  469.   alias scene_battle_create_info_viewport_abe create_info_viewport
  470.   def create_info_viewport
  471.     scene_battle_create_info_viewport_abe
  472.     @status_window.refresh
  473.   end
  474.   def create_battle_status_aid_window
  475.     @status_aid_window = Window_BattleStatusAid.new
  476.     @status_aid_window.status_window = @status_window
  477.     @status_aid_window.x = Graphics.width - @status_aid_window.width
  478.     @status_aid_window.y = Graphics.height - @status_aid_window.height
  479.   end
  480.   def create_help_window
  481.     @help_window = Window_BattleHelp.new
  482.     @help_window.hide
  483.   end
  484.   def set_help_window
  485.     @help_window.actor_window = @actor_window
  486.     @help_window.enemy_window = @enemy_window
  487.   end
  488.   alias scene_battle_create_skill_window_abe create_skill_window
  489.   def create_skill_window
  490.     scene_battle_create_skill_window_abe
  491.     @skill_window.height = @info_viewport.rect.height
  492.     @skill_window.width = Graphics.width - @actor_command_window.width
  493.     @skill_window.y = Graphics.height - @skill_window.height
  494.   end
  495.   alias scene_battle_create_item_window_abe create_item_window
  496.   def create_item_window
  497.     scene_battle_create_item_window_abe
  498.     @item_window.height = @skill_window.height
  499.     @item_window.width = @skill_window.width
  500.     @item_window.y = Graphics.height - @item_window.height
  501.   end
  502.   alias scene_battle_next_command_abe next_command
  503.   def next_command
  504.     @status_window.show
  505.     redraw_current_status
  506.     @actor_command_window.show
  507.     @status_aid_window.hide
  508.     scene_battle_next_command_abe
  509.   end
  510.   alias scene_battle_prior_command_abe prior_command
  511.   def prior_command
  512.     redraw_current_status
  513.     scene_battle_prior_command_abe
  514.   end
  515.   def redraw_current_status
  516.     return if @status_window.index < 0
  517.     @status_window.draw_item(@status_window.index)
  518.   end
  519.   alias scene_battle_command_attack_abe command_attack
  520.   def command_attack
  521.     $game_temp.battle_aid = $data_skills[BattleManager.actor.attack_skill_id]
  522.     scene_battle_command_attack_abe
  523.   end
  524.   alias scene_battle_command_skill_abe command_skill
  525.   def command_skill
  526.     scene_battle_command_skill_abe
  527.     @status_window.hide
  528.     @actor_command_window.hide
  529.     @status_aid_window.show
  530.   end
  531.   alias scene_battle_command_item_abe command_item
  532.   def command_item
  533.     scene_battle_command_item_abe
  534.     @status_window.hide
  535.     @actor_command_window.hide
  536.     @status_aid_window.show
  537.   end
  538.   def on_skill_ok
  539.     @skill = @skill_window.item
  540.     $game_temp.battle_aid = @skill
  541.     BattleManager.actor.input.set_skill(@skill.id)
  542.     BattleManager.actor.last_skill.object = @skill
  543.     if @skill.for_opponent?
  544.       select_enemy_selection
  545.     elsif @skill.for_friend?
  546.       select_actor_selection
  547.     else
  548.       @skill_window.hide
  549.       next_command
  550.       $game_temp.battle_aid = nil
  551.     end
  552.   end
  553.   alias scene_battle_on_skill_cancel_abe on_skill_cancel
  554.   def on_skill_cancel
  555.     scene_battle_on_skill_cancel_abe
  556.     @status_window.show
  557.     @actor_command_window.show
  558.     @status_aid_window.hide
  559.   end
  560.   def on_item_ok
  561.     @item = @item_window.item
  562.     $game_temp.battle_aid = @item
  563.     BattleManager.actor.input.set_item(@item.id)
  564.     if @item.for_opponent?
  565.       select_enemy_selection
  566.     elsif @item.for_friend?
  567.       select_actor_selection
  568.     else
  569.       @item_window.hide
  570.       next_command
  571.       $game_temp.battle_aid = nil
  572.     end
  573.     $game_party.last_item.object = @item
  574.   end
  575.   alias scene_battle_on_item_cancel_abe on_item_cancel
  576.   def on_item_cancel
  577.     scene_battle_on_item_cancel_abe
  578.     @status_window.show
  579.     @actor_command_window.show
  580.     @status_aid_window.hide
  581.   end
  582.   alias scene_battle_select_actor_selection_abe select_actor_selection
  583.   def select_actor_selection
  584.     @status_aid_window.refresh
  585.     scene_battle_select_actor_selection_abe
  586.     @status_window.hide
  587.     @skill_window.hide
  588.     @item_window.hide
  589.     @help_window.show
  590.   end
  591.   alias scene_battle_on_actor_ok_abe on_actor_ok
  592.   def on_actor_ok
  593.     $game_temp.battle_aid = nil
  594.     scene_battle_on_actor_ok_abe
  595.     @status_window.show
  596.     if $imported["YEA-BattleCommandList"] && !@confirm_command_window.nil?
  597.       @actor_command_window.visible = !@confirm_command_window.visible
  598.     else
  599.       @actor_command_window.show
  600.     end
  601.     @status_aid_window.hide
  602.   end
  603.   alias scene_battle_on_actor_cancel_abe on_actor_cancel
  604.   def on_actor_cancel
  605.     BattleManager.actor.input.clear
  606.     @status_aid_window.refresh
  607.     $game_temp.battle_aid = nil
  608.     scene_battle_on_actor_cancel_abe
  609.     case @actor_command_window.current_symbol
  610.     when :skill
  611.       @skill_window.show
  612.     when :item
  613.       @item_window.show
  614.     end
  615.   end
  616.   alias scene_battle_select_enemy_selection_abe select_enemy_selection
  617.   def select_enemy_selection
  618.     @status_aid_window.refresh
  619.     scene_battle_select_enemy_selection_abe
  620.     @help_window.show
  621.   end
  622.   alias scene_battle_on_enemy_ok_abe on_enemy_ok
  623.   def on_enemy_ok
  624.     $game_temp.battle_aid = nil
  625.     scene_battle_on_enemy_ok_abe
  626.   end
  627.   alias scene_battle_on_enemy_cancel_abe on_enemy_cancel
  628.   def on_enemy_cancel
  629.     BattleManager.actor.input.clear
  630.     @status_aid_window.refresh
  631.     $game_temp.battle_aid = nil
  632.     scene_battle_on_enemy_cancel_abe
  633.     if @skill_window.visible || @item_window.visible
  634.       @help_window.show
  635.     else
  636.       @help_window.hide
  637.     end
  638.   end
  639.   def end_battle_conditions?
  640.     return true if $game_party.members.empty?
  641.     return true if $game_party.all_dead?
  642.     return true if $game_troop.all_dead?
  643.     return true if BattleManager.aborting?
  644.     return false
  645.   end
  646.   def refresh_status
  647.     #如果你是程序员,请顺手帮忙优化下这里,谢谢。
  648.     @status_window.refresh
  649.     for i in $game_party.battle_members
  650.       @status_window.draw_item($game_party.battle_members.index(i))
  651.     end
  652.   end
  653. end
复制代码



如有没说清楚的地方,请追问

以上

   

点评

谢谢,要是能显示MP,TP,HP三个那简直太棒了!可惜!  发表于 2016-5-4 10:14
回复

使用道具 举报

梦石
0
星屑
2019
在线时间
940 小时
注册时间
2015-10-26
回帖
293

开拓者

发表于 2016-5-4 08:13:04 | 显示全部楼层
我当时用这个脚本的时候,右边的攻击绝招这一栏经常出BUG消失不见,最后就没用这个脚本了

点评

说不定是不兼容的问题。  发表于 2016-5-4 14:24
可能是你其他脚本冲突吧,貌似我没什么问题,只是无法显示TP  发表于 2016-5-4 10:12
回复

使用道具 举报

梦石
0
星屑
60
在线时间
62 小时
注册时间
2016-5-2
回帖
173
发表于 2016-5-4 12:50:43 | 显示全部楼层
本帖最后由 李牧羊 于 2016-5-4 13:14 编辑

不好意思,在下又读了几遍答案,是在下没有说清楚。现将回复整理后,重新贴出:

解决这个情况,有两个方法
1.  仅修改1行代码,仅显示TP或MP中的一个

2.  修改若干地方的代码,使它们同时显示
代码请见楼上

!但是,这两个代码无疑废除了作者的原意。说实在的,在下读了30min也没弄懂到底作者的原意是什么。但肯定这个脚本【原本就是可以显示TP】的;只是TP与MP不能同时显示罢了



你没有使用我修改的脚本吗?
不好好读别人的回复可是不对的啊!修改后的脚本,就在在下原本的楼层,请仔细阅读之后,再做回复。
1.png




@若得若失

点评

哪里有什么神,不过条落水狗而已。顶不顶流浪者这层皮,在下都跟阁下的处境完全一样。只是觉得还有自己能够帮得上忙的事情,会感到很高兴而已  发表于 2016-5-4 14:44
嘻嘻,原来是Vortur大神,失敬失敬!貌似我还是流浪者,居然无法加好友。  发表于 2016-5-4 14:26
加Vortur吧,那是在下的马甲。在下这个号就只有一个好友  发表于 2016-5-4 14:18
闲着逛逛论坛没事的,多谢了!可否加个好友  发表于 2016-5-4 14:04
嗯,不客气.你们公司的员工都不使用类似“老板来了”的软件吗?  发表于 2016-5-4 13:18
回复

使用道具 举报

无限の剣制

梦石
0
星屑
10460
在线时间
5019 小时
注册时间
2013-2-28
回帖
4942

开拓者贵宾

发表于 2016-5-18 00:22:23 | 显示全部楼层
稍微看了一下这个脚本
这个脚本并不是不绘制TP,而是他已经为你考虑太多了。然后又没说清楚导致使用者误解了
这个脚本当满足以下条件时绘制只TP条:
1、角色拥有“特技专注”特性
2、角色已经学会至少一个可以使用的需要消耗TP的技能
3、不会使用任何需要消耗MP的技能
当满足上面的1和2,并且会使用消耗MP的技能TP条和MP条都绘制,并且各占一半的宽度
其他情况就只绘制MP条。
你多半是没添加“特技专注”特性。这个特性是用来保留TP值,让战斗开始的时候不会初始化TP值。

点评

6666666666666666 感谢  发表于 2016-5-20 12:37

评分

参与人数 1梦石 +1 收起 理由
taroxd + 1 认可答案

查看全部评分

回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部