设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1973|回复: 2
打印 上一主题 下一主题

[已经解决] 修改技能窗口位置的脚本

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
29 小时
注册时间
2013-8-23
帖子
69
跳转到指定楼层
1
发表于 2014-8-3 13:47:10 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
有没有像下图这样,技能窗口显示在下面的脚本?

点评

谷歌以图搜图是个好东西  发表于 2014-8-3 17:29
在6R上似乎没有,图书馆、RM技术区全部都翻过了都没找到  发表于 2014-8-3 16:07
肯定有,你给的图用的就是那个脚本~  发表于 2014-8-3 13:50

Lv2.观梦者

梦石
0
星屑
250
在线时间
233 小时
注册时间
2013-8-2
帖子
587
2
发表于 2014-8-3 14:38:26 | 只看该作者
本帖最后由 千夙 于 2014-8-6 14:15 编辑

以坑,,,水就水吧

点评

看你的头像就是来这里混好人卡的  发表于 2014-8-6 14:03
我忘了,我要怎么遗忘。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
186 小时
注册时间
2014-6-14
帖子
213
3
发表于 2014-8-6 14:08:10 | 只看该作者
本帖最后由 qq19750508 于 2014-8-6 15:19 编辑

Oh.这有你想要的。
RUBY 代码复制
  1. =begin
  2. 这个脚本就是杂兵天下君的战斗显示脸图脚本
  3.  
  4. 使用方法:直接插在main脚本上方即可
  5.  
  6. 效果:使用技能后,可以在脸图左上角显示技能图标
  7.  
  8. 而且技能显示窗口在下面显示
  9.  
  10. 还有,如果检查没有消耗MP的技能,就不会显示MP
  11.  
  12. TP也如此,如果除了攻击和防御,其他技能都没有消耗
  13.  
  14. 直接显示MP,如果都有MP,TP都显示
  15.  
  16. 一般来讲,MP,TP是都显示的,只是隐藏了而已
  17.  
  18. 这里唯一的缺点是:跟鼠标脚本产生冲突
  19.  
  20. 一用技能就出错,望谅解
  21.  
  22. 还有范围,可以高亮的显示敌人被选中的结果
  23.  
  24. 还可以在上面显示范围,
  25.  
  26. 如果是单个队友/敌人,直接显示目标名称
  27.  
  28. =end
  29.  
  30. $脸图战斗 = true
  31.  
  32. $imported = {} if $imported.nil?
  33.  
  34. module YEA
  35.  
  36.   module BATTLE
  37.  
  38.     SKIP_PARTY_COMMAND = true
  39.  
  40.     BATTLESTATUS_NAME_FONT_SIZE = 20
  41.  
  42.     BATTLESTATUS_TEXT_FONT_SIZE = 16
  43.  
  44.     BATTLESTATUS_NO_ACTION_ICON = 185
  45.  
  46.     BATTLESTATUS_HPGAUGE_Y_PLUS = 11
  47.  
  48.     BATTLESTATUS_CENTER_FACES   = false
  49.  
  50.     HELP_TEXT_ALL_FOES        = "全体敌人"
  51.  
  52.     HELP_TEXT_ONE_RANDOM_FOE  = "单个敌人"
  53.  
  54.     HELP_TEXT_MANY_RANDOM_FOE = "%d个随机敌人"
  55.  
  56.     HELP_TEXT_ALL_ALLIES      = "全体队友"
  57.  
  58.     HELP_TEXT_ALL_DEAD_ALLIES = "全体死亡队友"
  59.  
  60.     HELP_TEXT_ONE_RANDOM_ALLY = "单个随机队友"
  61.  
  62.     HELP_TEXT_RANDOM_ALLIES   = "%d个随机队友"
  63.  
  64.   end
  65.  
  66. end
  67.  
  68. class Game_Battler
  69.  
  70.   def can_collapse?
  71.  
  72.     return false unless dead?
  73.  
  74.     unless actor?
  75.  
  76.       return false unless sprite.battler_visible
  77.  
  78.       array = [:collapse, :boss_collapse, :instant_collapse]
  79.  
  80.       return false if array.include?(sprite.effect_type)
  81.  
  82.     end
  83.  
  84.     return true
  85.  
  86.   end
  87.  
  88.   def draw_mp?
  89.  
  90.     return true
  91.  
  92.   end
  93.  
  94.   def draw_tp?
  95.  
  96.     return $data_system.opt_display_tp
  97.  
  98.   end
  99.  
  100. end
  101.  
  102. module Icon
  103.  
  104.   def self.no_action; return YEA::BATTLE::BATTLESTATUS_NO_ACTION_ICON; end
  105.  
  106. end
  107.  
  108. class Game_Temp
  109.  
  110.   attr_accessor :battle_aid
  111.  
  112.   attr_accessor :evaluating
  113.  
  114. end
  115.  
  116. class Game_Action
  117.  
  118.   alias evaluate_item_with_target_abe evaluate_item_with_target
  119.  
  120.   def evaluate_item_with_target(target)
  121.  
  122.     $game_temp.evaluating = true
  123.  
  124.     result = evaluate_item_with_target_abe(target)
  125.  
  126.     $game_temp.evaluating = false
  127.  
  128.     return result
  129.  
  130.   end
  131.  
  132. end
  133.  
  134. class Game_Actor < Game_Battler
  135.  
  136.   def draw_mp?
  137.  
  138.     return true unless draw_tp?
  139.  
  140.     for skill in skills
  141.  
  142.       next unless added_skill_types.include?(skill.stype_id)
  143.  
  144.       return true if skill.mp_cost > 0
  145.  
  146.     end
  147.  
  148.     return false
  149.  
  150.   end
  151.  
  152.   def draw_tp?
  153.  
  154.     return false unless $data_system.opt_display_tp
  155.  
  156.     for skill in skills
  157.  
  158.       next unless added_skill_types.include?(skill.stype_id)
  159.  
  160.       return true if skill.tp_cost > 0
  161.  
  162.     end
  163.  
  164.     return false
  165.  
  166.   end
  167.  
  168. end
  169.  
  170. class Window_BattleStatus < Window_Selectable
  171.  
  172.   def initialize
  173.  
  174.     super(0, 0, window_width, window_height)
  175.  
  176.     self.openness = 0
  177.  
  178.     @party = $game_party.battle_members.clone
  179.  
  180.   end
  181.  
  182.   def col_max; return $game_party.max_battle_members; end
  183.  
  184.   def battle_members; return $game_party.battle_members; end
  185.  
  186.   def actor; return battle_members[@index]; end
  187.  
  188.   def update
  189.  
  190.     super
  191.  
  192.     return if @party == $game_party.battle_members
  193.  
  194.     @party = $game_party.battle_members.clone
  195.  
  196.     refresh
  197.  
  198.   end
  199.  
  200.   def draw_item(index)
  201.  
  202.     return if index.nil?
  203.  
  204.     clear_item(index)
  205.  
  206.     actor = battle_members[index]
  207.  
  208.     rect = item_rect(index)
  209.  
  210.     return if actor.nil?
  211.  
  212.     draw_actor_face(actor, rect.x+2, rect.y+2, actor.alive?)
  213.  
  214.     draw_actor_name(actor, rect.x, rect.y, rect.width-8)
  215.  
  216.     draw_actor_action(actor, rect.x, rect.y)
  217.  
  218.     draw_actor_icons(actor, rect.x, line_height*1, rect.width)
  219.  
  220.     gx = YEA::BATTLE::BATTLESTATUS_HPGAUGE_Y_PLUS
  221.  
  222.     contents.font.size = YEA::BATTLE::BATTLESTATUS_TEXT_FONT_SIZE
  223.  
  224.     draw_actor_hp(actor, rect.x+2, line_height*2+gx, rect.width-4)
  225.  
  226.     if draw_tp?(actor) && draw_mp?(actor)
  227.  
  228.       dw = rect.width/2-2
  229.  
  230.       dw += 1 if $imported["YEA-CoreEngine"] && YEA::CORE::GAUGE_OUTLINE
  231.  
  232.       draw_actor_tp(actor, rect.x+2, line_height*3, dw)
  233.  
  234.       dw = rect.width - rect.width/2 - 2
  235.  
  236.       draw_actor_mp(actor, rect.x+rect.width/2, line_height*3, dw)
  237.  
  238.     elsif draw_tp?(actor) && !draw_mp?(actor)
  239.  
  240.       draw_actor_tp(actor, rect.x+2, line_height*3, rect.width-4)
  241.  
  242.     else
  243.  
  244.       draw_actor_mp(actor, rect.x+2, line_height*3, rect.width-4)
  245.  
  246.     end
  247.  
  248.   end
  249.  
  250.   def item_rect(index)
  251.  
  252.     rect = Rect.new
  253.  
  254.     rect.width = contents.width / $game_party.max_battle_members
  255.  
  256.     rect.height = contents.height
  257.  
  258.     rect.x = index * rect.width
  259.  
  260.     if YEA::BATTLE::BATTLESTATUS_CENTER_FACES
  261.  
  262.       rect.x += (contents.width - $game_party.members.size * rect.width) / 2
  263.  
  264.     end
  265.  
  266.     rect.y = 0
  267.  
  268.     return rect
  269.  
  270.   end
  271.  
  272.   def draw_face(face_name, face_index, dx, dy, enabled = true)
  273.  
  274.     bitmap = Cache.face(face_name)
  275.  
  276.     fx = [(96 - item_rect(0).width + 1) / 2, 0].max
  277.  
  278.     fy = face_index / 4 * 96 + 2
  279.  
  280.     fw = [item_rect(0).width - 4, 92].min
  281.  
  282.     rect = Rect.new(fx, fy, fw, 92)
  283.  
  284.     rect = Rect.new(face_index % 4 * 96 + fx, fy, fw, 92)
  285.  
  286.     contents.blt(dx, dy, bitmap, rect, enabled ? 255 : translucent_alpha)
  287.  
  288.     bitmap.dispose
  289.  
  290.   end
  291.  
  292.   def draw_actor_name(actor, dx, dy, dw = 112)
  293.  
  294.     reset_font_settings
  295.  
  296.     contents.font.size = YEA::BATTLE::BATTLESTATUS_NAME_FONT_SIZE
  297.  
  298.     change_color(hp_color(actor))
  299.  
  300.     draw_text(dx+24, dy, dw-24, line_height, actor.name)
  301.  
  302.   end
  303.  
  304.   def draw_actor_action(actor, dx, dy)
  305.  
  306.     draw_icon(action_icon(actor), dx, dy)
  307.  
  308.   end
  309.  
  310.   def action_icon(actor)
  311.  
  312.     return Icon.no_action if actor.current_action.nil?
  313.  
  314.     return Icon.no_action if actor.current_action.item.nil?
  315.  
  316.     return actor.current_action.item.icon_index
  317.  
  318.   end
  319.  
  320.   def draw_tp?(actor)
  321.  
  322.     return actor.draw_tp?
  323.  
  324.   end
  325.  
  326.   def draw_mp?(actor)
  327.  
  328.     return actor.draw_mp?
  329.  
  330.   end
  331.  
  332.   def draw_current_and_max_values(dx, dy, dw, current, max, color1, color2)
  333.  
  334.     change_color(color1)
  335.  
  336.     draw_text(dx, dy, dw, line_height, current.to_s, 2)
  337.  
  338.   end
  339.  
  340.   def draw_actor_hp(actor, dx, dy, width = 124)
  341.  
  342.     draw_gauge(dx, dy, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
  343.  
  344.     change_color(system_color)
  345.  
  346.     cy = (Font.default_size - contents.font.size) / 2 + 1
  347.  
  348.     draw_text(dx+2, dy+cy, 30, line_height, Vocab::hp_a)
  349.  
  350.     draw_current_and_max_values(dx, dy+cy, width, actor.hp, actor.mhp,
  351.  
  352.       hp_color(actor), normal_color)
  353.  
  354.     end
  355.  
  356.   def draw_actor_mp(actor, dx, dy, width = 124)
  357.  
  358.     draw_gauge(dx, dy, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
  359.  
  360.     change_color(system_color)
  361.  
  362.     cy = (Font.default_size - contents.font.size) / 2 + 1
  363.  
  364.     draw_text(dx+2, dy+cy, 30, line_height, Vocab::mp_a)
  365.  
  366.     draw_current_and_max_values(dx, dy+cy, width, actor.mp, actor.mmp,
  367.  
  368.       mp_color(actor), normal_color)
  369.  
  370.     end
  371.  
  372.   def draw_actor_tp(actor, dx, dy, width = 124)
  373.  
  374.     draw_gauge(dx, dy, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2)
  375.  
  376.     change_color(system_color)
  377.  
  378.     cy = (Font.default_size - contents.font.size) / 2 + 1
  379.  
  380.     draw_text(dx+2, dy+cy, 30, line_height, Vocab::tp_a)
  381.  
  382.     change_color(tp_color(actor))
  383.  
  384.     draw_text(dx + width - 42, dy+cy, 42, line_height, actor.tp.to_i, 2)
  385.  
  386.   end
  387.  
  388. end
  389.  
  390. class Window_BattleActor < Window_BattleStatus
  391.  
  392.   def show
  393.  
  394.     create_flags
  395.  
  396.     super
  397.  
  398.   end
  399.  
  400.   def create_flags
  401.  
  402.     set_select_flag(:any)
  403.  
  404.     select(0)
  405.  
  406.     return if $game_temp.battle_aid.nil?
  407.  
  408.     if $game_temp.battle_aid.need_selection?
  409.  
  410.       select(0)
  411.  
  412.       set_select_flag(:dead) if $game_temp.battle_aid.for_dead_friend?
  413.  
  414.     elsif $game_temp.battle_aid.for_user?
  415.  
  416.       battler = BattleManager.actor
  417.  
  418.       id = battler.nil? ? 0 : $game_party.battle_members.index(battler)
  419.  
  420.       select(id)
  421.  
  422.       set_select_flag(:user)
  423.  
  424.     elsif $game_temp.battle_aid.for_all?
  425.  
  426.       select(0)
  427.  
  428.       set_select_flag(:all)
  429.  
  430.       set_select_flag(:all_dead) if $game_temp.battle_aid.for_dead_friend?
  431.  
  432.     elsif $game_temp.battle_aid.for_random?
  433.  
  434.       select(0)
  435.  
  436.       set_select_flag(:random) if $game_temp.battle_aid.for_random?
  437.  
  438.     end
  439.  
  440.   end
  441.  
  442.   def set_select_flag(flag)
  443.  
  444.     @select_flag = flag
  445.  
  446.     case @select_flag
  447.  
  448.     when :all, :all_dead, :random
  449.  
  450.       @cursor_all = true
  451.  
  452.     else
  453.  
  454.       @cursor_all = false
  455.  
  456.     end
  457.  
  458.   end
  459.  
  460.   def update_cursor
  461.  
  462.     if @cursor_all
  463.  
  464.       cursor_rect.set(0, 0, contents.width, contents.height)
  465.  
  466.       self.top_row = 0
  467.  
  468.     elsif @index < 0
  469.  
  470.       cursor_rect.empty
  471.  
  472.     else
  473.  
  474.       ensure_cursor_visible
  475.  
  476.       cursor_rect.set(item_rect(@index))
  477.  
  478.     end
  479.  
  480.   end
  481.  
  482.   def cursor_movable?
  483.  
  484.     return false if @select_flag == :user
  485.  
  486.     return super
  487.  
  488.   end
  489.  
  490.   def current_item_enabled?
  491.  
  492.     return true if $game_temp.battle_aid.nil?
  493.  
  494.     if $game_temp.battle_aid.need_selection?
  495.  
  496.       member = $game_party.battle_members[@index]
  497.  
  498.       return member.dead? if $game_temp.battle_aid.for_dead_friend?
  499.  
  500.     elsif $game_temp.battle_aid.for_dead_friend?
  501.  
  502.       for member in $game_party.battle_members
  503.  
  504.         return true if member.dead?
  505.  
  506.       end
  507.  
  508.       return false
  509.  
  510.     end
  511.  
  512.     return true
  513.  
  514.   end
  515.  
  516. end
  517.  
  518. class Window_BattleStatusAid < Window_BattleStatus
  519.  
  520.   attr_accessor :status_window
  521.  
  522.   def initialize
  523.  
  524.     super
  525.  
  526.     self.visible = false
  527.  
  528.     self.openness = 255
  529.  
  530.   end
  531.  
  532.   def window_width; return 128; end
  533.  
  534.   def show
  535.  
  536.     super
  537.  
  538.     refresh
  539.  
  540.   end
  541.  
  542.   def refresh
  543.  
  544.     contents.clear
  545.  
  546.     return if @status_window.nil?
  547.  
  548.     draw_item(@status_window.index)
  549.  
  550.   end
  551.  
  552.   def item_rect(index)
  553.  
  554.     return Rect.new(0, 0, contents.width, contents.height)
  555.  
  556.   end
  557.  
  558. end
  559.  
  560. class Window_BattleEnemy < Window_Selectable
  561.  
  562.   def initialize(info_viewport)
  563.  
  564.     super(0, Graphics.height, window_width, fitting_height(1))
  565.  
  566.     refresh
  567.  
  568.     self.visible = false
  569.  
  570.     @info_viewport = info_viewport
  571.  
  572.   end
  573.  
  574.   def col_max; return item_max; end
  575.  
  576.   def show
  577.  
  578.     create_flags
  579.  
  580.     super
  581.  
  582.   end
  583.  
  584.   def create_flags
  585.  
  586.     set_select_flag(:any)
  587.  
  588.     select(0)
  589.  
  590.     return if $game_temp.battle_aid.nil?
  591.  
  592.     if $game_temp.battle_aid.need_selection?
  593.  
  594.       select(0)
  595.  
  596.     elsif $game_temp.battle_aid.for_all?
  597.  
  598.       select(0)
  599.  
  600.       set_select_flag(:all)
  601.  
  602.     elsif $game_temp.battle_aid.for_random?
  603.  
  604.       select(0)
  605.  
  606.       set_select_flag(:random)
  607.  
  608.     end
  609.  
  610.   end
  611.  
  612.   def set_select_flag(flag)
  613.  
  614.     @select_flag = flag
  615.  
  616.     case @select_flag
  617.  
  618.     when :all, :random
  619.  
  620.       @cursor_all = true
  621.  
  622.     else
  623.  
  624.       @cursor_all = false
  625.  
  626.     end
  627.  
  628.   end
  629.  
  630.   def select_all?
  631.  
  632.     return true if @select_flag == :all
  633.  
  634.     return true if @select_flag == :random
  635.  
  636.     return false
  637.  
  638.   end
  639.  
  640.   def update_cursor
  641.  
  642.     if @cursor_all
  643.  
  644.       cursor_rect.set(0, 0, contents.width, contents.height)
  645.  
  646.       self.top_row = 0
  647.  
  648.     elsif @index < 0
  649.  
  650.       cursor_rect.empty
  651.  
  652.     else
  653.  
  654.       ensure_cursor_visible
  655.  
  656.       cursor_rect.set(item_rect(@index))
  657.  
  658.     end
  659.  
  660.   end
  661.  
  662.   def cursor_movable?
  663.  
  664.     return false if @select_flag == :user
  665.  
  666.     return super
  667.  
  668.   end
  669.  
  670.   def current_item_enabled?
  671.  
  672.     return true if $game_temp.battle_aid.nil?
  673.  
  674.     if $game_temp.battle_aid.need_selection?
  675.  
  676.       member = $game_party.battle_members[@index]
  677.  
  678.       return member.dead? if $game_temp.battle_aid.for_dead_friend?
  679.  
  680.     elsif $game_temp.battle_aid.for_dead_friend?
  681.  
  682.       for member in $game_party.battle_members
  683.  
  684.         return true if member.dead?
  685.  
  686.       end
  687.  
  688.       return false
  689.  
  690.     end
  691.  
  692.     return true
  693.  
  694.   end
  695.  
  696.   def enemy; @data[index]; end
  697.  
  698.   def refresh
  699.  
  700.     make_item_list
  701.  
  702.     create_contents
  703.  
  704.     draw_all_items
  705.  
  706.   end
  707.  
  708.   def make_item_list
  709.  
  710.     @data = $game_troop.alive_members
  711.  
  712.     @data.sort! { |a,b| a.screen_x <=> b.screen_x }
  713.  
  714.   end
  715.  
  716.   def draw_item(index); return; end
  717.  
  718.   def update
  719.  
  720.     super
  721.  
  722.     return unless active
  723.  
  724.     enemy.sprite_effect_type = :whiten
  725.  
  726.     return unless select_all?
  727.  
  728.     for enemy in $game_troop.alive_members
  729.  
  730.       enemy.sprite_effect_type = :whiten
  731.  
  732.     end
  733.  
  734.   end
  735.  
  736. end
  737.  
  738. class Window_BattleHelp < Window_Help
  739.  
  740.   attr_accessor :actor_window
  741.  
  742.   attr_accessor :enemy_window
  743.  
  744.   def update
  745.  
  746.     super
  747.  
  748.     if !self.visible and @text != ""
  749.  
  750.       @text = ""
  751.  
  752.       return refresh
  753.  
  754.     end
  755.  
  756.     update_battler_name
  757.  
  758.   end
  759.  
  760.   def update_battler_name
  761.  
  762.     return unless @actor_window.active || @enemy_window.active
  763.  
  764.     if @actor_window.active
  765.  
  766.       battler = $game_party.battle_members[@actor_window.index]
  767.  
  768.     elsif @enemy_window.active
  769.  
  770.       battler = @enemy_window.enemy
  771.  
  772.     end
  773.  
  774.     if special_display?
  775.  
  776.       refresh_special_case(battler)
  777.  
  778.     else
  779.  
  780.       refresh_battler_name(battler) if battler_name(battler) != @text
  781.  
  782.     end
  783.  
  784.   end
  785.  
  786.   def battler_name(battler)
  787.  
  788.     text = battler.name.clone
  789.  
  790.     return text
  791.  
  792.   end
  793.  
  794.   def refresh_battler_name(battler)
  795.  
  796.     contents.clear
  797.  
  798.     reset_font_settings
  799.  
  800.     change_color(normal_color)
  801.  
  802.     @text = battler_name(battler)
  803.  
  804.     icons = battler.state_icons + battler.buff_icons
  805.  
  806.     dy = icons.size <= 0 ? line_height / 2 : 0
  807.  
  808.     draw_text(0, dy, contents.width, line_height, @text, 1)
  809.  
  810.     dx = (contents.width - (icons.size * 24)) / 2
  811.  
  812.     draw_actor_icons(battler, dx, line_height, contents.width)
  813.  
  814.   end
  815.  
  816.   def special_display?
  817.  
  818.     return false if $game_temp.battle_aid.nil?
  819.  
  820.     return false if $game_temp.battle_aid.for_user?
  821.  
  822.     return !$game_temp.battle_aid.need_selection?
  823.  
  824.   end
  825.  
  826.   def refresh_special_case(battler)
  827.  
  828.     if $game_temp.battle_aid.for_opponent?
  829.  
  830.       if $game_temp.battle_aid.for_all?
  831.  
  832.         text = YEA::BATTLE::HELP_TEXT_ALL_FOES
  833.  
  834.       else
  835.  
  836.         case $game_temp.battle_aid.number_of_targets
  837.  
  838.         when 1
  839.  
  840.           text = YEA::BATTLE::HELP_TEXT_ONE_RANDOM_FOE
  841.  
  842.         else
  843.  
  844.           number = $game_temp.battle_aid.number_of_targets
  845.  
  846.           text = sprintf(YEA::BATTLE::HELP_TEXT_MANY_RANDOM_FOE, number)
  847.  
  848.         end
  849.  
  850.       end
  851.  
  852.     else
  853.  
  854.       if $game_temp.battle_aid.for_dead_friend?
  855.  
  856.         text = YEA::BATTLE::HELP_TEXT_ALL_DEAD_ALLIES
  857.  
  858.       elsif $game_temp.battle_aid.for_random?
  859.  
  860.         case $game_temp.battle_aid.number_of_targets
  861.  
  862.         when 1
  863.  
  864.           text = YEA::BATTLE::HELP_TEXT_ONE_RANDOM_ALLY
  865.  
  866.         else
  867.  
  868.           number = $game_temp.battle_aid.number_of_targets
  869.  
  870.           text = sprintf(YEA::BATTLE::HELP_TEXT_RANDOM_ALLIES, number)
  871.  
  872.         end
  873.  
  874.       else
  875.  
  876.         text = YEA::BATTLE::HELP_TEXT_ALL_ALLIES
  877.  
  878.       end
  879.  
  880.     end
  881.  
  882.     return if text == @text
  883.  
  884.     @text = text
  885.  
  886.     contents.clear
  887.  
  888.     reset_font_settings
  889.  
  890.     draw_text(0, 0, contents.width, line_height*2, @text, 1)
  891.  
  892.   end
  893.  
  894. end
  895.  
  896. class Window_SkillList < Window_Selectable
  897.  
  898.   def spacing
  899.  
  900.     return 8 if $game_party.in_battle
  901.  
  902.     return super
  903.  
  904.   end
  905.  
  906. end
  907.  
  908. class Window_ItemList < Window_Selectable
  909.  
  910.   def spacing
  911.  
  912.     return 8 if $game_party.in_battle
  913.  
  914.     return super
  915.  
  916.   end
  917.  
  918. end
  919.  
  920. class Scene_Battle < Scene_Base
  921.  
  922.   attr_accessor :enemy_window
  923.  
  924.   attr_accessor :info_viewport
  925.  
  926.   attr_accessor :spriteset
  927.  
  928.   attr_accessor :status_window
  929.  
  930.   attr_accessor :status_aid_window
  931.  
  932.   attr_accessor :subject
  933.  
  934.   alias scene_battle_create_all_windows_abe create_all_windows
  935.  
  936.   def create_all_windows
  937.  
  938.     scene_battle_create_all_windows_abe
  939.  
  940.     create_battle_status_aid_window
  941.  
  942.     set_help_window
  943.  
  944.   end
  945.  
  946.   alias scene_battle_create_info_viewport_abe create_info_viewport
  947.  
  948.   def create_info_viewport
  949.  
  950.     scene_battle_create_info_viewport_abe
  951.  
  952.     @status_window.refresh
  953.  
  954.   end
  955.  
  956.   def create_battle_status_aid_window
  957.  
  958.     @status_aid_window = Window_BattleStatusAid.new
  959.  
  960.     @status_aid_window.status_window = @status_window
  961.  
  962.     @status_aid_window.x = Graphics.width - @status_aid_window.width
  963.  
  964.     @status_aid_window.y = Graphics.height - @status_aid_window.height
  965.  
  966.   end
  967.  
  968.   def create_help_window
  969.  
  970.     @help_window = Window_BattleHelp.new
  971.  
  972.     @help_window.hide
  973.  
  974.   end
  975.  
  976.   def set_help_window
  977.  
  978.     @help_window.actor_window = @actor_window
  979.  
  980.     @help_window.enemy_window = @enemy_window
  981.  
  982.   end
  983.  
  984.   alias scene_battle_create_skill_window_abe create_skill_window
  985.  
  986.   def create_skill_window
  987.  
  988.     scene_battle_create_skill_window_abe
  989.  
  990.     @skill_window.height = @info_viewport.rect.height
  991.  
  992.     @skill_window.width = Graphics.width - @actor_command_window.width
  993.  
  994.     @skill_window.y = Graphics.height - @skill_window.height
  995.  
  996.   end
  997.  
  998.   alias scene_battle_create_item_window_abe create_item_window
  999.  
  1000.   def create_item_window
  1001.  
  1002.     scene_battle_create_item_window_abe
  1003.  
  1004.     @item_window.height = @skill_window.height
  1005.  
  1006.     @item_window.width = @skill_window.width
  1007.  
  1008.     @item_window.y = Graphics.height - @item_window.height
  1009.  
  1010.   end
  1011.  
  1012.   alias scene_battle_next_command_abe next_command
  1013.  
  1014.   def next_command
  1015.  
  1016.     @status_window.show
  1017.  
  1018.     redraw_current_status
  1019.  
  1020.     @actor_command_window.show
  1021.  
  1022.     @status_aid_window.hide
  1023.  
  1024.     scene_battle_next_command_abe
  1025.  
  1026.   end
  1027.  
  1028.   alias scene_battle_prior_command_abe prior_command
  1029.  
  1030.   def prior_command
  1031.  
  1032.     redraw_current_status
  1033.  
  1034.     scene_battle_prior_command_abe
  1035.  
  1036.   end
  1037.  
  1038.   def redraw_current_status
  1039.  
  1040.     return if @status_window.index < 0
  1041.  
  1042.     @status_window.draw_item(@status_window.index)
  1043.  
  1044.   end
  1045.  
  1046.   alias scene_battle_command_attack_abe command_attack
  1047.  
  1048.   def command_attack
  1049.  
  1050.     $game_temp.battle_aid = $data_skills[BattleManager.actor.attack_skill_id]
  1051.  
  1052.     scene_battle_command_attack_abe
  1053.  
  1054.   end
  1055.  
  1056.   alias scene_battle_command_skill_abe command_skill
  1057.  
  1058.   def command_skill
  1059.  
  1060.     scene_battle_command_skill_abe
  1061.  
  1062.     @status_window.hide
  1063.  
  1064.     @actor_command_window.hide
  1065.  
  1066.     @status_aid_window.show
  1067.  
  1068.   end
  1069.  
  1070.   alias scene_battle_command_item_abe command_item
  1071.  
  1072.   def command_item
  1073.  
  1074.     scene_battle_command_item_abe
  1075.  
  1076.     @status_window.hide
  1077.  
  1078.     @actor_command_window.hide
  1079.  
  1080.     @status_aid_window.show
  1081.  
  1082.   end
  1083.  
  1084.   def on_skill_ok
  1085.  
  1086.     [url=home.php?mod=space&uid=260100]@skill[/url] = @skill_window.item
  1087.  
  1088.     $game_temp.battle_aid = @skill
  1089.  
  1090.     BattleManager.actor.input.set_skill(@skill.id)
  1091.  
  1092.     BattleManager.actor.last_skill.object = @skill
  1093.  
  1094.     if @skill.for_opponent?
  1095.  
  1096.       select_enemy_selection
  1097.  
  1098.     elsif @skill.for_friend?
  1099.  
  1100.       select_actor_selection
  1101.  
  1102.     else
  1103.  
  1104.       @skill_window.hide
  1105.  
  1106.       next_command
  1107.  
  1108.       $game_temp.battle_aid = nil
  1109.  
  1110.     end
  1111.  
  1112.   end
  1113.  
  1114.   alias scene_battle_on_skill_cancel_abe on_skill_cancel
  1115.  
  1116.   def on_skill_cancel
  1117.  
  1118.     scene_battle_on_skill_cancel_abe
  1119.  
  1120.     @status_window.show
  1121.  
  1122.     @actor_command_window.show
  1123.  
  1124.     @status_aid_window.hide
  1125.  
  1126.   end
  1127.  
  1128.   def on_item_ok
  1129.  
  1130.     @item = @item_window.item
  1131.  
  1132.     $game_temp.battle_aid = @item
  1133.  
  1134.     BattleManager.actor.input.set_item(@item.id)
  1135.  
  1136.     if @item.for_opponent?
  1137.  
  1138.       select_enemy_selection
  1139.  
  1140.     elsif @item.for_friend?
  1141.  
  1142.       select_actor_selection
  1143.  
  1144.     else
  1145.  
  1146.       @item_window.hide
  1147.  
  1148.       next_command
  1149.  
  1150.       $game_temp.battle_aid = nil
  1151.  
  1152.     end
  1153.  
  1154.     $game_party.last_item.object = @item
  1155.  
  1156.   end
  1157.  
  1158.   alias scene_battle_on_item_cancel_abe on_item_cancel
  1159.  
  1160.   def on_item_cancel
  1161.  
  1162.     scene_battle_on_item_cancel_abe
  1163.  
  1164.     @status_window.show
  1165.  
  1166.     @actor_command_window.show
  1167.  
  1168.     @status_aid_window.hide
  1169.  
  1170.   end
  1171.  
  1172.   alias scene_battle_select_actor_selection_abe select_actor_selection
  1173.  
  1174.   def select_actor_selection
  1175.  
  1176.     @status_aid_window.refresh
  1177.  
  1178.     scene_battle_select_actor_selection_abe
  1179.  
  1180.     @status_window.hide
  1181.  
  1182.     @skill_window.hide
  1183.  
  1184.     @item_window.hide
  1185.  
  1186.     @help_window.show
  1187.  
  1188.   end
  1189.  
  1190.   alias scene_battle_on_actor_ok_abe on_actor_ok
  1191.  
  1192.   def on_actor_ok
  1193.  
  1194.     $game_temp.battle_aid = nil
  1195.  
  1196.     scene_battle_on_actor_ok_abe
  1197.  
  1198.     @status_window.show
  1199.  
  1200.     if $imported["YEA-BattleCommandList"] && !@confirm_command_window.nil?
  1201.  
  1202.       @actor_command_window.visible = !@confirm_command_window.visible
  1203.  
  1204.     else
  1205.  
  1206.       @actor_command_window.show
  1207.  
  1208.     end
  1209.  
  1210.     @status_aid_window.hide
  1211.  
  1212.   end
  1213.  
  1214.   alias scene_battle_on_actor_cancel_abe on_actor_cancel
  1215.  
  1216.   def on_actor_cancel
  1217.  
  1218.     BattleManager.actor.input.clear
  1219.  
  1220.     @status_aid_window.refresh
  1221.  
  1222.     $game_temp.battle_aid = nil
  1223.  
  1224.     scene_battle_on_actor_cancel_abe
  1225.  
  1226.     case @actor_command_window.current_symbol
  1227.  
  1228.     when :skill
  1229.  
  1230.       @skill_window.show
  1231.  
  1232.     when :item
  1233.  
  1234.       @item_window.show
  1235.  
  1236.     end
  1237.  
  1238.   end
  1239.  
  1240.   alias scene_battle_select_enemy_selection_abe select_enemy_selection
  1241.  
  1242.   def select_enemy_selection
  1243.  
  1244.     @status_aid_window.refresh
  1245.  
  1246.     scene_battle_select_enemy_selection_abe
  1247.  
  1248.     @help_window.show
  1249.  
  1250.   end
  1251.  
  1252.   alias scene_battle_on_enemy_ok_abe on_enemy_ok
  1253.  
  1254.   def on_enemy_ok
  1255.  
  1256.     $game_temp.battle_aid = nil
  1257.  
  1258.     scene_battle_on_enemy_ok_abe
  1259.  
  1260.   end
  1261.  
  1262.   alias scene_battle_on_enemy_cancel_abe on_enemy_cancel
  1263.  
  1264.   def on_enemy_cancel
  1265.  
  1266.     BattleManager.actor.input.clear
  1267.  
  1268.     @status_aid_window.refresh
  1269.  
  1270.     $game_temp.battle_aid = nil
  1271.  
  1272.     scene_battle_on_enemy_cancel_abe
  1273.  
  1274.     if @skill_window.visible || @item_window.visible
  1275.  
  1276.       @help_window.show
  1277.  
  1278.     else
  1279.  
  1280.       @help_window.hide
  1281.  
  1282.     end
  1283.  
  1284.   end
  1285.  
  1286.   def end_battle_conditions?
  1287.  
  1288.     return true if $game_party.members.empty?
  1289.  
  1290.     return true if $game_party.all_dead?
  1291.  
  1292.     return true if $game_troop.all_dead?
  1293.  
  1294.     return true if BattleManager.aborting?
  1295.  
  1296.     return false
  1297.  
  1298.   end
  1299.  
  1300.   def refresh_status
  1301.  
  1302.     #如果你是程序员,请顺手帮忙优化下这里,谢谢。
  1303.  
  1304.     @status_window.refresh
  1305.  
  1306.     for i in $game_party.battle_members
  1307.  
  1308.       @status_window.draw_item($game_party.battle_members.index(i))
  1309.  
  1310.     end
  1311.  
  1312.   end
  1313.  
  1314. end

以上就是战斗脸图显示脚本
而且,这个脚本可以做出主楼图片的效果
类似吧……我也不知道,反正出现的效果我可知道  

点评

源代码复制很麻烦,在这http://rm.66rpg.com/thread-223765-1-1.html  发表于 2014-8-6 14:14

评分

参与人数 1星屑 +150 收起 理由
taroxd + 150 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-25 21:25

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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