collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: (Tech) ATB von Scriptsection verändern?  (Gelesen 815 mal)

Krüger

  • Gast
(Tech) ATB von Scriptsection verändern?
« am: Februar 03, 2008, 22:30:40 »
Hiho,
hab heut das Forum hier gesehen...WOW...
Finde es sehr fein^^
--------------------------------
Soo,jetz ma zu meinem Problem.

Ich habe mir das ATB von hier eingebaut,
an sich ist es wirklich toll,eins stört mich aber.
Und zwar wenn jemand angreift.
Dann verschwindet immer das Fenster mit den Helden,und das möchte ich nicht.
Deswegen frage ich euch ob mir vllt jemand dies so verändern könnte,dass
das Fenster nicht immer verschwinde.

-Wie,du weißt nicht wovon ich rede?
Von dem Script natürlich xD
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']#======================================================================
========
#  hellMinor's Active-Time-Battles
#
#  Version : 0.1 - 01.02.08
#  Created by : hellMinor
#  Description : This script changes the standard Battle-System to an
#                Active-Time-Battle-System based on the agility of the
#                character
#  Notes :       This script uses my CustomBattleScreen with some changes
#
#==============================================================================
#==============================================================================
class Scene_Battle < Scene_Base
#==============================================================================  
   def start
    super
    $game_temp.in_battle = true
    @spriteset = Spriteset_Battle.new
    @message_window = Window_BattleMessage.new
    @action_battlers = []
    $playerwaitrate = [0,0,0,0]
    $additionrate = [0,0,0,0]
    $bar = [0,0,0,0]
    $enemywaitrate = [0,0,0,0,0,0,0,0]
    $enemyattackrate = [0,0,0,0,0,0,0,0]
    create_info_viewport
  end
#------------------------------------------------------------------------------  
  def next_actor
    for enemy in $game_troop.members
      enemy.action.clear
    end

    wert = 300
    index = 0
      if @actor_index == $game_party.members.size-1
        start_main
        return
      end
     
      for i in 0..$game_party.members.size-1
        if $playerwaitrate == 0
          $playerwaitrate = 60*(5.0*(1.0-($game_party.members.agi/500.0)))
          $additionrate = 120.0/$playerwaitrate
        end
      end
      for i in 0..$game_troop.members.size-1
        if $enemywaitrate == 0
          $enemywaitrate = 60*(5.0*(1.0-($game_troop.members.agi/500.0)))
          $enemyattackrate = 120.0/$enemywaitrate
        end
      end
     
      temp = $playerwaitrate
      temp += $enemywaitrate
     
      for i in 0..temp.length-1
        if temp > wert
          wert = temp
        end
      end

      for i in 0..temp.length-1
        if temp < wert && temp > 0
          wert = temp
          if i < $game_party.members.size
            @active_battler = $game_party.members
            index = i
          else
            @active_battler = $game_troop.members[i-4]
            index = i
          end
        end
      end
     
      for i in 0..wert
        wait(1)
        for i in 0..$game_party.members.size-1
          $bar += $additionrate
        end
        @status_window.refresh
      end
      if @active_battler.actor?
        if @active_battler.auto_battle
          @active_battler.make_action
          next
        end
      end
   
    for i in 0..$game_party.members.size-1
      if i == index
        $playerwaitrate -= wert
      else
        $playerwaitrate -= wert-0.001
      end
    end
    for i in 0..$game_troop.members.size-1
      if i == index-4
        $enemywaitrate -= wert
      else
        $enemywaitrate -= wert-0.001
      end
    end
    if @active_battler.inputable?
      if @active_battler.actor?
        @status_window.index = @active_battler.id-1
        $bar[@active_battler.id-1] = 0
        start_actor_command_selection
      else
        @active_battler.make_action
        start_main
      end
    else
      if @active_battler.actor?
        $bar[@active_battler.id-1] = 0
      end
      next_actor
    end
  end
#------------------------------------------------------------------------------  
  def update_party_command_selection
    if Input.trigger?(Input::C)
      case @party_command_window.index
      when 0  # ??
        Sound.play_decision
        @status_window.index = @actor_index = -1
        @party_command_window.visible = false
        next_actor
      when 1  # ???
        if $game_troop.can_escape == false
          Sound.play_buzzer
          return
        end
        Sound.play_decision
        process_escape
      end
    end
  end
