AccueilAccueil  PortailPortail  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  ConnexionConnexion  



Le Deal du moment :
Cdiscount : -30€ dès 300€ ...
Voir le deal

Partagez
 

 [VX] BOF Cross Command

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
Dark Raviel
Croisé Lv.14
Croisé Lv.14
avatar


Masculin Age : 34
Inscrit le : 03/03/2009
Messages : 1141

[VX] BOF Cross Command Empty
MessageSujet: [VX] BOF Cross Command   [VX] BOF Cross Command Icon_minitimeJeu 18 Mar 2010 - 20:22

Introduction : Mettre comeonman1111 dans vos crédits, placer les images données dans Pictures de votre projet avec les bons noms, mettre le script au dessus de Main comme d'habitude

Auteur : comeonman1111, Jens009, Blazingamer

scripts :

Version 1.1

Code:
#===============================================================================
#
 Breath of Fire Cross Command Window    VX version               

 
#
By: Jens009 (Translation and Modification)                       

 Version 1.0 July 29, 2008
#  Version 1.1 July 31, 2008
#
Originally by Blazingamer                                       

 Contact me at Rpgrevolution.com/Forums
#
#  Rant: The Black
Knights will liberate Japan                   
#        Left
Justify was irritating yet fun! =D
#        HAPPY B-DAY to my
certain friend =D
#       
#                                                                 
 
# Change Log:                                                     
 
#    - Version 1.0 : Default code                                 
 
#    - Version 1.1:
#        Change Window size to 128x128
#       
 Added LEFTJUSTIFY option
#        aliased two more methods
#
Description:                                                     

 Changes the default actor commands with a "cross-command" using

 32x32 pictures.                                               
#
Instructions:
#  Since version 1.1,
#  1) Place below materials
 but above everything that modifies Scene_Battle in
#      anyway to
 increase compatibility
#  2) Import the proper pictures to
Graphics/Pictures
#
# Notes:
#  Version 1.0
#        2
methods were aliased from Scene_Battle.                 
#        1
method was directly edited from Scene_Battle           
#  Version
 1.1
#        2 more methods were aliased from Scene_Battle
#
#                                                                 
 

#
Compatibility:                                                   

 Should be compatible with most systems or add ons             

 May cause errors with method
#      start_actor_command_selections

 Using Left Justified decreases compatibility.
#                                                                 
 
# Modifications:
# I. Changing the
pictures:                                           
#    Go to
folder Graphics/Pictures                               
#   
Import your desired 32x32 pictures                           
#   
 Make sure you named them as follows:                         
#      Attack.png                                                 
 
#      Magic.png                                                   
#      Items.png                                                   
#      Run.png                                                     
#   
 They should be self explanatory.
# II. Check the config section to
further modify the cross window
#===============================================================================

#===============================================================================
#
 Config
#===============================================================================

 LEFTJUSTIFY = false # set to true if cross command is left justified
 CC_WINDOW_OPACITY = 255 # 0- Transparent, 155- Semi-Transparent,
255-Full

#===============================================================================
#
 CrossCommand Window class                                       

 class handles the cross command window                         
#===============================================================================

class
 CrossCommand < Window_Selectable
  #==========================================================================

  #
 Initialize: Windows, Command list, Item size, and draw methods
  #==========================================================================

  def
 initialize
    super (0, 0, 128, 128)
    self.contents =
Bitmap.new(width - 32, height - 32)
    self.opacity =
CC_WINDOW_OPACITY
    @commands = ["attack",
"magic","defend","items","run away"]
      @item_max = 5
    draw_item(0,
 32,32,"Attack")
    draw_item(1, 32,0, "Magic")
    draw_item(2,
64,32,"Defend")
    draw_item(3, 0,32, "Items")
    draw_item(4,
32,64, "Run")
    self.active = false
    self.visible = true
    self.index
 = 0
  end
  #============================================
  #
Define Method draw_item.
  #============================================
  #
 index: Command index
  # x: Coordinate of bitmap
  # y:
Coordinate of bitmap
  # picture: Picture name from index
  #============================================
 
  def
 draw_item(index, x, y, picture) 
    bitmap =
Cache.picture(picture)
    self.contents.blt(x, y, bitmap,
Rect.new(0, 0, 32, 32))
  end
 
  #============================================
  #
 Update Cursor Information
  #============================================
  #
 index 0 Attack
  #      1 Skill
  #      2 Defend
  #      3
 Item
  #      4 Run
  #============================================
 
  def
 update
    update_cursor
  end
 
  def update_cursor
    if
 index == 3
      self.cursor_rect.set(0, 32, 32, 32)
    elsif
index == 2
      self.cursor_rect.set(64, 32, 32, 32)
    elsif
index == 1
      self.cursor_rect.set(32,0,32,32)
    elsif index
 == 4
      self.cursor_rect.set(32,64,32,32)
    else
     
self.cursor_rect.set(32,32,32,32)
  end
 
    if
Input.press?(Input::LEFT)
      @index = 3
    elsif
Input.press?(Input::RIGHT)
      @index = 2
    elsif
