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

Project1

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

[已经解决] 关于CP,找了个CP的脚本,但是不显示敌人的CP条

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
83 小时
注册时间
2012-4-30
帖子
47
跳转到指定楼层
1
发表于 2015-8-25 20:45:59 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
  1. #==============================================================================
  2. # +++ MOG - AT System  (v0.4 Beta) +++
  3. #==============================================================================
  4. # By Moghunter
  5. # http://www.atelier-rgss.com/
  6. #==============================================================================
  7. # Sistema de batalha de turnos em tempo real.
  8. #==============================================================================

  9. #==============================================================================
  10. # ● Histórico (Version History)
  11. #==============================================================================
  12. # v 0.4 - Corrigido o erro de crash randômico. (relativo a dispose de imagem.)
  13. #       - Corrigido o erro de crash randômico. (relativo ao turno.)
  14. #       - Corrigido o bug de travar a tela na execução da mensagem de batalha.
  15. # v 0.3 - Corrigido o Bug da janela de comando ao apertar a tecla Cancel.
  16. #       - Corrigido o Bug de não apresentar a janela de status no começo.
  17. #       - Melhor codificação para aumentar a compatibilidade.
  18. #       - Opção de definir a posição do medidor de AT pelo X&Y do battler.
  19. # v 0.2 - Corrigido o bug da seleção do alvo para ações de cast time.
  20. # v 0.1 - Primeiro lançamento.
  21. #==============================================================================

  22. #==============================================================================
  23. # ● Imagens Necessárias
  24. #==============================================================================
  25. # Serão necessários as imagens:
  26. #
  27. # Battle_AT_Layout.png
  28. # Battle_AT_Meter.png
  29. #
  30. # Na pasta GRAPHICS/SYSTEM/
  31. #
  32. #==============================================================================
  33. # ● AT SYSTEM
  34. #==============================================================================
  35. # A velocidade de AT é baseaddo na agilidade do Battler.
  36. # Em caso de batalhas preventivas (Preemptive) os aliados começarão com AT em
  37. # 80% e os inimigos começarão com AT em 0 (Zero)
  38. # Em batalhas surpresas (Surprise) é o inverso das batalhas preventivas.
  39. # Em batalhas normais todos os battlers começarão com AT em 40%.
  40. #==============================================================================
  41. # ● CAST TIME
  42. #==============================================================================
  43. # Para definir uma habilidade ou item com a função de Cast Time basta definir
  44. # o valor da velocidade (Speed) diferente de 0 (Zero).
  45. #
  46. # NOTA - Não é possível ativar 2 ou mais habilidades com a função Cast Time no
  47. # mesmo turno. (Caso você esteja usando características de Multi Action em
  48. # seu projeto.)
  49. #==============================================================================
  50. module MOG_AT_SYSTEM
  51.   # Tipo de posicionamento da Hud.
  52.   # 0 - Posição fixa.
  53.   # 1 - Posição baseado no valor X e Y do battler.
  54.   HUD_POSITION_TYPE = 0
  55.   #Posição geral (Inicial) da Hud.
  56.   HUD_POSITION = [25,400]
  57.   #Posição do medidor de AT
  58.   AT_METER_POSITION = [29,1]
  59.   #Definição da posição do espaço da HUD entre os membros do grupo.
  60.   #
  61.   #MEMBERS_SPACE = [Horizontal ,Vertical]
  62.   #
  63.   MEMBERS_SPACE = [136,0]
  64.   #Velocidade de animação do medidor de at, defina 0 se não quiser a animação.
  65.   AT_METER_FLOW_SPEED = 3
  66.   #Prioridade da Hud.
  67.   BATTLE_HUD_Z = 0
  68.   #Som quando o sistema AT estiver no maximo
  69.   SE_ACTIVE = "Decision2"
  70.   #Definição do valor de AT para ativar a ação.(Gauge Meter).
  71.   AT_GAUGE_METER = 5000
  72.   # Definição do tipo de duração (Contagem/formula) de um turno.
  73.   # Essa definição influência na ativação dos eventos de batalha.
  74.   # (BATTLE EVENTS)
  75.   #
  76.   # 0 - Duração de um turno é um valor fixo.
  77.   # 1 - Duração de um turno é multiplicado pela quantidade de batllers.
  78.   # 2 - Duração de um turno é baseado na média de agilidade dos battlers.
  79.   #
  80.   TURN_DURATION_TYPE = 1
  81.   # Definição de valor usado para calcular a duração de um turno.
  82.   TURN_DURATION = 60
  83.   # Definição da animação quando o battler usa habilidades de carregamento.
  84.   CAST_ANIMATION = 49
  85.   # Ativar a janela de LOG, deixe desativado se desejar uma batalha mais
  86.   # dinâmica.
  87.   WAIT_LOG_WINDOW = false
  88.   # Ativar a mensagem inicial com os nomes dos inimigos.
  89.   MESSAGE_ENEMY_APPEAR = false
  90.   # Definição da posição da janela de mensagem.
  91.   # 0 - Superior
  92.   # 1 - Centro
  93.   # 2 - Inferior  
  94.   MESSAGE_POSITION = 0
  95. end

  96. #==============================================================================
  97. # ■ Game_System
  98. #==============================================================================
  99. class Game_System
  100.   
  101.   attr_accessor :at_max
  102.   
  103.   #--------------------------------------------------------------------------
  104.   # ● Initialize
  105.   #--------------------------------------------------------------------------         
  106.   alias mog_at_system_initialize initialize
  107.   def initialize
  108.       @at_max = [[MOG_AT_SYSTEM::AT_GAUGE_METER, 999999].min, 100].max
  109.       mog_at_system_initialize
  110.   end
  111.   
  112. end

  113. #==============================================================================
  114. # ■ BattleManager
  115. #==============================================================================
  116. module BattleManager
  117.   
  118.   #--------------------------------------------------------------------------
  119.   # ● Battle Start
  120.   #--------------------------------------------------------------------------  
  121.   def self.battle_start
  122.       $game_system.battle_count += 1
  123.       $game_party.on_battle_start
  124.       $game_troop.on_battle_start
  125.       if MOG_AT_SYSTEM::MESSAGE_ENEMY_APPEAR
  126.          $game_troop.enemy_names.each do |name|
  127.          $game_message.add(sprintf(Vocab::Emerge, name))
  128.          end
  129.       end
  130.       if @preemptive
  131.          $game_message.add(sprintf(Vocab::Preemptive, $game_party.name))
  132.       elsif @surprise
  133.          $game_message.add(sprintf(Vocab::Surprise, $game_party.name))
  134.       end
  135.       wait_for_message
  136.   end
  137.   
  138.   #--------------------------------------------------------------------------
  139.   # ● Input Start
  140.   #--------------------------------------------------------------------------
  141.   def self.input_start_at(battler)
  142.       if @phase != :input
  143.          @phase = :input
  144.          battler.make_actions
  145.          clear_actor
  146.       end
  147.       return !@surprise && battler.inputable?
  148.   end

  149.   #--------------------------------------------------------------------------
  150.   # ● Turn Start
  151.   #--------------------------------------------------------------------------
  152.   def self.turn_start
  153.       @phase = :turn
  154.       clear_actor
  155.       make_action_orders
  156.   end  
  157.   
  158.   #--------------------------------------------------------------------------
  159.   # ● Preemtive Attack
  160.   #--------------------------------------------------------------------------  
  161.   def self.preemptive_attack
  162.       @preemptive
  163.   end  
  164.   
  165.   #--------------------------------------------------------------------------
  166.   # ● Suprise Attack
  167.   #--------------------------------------------------------------------------   
  168.   def self.surprise_attack
  169.       @surprise
  170.   end   
  171.   
  172. end  

  173. #==============================================================================
  174. # ■ Game Action
  175. #==============================================================================
  176. class Game_Action  

  177.   #--------------------------------------------------------------------------
  178.   # ● Prepare
  179.   #--------------------------------------------------------------------------            
  180.   alias mog_at_system_prepare prepare
  181.   def prepare
  182.       mog_at_system_prepare
  183.       set_cast_action
  184.   end
  185.   
  186.   #--------------------------------------------------------------------------
  187.   # ● Set Cast Action
  188.   #--------------------------------------------------------------------------               
  189.   def set_cast_action
  190.       return if forcing
  191.       if @item.object != nil and @item.object.speed != 0 and @subject.at_cast.empty?
  192.          @subject.at_cast = [@item.object,@item.object.speed.abs,@target_index]
  193.          @item.object = nil
  194.          @subject.animation_id = MOG_AT_SYSTEM::CAST_ANIMATION
  195.          @subject.at = 0
  196.          BattleManager.turn_end if @subject.auto_battle?
  197.       elsif [email protected]_cast.empty?
  198.          if @subject.at_cast[1] == 0
  199.             @item.object = @subject.at_cast[0]
  200.             @target_index = @subject.at_cast[2]            
  201.             @subject.at_cast.clear
  202.          else   
  203.             @item.object = nil
  204.          end
  205.       end  
  206.   end  
  207.   
  208. end


  209. #==============================================================================
  210. # ■ Game Battler Base
  211. #==============================================================================
  212. class Game_BattlerBase  

  213.   #--------------------------------------------------------------------------
  214.   # ● Inputable?
  215.   #--------------------------------------------------------------------------            
  216.   def inputable?
  217.       normal? && !auto_battle? && self.at == $game_system.at_max
  218.   end
  219.   
  220. end

  221. #==============================================================================
  222. # ■ Game_Battler
  223. #==============================================================================
  224. class Game_Battler < Game_BattlerBase
  225.   
  226.    attr_accessor :at
  227.    attr_accessor :at_cast
  228.    
  229.   #--------------------------------------------------------------------------
  230.   # ● Initialize
  231.   #--------------------------------------------------------------------------      
  232.    alias mog_at_system_initialize initialize
  233.    def initialize
  234.        mog_at_system_initialize
  235.        @at = 0
  236.        @at_cast = []
  237.        @at_cast_selectable = true
  238.    end
  239.      
  240.   #--------------------------------------------------------------------------
  241.   # ● At
  242.   #--------------------------------------------------------------------------         
  243.    def at
  244.        n = at_active? ? $game_system.at_max : 0
  245.        return [[@at, n].min, 0].max
  246.    end  
  247.    
  248.   #--------------------------------------------------------------------------
  249.   # ● At Active
  250.   #--------------------------------------------------------------------------            
  251.    def at_active?
  252.        return false if restriction >= 4
  253.        return false if self.hp == 0
  254.        return true
  255.    end  
  256.    
  257.   #--------------------------------------------------------------------------
  258.   # ● Added New State
  259.   #--------------------------------------------------------------------------  
  260.   alias mog_at_system_add_new_state add_new_state
  261.   def add_new_state(state_id)
  262.       mog_at_system_add_new_state(state_id)
  263.       if restriction == 0 or restriction == 4
  264.          self.at_cast.clear
  265.          self.at = 0
  266.       end   
  267.   end   
  268.   
  269.   #--------------------------------------------------------------------------
  270.   # ● Make Damage Value
  271.   #--------------------------------------------------------------------------
  272.   alias mog_animation_plus_make_damage_value make_damage_value
  273.   def make_damage_value(user, item)
  274.       mog_animation_plus_make_damage_value(user, item)
  275.       self.animation_id = $1.to_i if item.note =~ /<Hit Animation = (\d+)>/i
  276.   end
  277.    
  278. end

  279. #==============================================================================
  280. # ■ Game Enemy
  281. #==============================================================================
  282. class Game_Enemy < Game_Battler
  283.   
  284.   #--------------------------------------------------------------------------
  285.   # ● Tranform
  286.   #--------------------------------------------------------------------------  
  287.    alias mog_at_system_transform transform
  288.    def transform(enemy_id)
  289.        mog_at_system_transform(enemy_id)
  290.        self.at = 0
  291.        self.at_cast.clear
  292.    end
  293. end   

  294. if !MOG_AT_SYSTEM::WAIT_LOG_WINDOW
  295. #==============================================================================
  296. # ■ BattleManager
  297. #==============================================================================
  298. class Window_BattleLog < Window_Selectable

  299.   #--------------------------------------------------------------------------
  300.   # ● Refresh
  301.   #--------------------------------------------------------------------------   
  302.   def refresh
  303.   end  

  304.   #--------------------------------------------------------------------------
  305.   # ● Message Speed
  306.   #--------------------------------------------------------------------------   
  307.   def message_speed
  308.       return 5
  309.   end

  310. end
  311. end

  312. #==============================================================================
  313. # ■ Scene Battle
  314. #==============================================================================
  315. class Scene_Battle < Scene_Base
  316.   include MOG_AT_SYSTEM
  317.   
  318.   #--------------------------------------------------------------------------
  319.   # ● AT Wait
  320.   #--------------------------------------------------------------------------         
  321.   alias mog_at_system_start start
  322.   def start
  323.       reset_at_parameter  
  324.       mog_at_system_start
  325.   end  
  326.    
  327.   #--------------------------------------------------------------------------
  328.   # ● Battle Start
  329.   #--------------------------------------------------------------------------
  330.   def battle_start
  331.       BattleManager.battle_start
  332.       process_event
  333.       set_turn_duration
  334.   end
  335.    
  336.   #--------------------------------------------------------------------------
  337.   # ● Reset AT Parameter
  338.   #--------------------------------------------------------------------------  
  339.   def reset_at_parameter
  340.       return if @at_phase != nil
  341.       @at_phase = 0
  342.       n_at = $game_system.at_max * 40 / 100
  343.       p_at = $game_system.at_max * 90 / 100
  344.       s_at = 0
  345.       all_battle_members.each do |battler|
  346.           if BattleManager.preemptive_attack
  347.              battler.at = p_at if battler.is_a?(Game_Actor)
  348.              battler.at = s_at if battler.is_a?(Game_Enemy)
  349.           elsif BattleManager.surprise_attack   
  350.              battler.at = p_at if battler.is_a?(Game_Enemy)
  351.              battler.at = s_at if battler.is_a?(Game_Actor)
  352.           else   
  353.              battler.at = n_at
  354.           end
  355.           if battler.at >= $game_system.at_max
  356.              battler.at = $game_system.at_max - 1
  357.           end
  358.           battler.at = 0 if battler.at < 0  
  359.           battler.at_cast.clear
  360.         end
  361.   end

  362.   #--------------------------------------------------------------------------
  363.   # ● Set Turn Duration
  364.   #--------------------------------------------------------------------------
  365.   def set_turn_duration
  366.       max_battlers = all_battle_members.size > 0 ? all_battle_members.size : 1
  367.       case TURN_DURATION_TYPE
  368.         when 1
  369.            n  = TURN_DURATION * max_battlers
  370.         when 2
  371.            turn_sp = 0
  372.            all_battle_members.each do |battler|
  373.                turn_sp += battler.agi
  374.            end  
  375.            n = TURN_DURATION + (turn_sp / max_battlers)
  376.         else
  377.            n = TURN_DURATION
  378.       end
  379.       turn_time_max = [[n, 9999].min, 120].max
  380.       @turn_duration = [0, turn_time_max]
  381.       if @status_window != nil
  382.          @status_window.open
  383.       end   
  384.   end   
  385.   
  386.   #--------------------------------------------------------------------------
  387.   # ● Turn End
  388.   #--------------------------------------------------------------------------
  389.   def turn_end
  390.       @at_phase = 0
  391.       all_battle_members.each do |battler|
  392.          if battler.at >= $game_system.at_max
  393.             battler.at = 0
  394.             battler.on_turn_end
  395.             refresh_status
  396.             @log_window.display_auto_affected_status(battler)
  397.             @log_window.wait_and_clear
  398.          end
  399.       end
  400.       BattleManager.turn_end
  401.   end
  402.    
  403.   #--------------------------------------------------------------------------
  404.   # ● Update Turn Duration
  405.   #--------------------------------------------------------------------------            
  406.   def update_turn_duration
  407.       return if @turn_duration == nil or @turn_duration[0] == nil
  408.       @turn_duration[0] += 1
  409.       if @turn_duration[0] >= @turn_duration[1]
  410.          @turn_duration[0] = 0
  411.          $game_troop.increase_turn
  412.          process_event
  413.       end  
  414.   end
  415.   
  416.   #--------------------------------------------------------------------------
  417.   # ● Update AT System
  418.   #--------------------------------------------------------------------------           
  419.   def update_at_system
  420.       reset_at_parameter if @at_phase == nil
  421.       set_turn_duration if @turn_duration == nil
  422.       return if !can_update_at?
  423.       update_turn_duration
  424.       all_battle_members.each do |battler|
  425.           if !battler.at_cast.empty?
  426.              battler.at_cast[1] -= 1
  427.              if battler.at_cast[1] <= 0
  428.                 execute_at_cast(battler)
  429.                 break
  430.              end
  431.           else
  432.              battler.at += battler.agi
  433.           end   
  434.           if battler.at >= $game_system.at_max
  435.              update_at_actor(battler)
  436.              update_at_enemy(battler)
  437.              battler.current_action.prepare if battler.current_action
  438.              if battler.at_cast.empty?
  439.                 @at_phase = 1
  440.                 turn_start if battler.is_a?(Game_Enemy)
  441.              end            
  442.              break
  443.           end   
  444.       end  
  445.   end
  446.    
  447.   #--------------------------------------------------------------------------
  448.   # ● Execute AT CAST
  449.   #--------------------------------------------------------------------------            
  450.   def execute_at_cast(battler)
  451.       @subject = battler
  452.       battler.make_actions  
  453.       turn_start
  454.   end  
  455.   
  456.   #--------------------------------------------------------------------------
  457.   # ● Update AT Actor
  458.   #--------------------------------------------------------------------------            
  459.   def update_at_actor(battler)   
  460.       return if !battler.is_a?(Game_Actor)
  461.       Audio.se_play("Audio/SE/" + SE_ACTIVE,100,100)  
  462.       start_party_command_selection_at(battler)
  463.   end
  464.   
  465.   #--------------------------------------------------------------------------
  466.   # ● Update AT Enemy
  467.   #--------------------------------------------------------------------------            
  468.   def update_at_enemy(battler)   
  469.       return if !battler.is_a?(Game_Enemy)
  470.       battler.make_actions
  471.   end   
  472.   
  473.   #--------------------------------------------------------------------------
  474.   # ● Can Update AT
  475.   #--------------------------------------------------------------------------            
  476.   def can_update_at?
  477.       return false if @at_phase != 0
  478.       return false if $game_message.visible
  479.       return false if BattleManager.in_turn?
  480.       return true
  481.   end   
  482.   
  483.   #--------------------------------------------------------------------------
  484.   # ● Star Party Command Selection at
  485.   #--------------------------------------------------------------------------
  486.   def start_party_command_selection_at(battler)
  487.       unless scene_changing?
  488.          refresh_status
  489.          @status_window.unselect
  490.          @status_window.open
  491.          if BattleManager.input_start_at(battler)
  492.             @actor_command_window.close
  493.             next_command
  494.          else
  495.            turn_start
  496.          end
  497.       end
  498.   end  
  499.   
  500.   #--------------------------------------------------------------------------
  501.   # ● Update Basic
  502.   #--------------------------------------------------------------------------        
  503.   alias mog_at_system_update_basic update_basic
  504.   def update_basic
  505.       mog_at_system_update_basic
  506.       update_at_system
  507.       update_party_command
  508.       $game_message.position = MESSAGE_POSITION
  509.   end
  510.   
  511.   #--------------------------------------------------------------------------
  512.   # ● Update Party Command
  513.   #--------------------------------------------------------------------------      
  514.   def update_party_command
  515.       return if !@party_command_window.active
  516.       return if !@actor_command_window.visible
  517.       return if $game_message.visible
  518.       if Input.trigger?(:B)
  519.          next_command
  520.          Sound.play_cancel
  521.          @party_command_window.active = false
  522.       end  
  523.   end
  524.      
  525. end

  526. #==============================================================================
  527. # ■ AT Meter
  528. #==============================================================================
  529. class AT_Meter
  530.   
  531.   include MOG_AT_SYSTEM
  532.   
  533.   #--------------------------------------------------------------------------
  534.   # ● Initialize
  535.   #--------------------------------------------------------------------------   
  536.   def initialize(actor)
  537.       dispose
  538.       @actor = actor
  539.       if HUD_POSITION_TYPE == 1 and @actor.use_sprite?
  540.          @x = HUD_POSITION[0] +  @actor.screen_x rescue 0
  541.          @y = HUD_POSITION[1] +  @actor.screnn_y rescue 0
  542.       else   
  543.          @x = HUD_POSITION[0] + (MEMBERS_SPACE[0] * @actor.index)
  544.          @y = HUD_POSITION[1] + (MEMBERS_SPACE[1] * @actor.index)        
  545.       end
  546.       pre_cache
  547.       create_layout
  548.       create_at_meter
  549.   end
  550.   
  551.   #--------------------------------------------------------------------------
  552.   # ● Pre Cache
  553.   #--------------------------------------------------------------------------      
  554.   def pre_cache
  555.       @meter = Cache.system("Battle_AT_Meter")   
  556.       @meter_cw = @meter.width / 3
  557.       @meter_ch = @meter.height / 3
  558.   end
  559.   
  560.   #--------------------------------------------------------------------------
  561.   # ● Create Layout
  562.   #--------------------------------------------------------------------------      
  563.   def create_layout
  564.       @layout = Sprite.new
  565.       @layout.bitmap = Cache.system("Battle_AT_Layout")
  566.       @layout.z = BATTLE_HUD_Z
  567.       @layout.x = @x
  568.       @layout.y = @y
  569.   end
  570.   
  571.   #--------------------------------------------------------------------------
  572.   # ● Create AT Meter
  573.   #--------------------------------------------------------------------------      
  574.   def create_at_meter
  575.       @at_meter = Sprite.new
  576.       @at_meter.bitmap = Bitmap.new(@meter_cw,@meter_ch)
  577.       @at_meter.z =  BATTLE_HUD_Z + 50
  578.       @at_meter.x = @x + AT_METER_POSITION[0]
  579.       @at_meter.y = @y + AT_METER_POSITION[1]
  580.       @at_flow = rand(@meter_cw * 2)
  581.       at_flow_update
  582.   end  
  583.   
  584.   #--------------------------------------------------------------------------
  585.   # ● Dispose
  586.   #--------------------------------------------------------------------------   
  587.   def dispose
  588.       return if @layout == nil
  589.       @layout.bitmap.dispose
  590.       @layout.dispose
  591.       @layout = nil
  592.       @at_meter.bitmap.dispose
  593.       @at_meter.dispose
  594.   end  
  595.   
  596.   #--------------------------------------------------------------------------
  597.   # ● Update
  598.   #--------------------------------------------------------------------------  
  599.   def update
  600.       return if @layout == nil
  601.       at_position
  602.       at_flow_update
  603.   end
  604.   
  605.   #--------------------------------------------------------------------------
  606.   # ● Update
  607.   #--------------------------------------------------------------------------   
  608.   def at_position
  609.       return unless HUD_POSITION_TYPE == 1 and @actor.use_sprite?
  610.       @x = HUD_POSITION[0] +  @actor.screen_x rescue 0
  611.       @y = HUD_POSITION[1] +  @actor.screnn_y rescue 0
  612.       @layout.x = @x
  613.       @layout.y = @y
  614.       @at_meter.x = @x + AT_METER_POSITION[0]
  615.       @at_meter.y = @y + AT_METER_POSITION[1]
  616.   end
  617.    
  618.   #--------------------------------------------------------------------------
  619.   # ● AT Flow Update
  620.   #--------------------------------------------------------------------------
  621.   def at_flow_update
  622.       @at_meter.bitmap.clear
  623.       if [email protected]_cast.empty?
  624.          max_cast = @actor.at_cast[0].speed.abs != 0 ? @actor.at_cast[0].speed.abs : 1
  625.          at_width = @meter_cw * @actor.at_cast[1] / max_cast
  626.          ch = @meter_ch * 2
  627.       else
  628.          at_width = @meter_cw * @actor.at / $game_system.at_max
  629.          ch = @actor.at < $game_system.at_max ? 0 : @meter_ch
  630.       end  
  631.       src_rect = Rect.new(@at_flow, ch,at_width, @meter_ch)
  632.       @at_meter.bitmap.blt(0,0, @meter, src_rect)
  633.       @at_flow += AT_METER_FLOW_SPEED
  634.       @at_flow = 0 if @at_flow >=  @meter_cw * 2      
  635.   end   
  636.   
  637. end  

  638. #==============================================================================
  639. # ■ Spriteset Battle
  640. #==============================================================================
  641. class Spriteset_Battle
  642.   
  643.   #--------------------------------------------------------------------------
  644.   # ● Initialize
  645.   #--------------------------------------------------------------------------           
  646.   alias mog_at_system_initialize initialize
  647.   def initialize
  648.       mog_at_system_initialize
  649.       create_at_meter
  650.   end  
  651.   
  652.   #--------------------------------------------------------------------------
  653.   # ● Create AT Meter
  654.   #--------------------------------------------------------------------------            
  655.   def create_at_meter
  656.       dispose_at_meter
  657.       @at_meter = []
  658.       for i in $game_party.members
  659.           @at_meter.push(AT_Meter.new(i))
  660.       end      
  661.   end  
  662.   
  663.   #--------------------------------------------------------------------------
  664.   # ● Dispose
  665.   #--------------------------------------------------------------------------      
  666.   alias mog_at_system_dispose dispose
  667.   def dispose
  668.       mog_at_system_dispose
  669.       dispose_at_meter
  670.   end
  671.    
  672.   #--------------------------------------------------------------------------
  673.   # ● Dispose AT Meter
  674.   #--------------------------------------------------------------------------        
  675.   def dispose_at_meter
  676.       return if @at_meter == nil
  677.       @at_meter.each {|sprite| sprite.dispose }
  678.       @at_meter.clear
  679.       @at_meter = nil
  680.   end  
  681.   
  682.   #--------------------------------------------------------------------------
  683.   # ● Update
  684.   #--------------------------------------------------------------------------        
  685.   alias mog_at_system_update update
  686.   def update
  687.       mog_at_system_update
  688.       update_at_meter
  689.   end  
  690.   
  691.   #--------------------------------------------------------------------------
  692.   # ● Update AT Meter
  693.   #--------------------------------------------------------------------------         
  694.   def update_at_meter
  695.       return if @at_meter == nil
  696.       @at_meter.each {|sprite| sprite.update }
  697.   end  
  698.   
  699. end

  700. $mog_rgss3_at_system = true