#------------------------------------------------------------------------------  
  def update_actor_command_selection
    if Input.trigger?(Input::cool.gif\" style=\"vertical-align:middle\" emoid=\"B)\" border=\"0\" alt=\"cool.gif\" /]
      Sound.play_cancel
      prior_actor
    elsif Input.trigger?(Input::C)
      case @actor_command_window.index
      when 0  # ??
        Sound.play_decision
        @active_battler.action.set_attack
        start_target_enemy_selection
      when 1  # ???
        Sound.play_decision
        start_skill_selection
      when 2  # ??
        Sound.play_decision
        @active_battler.action.set_guard
        start_main
      when 3  # ????
        Sound.play_decision
        start_item_selection
      end
    end
  end
#------------------------------------------------------------------------------  
  def update_target_enemy_selection
    @target_enemy_window.update
    if Input.trigger?(Input::cool.gif\" style=\"vertical-align:middle\" emoid=\"B)\" border=\"0\" alt=\"cool.gif\" /]
      Sound.play_cancel
      end_target_enemy_selection
    elsif Input.trigger?(Input::C)
      Sound.play_decision
      @active_battler.action.target_index = @target_enemy_window.enemy.index
      end_target_enemy_selection
      end_skill_selection
      end_item_selection
      start_main
    end
  end
#------------------------------------------------------------------------------  
  def update_target_actor_selection
    @target_actor_window.update
    if Input.trigger?(Input::cool.gif\" style=\"vertical-align:middle\" emoid=\"B)\" border=\"0\" alt=\"cool.gif\" /]
      Sound.play_cancel
      end_target_actor_selection
    elsif Input.trigger?(Input::C)
      Sound.play_decision
      @active_battler.action.target_index = @target_actor_window.index
      end_target_actor_selection
      end_skill_selection
      end_item_selection
      start_main
    end
  end
#------------------------------------------------------------------------------  
    def determine_skill
    @active_battler.action.set_skill(@skill.id)
    @skill_window.active = false
    if @skill.need_selection?
      if @skill.for_opponent?
        start_target_enemy_selection
      else
        start_target_actor_selection
      end
    else
      end_skill_selection
      start_main
    end
  end
#------------------------------------------------------------------------------  
  def determine_item
    @active_battler.action.set_item(@item.id)
    @item_window.active = false
    if @item.need_selection?
      if @item.for_opponent?
        start_target_enemy_selection
      else
        start_target_actor_selection
      end
    else
      end_item_selection
      start_main
    end
  end
#------------------------------------------------------------------------------  
  def start_main
    $game_troop.increase_turn
    @info_viewport.visible = false
    @info_viewport.ox = 0
    @message_window.visible = true
    @party_command_window.active = false
    @actor_command_window.active = false
    @status_window.index = @actor_index = -1
    @active_battler = nil
    @message_window.clear
    make_action_orders
    wait(20)
  end
 
end
#==============================================================================
#  CustomBattleScreen
#  Version : 0.2 - Customized
#  Created by : hellMinor
#==============================================================================
#==============================================================================
class Window_BattleStatus < Window_Selectable
#==============================================================================
  def initialize
    super(0, 0, 160, 416)
    refresh
    self.active = false
  end
#------------------------------------------------------------------------------
  def item_rect(index)
    rect = Rect.new(0, 0, 0, 0)
    rect.width = 126
    rect.height = 96
    rect.y = index / @column_max * 96
    return rect
  end
#------------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    actor = $game_party.members[index]
    draw_atb_gauge(index, 3, rect.y+10)
    draw_actor_name(actor, 3, rect.y)    
    draw_actor_state(actor, 35, rect.y+20, 48)
    draw_actor_graphic(actor,18,rect.y+55)
    draw_actor_mp(actor, 35, rect.y+45, 88)
    draw_actor_hp(actor, 3, rect.y+65, 120)
  end
#------------------------------------------------------------------------------  
  def draw_actor_name(actor, x, y)
    self.contents.font.color = hp_color(actor)
    self.contents.draw_text(x, y, 120, WLH, actor.name, 1)
  end
#------------------------------------------------------------------------------  
  def draw_atb_gauge(index,x, y, width = 120)
    if $bar[index] == nil
      $bar[index] = 0
    end
    gc1 = mp_gauge_color1
    gc2 = mp_gauge_color2
    self.contents.fill_rect(x, y, 120, 5, gauge_back_color)
    self.contents.gradient_fill_rect(x, y, $bar[index], 5, gc1, gc2)
  end

end
#==============================================================================
class Window_PartyCommand < Window_Command
#==============================================================================  
  def initialize
    s1 = Vocab::fight
    s2 = Vocab::escape
    super(385, [s1, s2], 2, 1)
    draw_item(0, true)
    draw_item(1, $game_troop.can_escape)
    self.active = false
  end
#------------------------------------------------------------------------------  
  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(rect, @commands[index], 1)
  end

end
#==============================================================================
class Window_ActorCommand < Window_Command
#==============================================================================  
  def initialize
    super(385, [], 4, 1)
    self.active = false
  end
#------------------------------------------------------------------------------
  def setup(actor)
    s1 = Vocab::attack
    s2 = Vocab::skill
    s3 = Vocab::guard
    s4 = Vocab::item
    if actor.class.skill_name_valid
      s2 = actor.class.skill_name
    end
      @commands = [s1,s2, s3, s4]
      @item_max = 4
    refresh
    self.index = 0
  end
#------------------------------------------------------------------------------
  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(rect, @commands[index], 1)
  end
 
end
#==============================================================================
class Window_TargetEnemy < Window_Command
#==============================================================================
  def initialize
    commands = []
    @enemies = []
    for enemy in $game_troop.members
      next unless enemy.exist?
      commands.push(enemy.name)
      @enemies.push(enemy)
    end
    super(160, commands, 1, 8)
  end
#------------------------------------------------------------------------------
  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(rect, @commands[index], 1)
  end
end
#==============================================================================
class Scene_Battle < Scene_Base
#==============================================================================
  def create_info_viewport
    @info_viewport = Viewport.new(0, 0, 544, 480)
    @info_viewport.z = 100
    @status_window = Window_BattleStatus.new
    @party_command_window = Window_PartyCommand.new
    @actor_command_window = Window_ActorCommand.new
    @status_window.viewport = @info_viewport
    @party_command_window.viewport = @info_viewport
    @actor_command_window.viewport = @info_viewport
    @party_command_window.x = 159
    @party_command_window.y = 360
    @status_window.x = 0
    @actor_command_window.x = 159
    @actor_command_window.y = 360
    @actor_command_window.visible = false
    @info_viewport.visible = false
  end
#------------------------------------------------------------------------------  
  def update_info_viewport
    @party_command_window.update
    @actor_command_window.update
    @status_window.update
    if @party_command_window.active
      @party_command_window.visible = true
      @actor_command_window.visible = false
    elsif @actor_command_window.active
      @actor_command_window.visible = true
      @party_command_window.visible = false
    end
  end
#------------------------------------------------------------------------------  
  def start_target_enemy_selection
    @target_enemy_window = Window_TargetEnemy.new
    @target_enemy_window.y = 193
    @info_viewport.rect.x += @target_enemy_window.width
    @info_viewport.ox += @target_enemy_window.width
    @actor_command_window.active = false
  end
#------------------------------------------------------------------------------
  def start_skill_selection
    @help_window = Window_Help.new
    @skill_window = Window_Skill.new(0, 55, 544, 306, @active_battler)
    @skill_window.help_window = @help_window
    @actor_command_window.active = false
  end
#------------------------------------------------------------------------------
  def start_item_selection
    @help_window = Window_Help.new
    @item_window = Window_Item.new(0, 55, 544, 306)
    @item_window.help_window = @help_window
    @actor_command_window.active = false
  end
 
end
« Letzte Änderung: August 12, 2010, 17:37:06 von Colonios »

ATB von Scriptsection verändern?

Offline Onkel Hell

  • Sol Invictus
  • Administrator
  • VX-Kenner
  • ****
  • Beiträge: 562
  • You can't shoot me, I'm AIDS !
ATB von Scriptsection verändern?
« Antwort #1 am: Februar 05, 2008, 12:27:33 »
is nurn kleiner eingriff, eine boolean variable auf false stellen und das messagewindow anpassen
mal ebend schauen
edit: ich hab das ganze script mal geupdatet , zieh dir einfach das neue
« Letzte Änderung: Februar 05, 2008, 12:53:59 von hellMinor »
Verborgen in der Dunkelheit
Ich kenne nur die Einsamkeit
Auf das kein Gott mich sieht, ich bin ein Eremit


Mega Man Battle Engine


ATB von Scriptsection verändern?

Gast

  • Gast
ATB von Scriptsection verändern?
« Antwort #2 am: Februar 05, 2008, 18:55:50 »
Zitat von: hellMinor
is nurn kleiner eingriff, eine boolean variable auf false stellen und das messagewindow anpassen
mal ebend schauen
edit: ich hab das ganze script mal geupdatet , zieh dir einfach das neue


Sehr schön,dank dir^^

 


 Bild des Monats

rooftop party

Views: 3597
By: papilion

 Umfrage

  • Wer soll das BdM gewinnen?
  • Dot Kandidat 1
  • 3 (25%)
  • Dot Kandidat 2
  • 1 (8%)
  • Dot Kandidat 3
  • 2 (16%)
  • Dot Kandidat 4
  • 0 (0%)
  • Dot Kandidat 5
  • 6 (50%)
  • Stimmen insgesamt: 12
  • View Topic

 Schnellsuche





SimplePortal 2.3.3 © 2008-2010, SimplePortal