Input.press?(Input::UP)
      @index = 1
    elsif
Input.press?(Input::DOWN)
      @index = 4
    else
      @index
 = 0
    end
end
end

#===============================================================================
#
#
 Scene_Battle                         
# Note: Methods were modified
 both by
# aliases and direct edits.
# Aliases used:
#  alias
jens009_create_info_viewport_cross_command create_info_viewport
#  alias
 jens009_acommand_cross_command update_actor_command_selection
#  alias
 jens009_start_target_cross_command start_target_enemy_selection
#  alias
 jens009_end_target_cross_command end_target_enemy_selection
# Method
 directly modified:
#  start_actor_command_selection
#===============================================================================
#
class
 Scene_Battle
 
  alias
jens009_create_info_viewport_cross_command create_info_viewport
  alias
 jens009_acommand_cross_command update_actor_command_selection
 
  alias
 jens009_start_target_cross_command start_target_enemy_selection
  alias
 jens009_end_target_cross_command end_target_enemy_selection
 
  def
 start_actor_command_selection
    @party_command_window.active =
false
  # The next line is specifcally for class Window_ActorCommand
 
 # Do not, uncomment the line. The line was commented to show that this
 
 # line of code is not needed. Also to show that the method
  #
start_actor_command_selection was directly edited from Scene_Battle
 
 #@actor_command_window.setup(@active_battler)
    @actor_command_window.active
 = true
    @actor_command_window.index = 0
  end
 
  def
create_info_viewport
    jens009_create_info_viewport_cross_command
    #Create
 Cross Command
    @actor_command_window = CrossCommand.new
    #Make
 Cross Comand window part of viewport
    @actor_command_window.viewport
 =@info_viewport
    #Change coordinates of Cross Command window
    #
 Start check of justification
    if LEFTJUSTIFY == true
      @actor_command_window.x
 = 0
      @party_command_window.x = 544
      @status_window.x =
128
      else
      @actor_command_window.x = 544
    end #END
 JUSTIFICATION CHECK
  end
 
if LEFTJUSTIFY == true
 
  def
 update_info_viewport
    @party_command_window.update
    @actor_command_window.update
    @status_window.update
    if
 @actor_command_window.active and @info_viewport.ox > 0
      @info_viewport.ox
 -= 16
    elsif @party_command_window.active and @info_viewport.ox
< 128
      @info_viewport.ox += 16
    end
  end

  #--------------------------------------------------------------------------
  #
 * Start Target Enemy Selection
  #--------------------------------------------------------------------------
  def
 start_target_enemy_selection
    jens009_start_target_cross_command #
 Call default methods
    #Start of Edit
    @target_enemy_window.x
 = 128
    @info_viewport.rect.x -= @target_enemy_window.width
    @info_viewport.ox
 -= @target_enemy_window.width
    @status_window.visible = false
  end
  #--------------------------------------------------------------------------
  #
 * End Target Enemy Selection
  #--------------------------------------------------------------------------
  def
 end_target_enemy_selection
    # Start of edit
    @info_viewport.rect.x
 += @target_enemy_window.width
    @info_viewport.ox +=
@target_enemy_window.width
    @status_window.visible = true
    jens009_end_target_cross_command
 #Call default methods
end
 
 
end # END LEFTJUSTIFY CHECK

 
    def
 update_actor_command_selection
    if Input.trigger?(Input::C)
      case
 @actor_command_window.index
        when 4
          if
$game_troop.can_escape == false
            Sound.play_buzzer
            return
          end
 # End Can Escape
          Sound.play_decision
          process_escape
        end
 # End Case
      end # End If Statement
    jens009_acommand_cross_command
 #Call other commands
  end #End method
 
#====================================#
#
 END OF CLASS MODIFICATION          #
#====================================#
end

Patch de désactivation
Code:
#============================================
#
Deactivate Battle Commands
# By Jens009
# Version: 2.0
#
Release Date: August 5, 2008
# Description: Deactivate Battle
Commands Using a script Switch
# Log:
#  - Major Change in
Coding
#    Instead of deleting the actual command, it just blackens
 it and plays
#    buzzer when selected
# How to use:
#  Use a
 call script.
#    Deactivating, attack, skill, guard or item:
#     
 $game_troop.no_attack = true/false
#      $game_troop.no_skill =
true/false
#      $game_troop.no_guard = true/false
#     
$game_troop.no_item = true/false
#      $game_troop.no_attack =
true/false
#  Setting it to true disables the battle command
#
Author\'s Notes:
#  2 methods aliased.
#   
jens009_command_deactivate_initialize initialize
#   
jens009_deactivate_commands_setup setup
#  1 method directly edited
#   
 update_actor_command_selection
#================================================

#===================================================
#
 Start Game_Troop Edit
# Add Global Instances
#==================================================
class
 Game_Troop < Game_Unit
  attr_accessor :no_attack
  attr_accessor
 :no_skill
  attr_accessor :no_guard
  attr_accessor :no_item

  alias
 jens009_command_deactivate_initialize initialize
 
  def
initialize
    @no_attack = false
    @no_skill = false
    @no_guard
 = false
    @no_item = false
    jens009_command_deactivate_initialize
  end