复制代码
脚本在这里,怎么给敌人加条条啊,求大神指点,只知道ruby的基础,自己完全无法解决

Lv1.梦旅人

梦石
0
星屑
50
在线时间
83 小时
注册时间
2012-4-30
帖子
47
2
 楼主| 发表于 2015-8-25 20:58:18 | 只看该作者
额,还有貌似是这个脚本去掉了战斗时的文字信息,就是这个,怎么改回来啊,求大神指点迷津

QQ截图20150825205512.png (48.67 KB, 下载次数: 23)

QQ截图20150825205512.png
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
381
在线时间
1398 小时
注册时间
2010-9-23
帖子
557
3
发表于 2015-8-25 20:59:11 | 只看该作者
本帖最后由 黑崎一护 于 2015-8-25 21:09 编辑

应该是缺素材吧,楼主下载脚本的时候没有连素材一起下载么? = =

图片1: Battle_AT_Layout.png
图片2: Battle_AT_Meter.png

放置图片的文件夹位置:GRAPHICS/SYSTEM/


楼主要恢复战斗信息的话,找到脚本大概89行,改为:
RUBY 代码复制
  1. WAIT_LOG_WINDOW = true


把false改为true
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
83 小时
注册时间
2012-4-30
帖子
47
4
 楼主| 发表于 2015-8-25 21:14:22 | 只看该作者