end



#==============================================
#
 End Game_Troop Edit
# Start Window_Actor_Command Edit
#===============================================
class
 Window_ActorCommand < Window_Command
    alias
jens009_deactivate_commands_setup setup
  # Modify Setup
    def
setup(actor)
      jens009_deactivate_commands_setup(actor)
     
 draw_item(0, false) if $game_troop.no_attack # Deactive attack
     
 draw_item(1, false) if $game_troop.no_skill  # Deactive skill
     
 draw_item(2, false) if $game_troop.no_guard  # Deactive guard
     
 draw_item(3, false) if $game_troop.no_item  # Deactive item
    end
 # End method
 
end # END CLASS
#============================================
#
 End Window_ActorCommand Edit
#===========================================
#====================================
#
 Start Scene_Battle edit
#  Method Edited:
update_actor_command_selection
#    Play buzzer when deactivated.
#====================================
class
 Scene_Battle
    def update_actor_command_selection
    if
Input.trigger?(Input::B)
      Sound.play_cancel
      prior_actor
    elsif
 Input.trigger?(Input::C)
      case @actor_command_window.index
      when
 0  # Attack
       
        if $game_troop.no_attack
          Sound.play_buzzer 
        else         
          Sound.play_decision
          @active_battler.action.set_attack
          start_target_enemy_selection
        end
       
      when
 1  # Skill
       
        if $game_troop.no_skill
          Sound.play_buzzer
        else
          Sound.play_decision
          start_skill_selection
        end
       
      when
 2  # Guard
        if $game_troop.no_guard
          Sound.play_buzzer
        else
          Sound.play_decision
          @active_battler.action.set_guard
          next_actor
        end
         
      when
 3  # Item
       
        if $game_troop.no_item
          Sound.play_buzzer
        else
          Sound.play_decision
          start_item_selection
        end
       
      end
 # END CASE

      end # END INPUT CHECK
    end # END METHOD
EDIT
   
end # END CLASS

Patch de correction pour le SBS
Code:
#================
# Jens009's Cross Command Left
 Justified Patch
# for RPG Tanketai Battle System
# Description:
Bug fix for window placement
# Instructions: Simply place below RPG
Tanketai SBS
#=================
class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  #
 MOVE VIEWPORT
  #--------------------------------------------------------------------------
  def
 move1_info_viewport
    if LEFTJUSTIFY == true
    @info_viewport.ox
 = 0
    loop do
      update_basic
      @info_viewport.ox += 8
      @party_command_window.x
 += 8
      @actor_command_window.x -= 8
      break if
@info_viewport.ox == 64
    end  # END LOOP
 
    else
    @info_viewport.ox
 = 128
    loop do
      update_basic
      @info_viewport.ox
-= 8
      @party_command_window.x -= 8
      @actor_command_window.x
 += 8
      break if @info_viewport.ox == 64
    end  # END LOOP
    end
 # END CHECK
  end # END METHOD EDIT
  #--------------------------------------------------------------------------
  #
 ● MOVE VIEWPORT
  #--------------------------------------------------------------------------
  def
 move2_info_viewport
    if LEFTJUSTIFY == true
     
    @info_viewport.ox
 = 64
    loop do
      update_basic
      @info_viewport.ox +=
 8
      @party_command_window.x -= 8
      @actor_command_window.x
 += 8
      break if @info_viewport.ox == 128
    end 
   
  else
   
    @info_viewport.ox
 = 64
    loop do
      update_basic
      @info_viewport.ox -=
 8
      @party_command_window.x += 8
      @actor_command_window.x
 -= 8
      break if @info_viewport.ox == 0
    end # END LOOP 
    end
 # END CHECK
 
  end #END METHOD EDIT
 
end # END CLASS


Customisation

Si vous changez d'icônes mettez les bons noms
Les icône doivent exclusivement etre 32x32
Les noms des icônes doivent être :
Attack.png
Magic.png
Defend.png

Items.png
Run.png

Screens

[VX] BOF Cross Command Cross_command
[VX] BOF Cross Command Cross_commandv11


Installation

Placer le script au dessus de Main dans Matérial
Placer les images suivantes dans Graphics/Pictures de votre projet :
Attack.png
[VX] BOF Cross Command Attack

Magic.png
[VX] BOF Cross Command Magic

Defend.png
[VX] BOF Cross Command Defend

Items.png
[VX] BOF Cross Command Items

Run.png
[VX] BOF Cross Command Run
Revenir en haut Aller en bas
http://aigledor1989.forumpro.fr/forum.htm
 

[VX] BOF Cross Command

Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1

 Sujets similaires

-
» [VX] BOF Cross Command
» [résolu] BOF Cross Command
» CC command list
» Mettre des icône dérierre les command de window_commandactor [RESOLU]
» RMVX: Spin command battle deplacement (resolu)

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RPG Maker VX :: Entraide :: Scripts :: Scripts VX - RGSS2 :: Combat-
Créer un forum | ©phpBB | Forum gratuit d'entraide | Signaler un abus | Forum gratuit