黑崎一护 发表于 2015-8-25 20:59
应该是缺素材吧,楼主下载脚本的时候没有连素材一起下载么? = =

图片1: Battle_AT_Layout.png

嗯,非常感谢,战斗信息的问题解决了,~~不过我下了素材,人物有CP条,但敌人没有CP条(估计作者没考虑~)
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1656
在线时间
755 小时
注册时间
2013-9-23
帖子
211

开拓者

5
发表于 2015-8-26 00:58:42 | 只看该作者
MOG的敌人AT条在另外的脚本里
MOG_ATB_Meter
说来楼主的脚本版本是肿么回事= =?  很经典的样子。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
83 小时
注册时间
2012-4-30
帖子
47
6
 楼主| 发表于 2015-8-26 18:53:33 | 只看该作者
午睡的风铃 发表于 2015-8-26 00:58
MOG的敌人AT条在另外的脚本里
MOG_ATB_Meter
说来楼主的脚本版本是肿么回事= =?  很经典的样子。 ...

可以告诉那个脚本在哪么,QAQ找不到啊,这个脚本是我下了个范例ACE_Spriteset_Battle_EX,在这个范例提取的~~~

点评

Σ( ゚д゚)原来是这样。前辈学过吗?  发表于 2015-8-27 12:22
是葡萄牙文,  发表于 2015-8-26 22:11
_(:3」∠)_不知道什么语言啊……夹杂了好多看不懂的东西……  发表于 2015-8-26 22:01
http://www.atelier-rgss.com/RGSS/RGSS_VX_ACE.html 最下边有下载  发表于 2015-8-26 21:21
_(:3」∠)_没用过  发表于 2015-8-26 21:17
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
83 小时
注册时间
2012-4-30
帖子
47
7
 楼主| 发表于 2015-8-26 21:44:21 | 只看该作者
非常感谢大家
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-29 06:15

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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