Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Script Edit Request [No SDK on this one]

Hi...

In my current project, i need to use the XAS battle system... Also, i need to use a Visual Equipment script.
This particular Visual Equipment script requires the SDK, but the XAS is uncompatible with it.

I need to edit the Visual Equipment script so it doesn't need the SDK anymore, can anyone do this for me?

Here's the Visual Equipment script i'm having problems with (i need to use this one):
Code:
#==============================================================================
# â–  Visual Equipment
#------------------------------------------------------------------------------
# Author  | Meâ„¢ / me@solarsoft.nl
# Version | 1.2.1
# Date    | 13 / 09 / 06
# Credit  | Raitaime - Geso Chiku
#==============================================================================
#
#   â–¼ New in version 1.2.X
#   - Now possible to use other maps then Visual Equipment
#   - Fixed: Unable to load bug
#   - Fixed: Guillaume update bug
#   - Fixed: Guillaume Weapon not showing bug 
#
#   â–¼ New in version 1.1.X
#   - Equipment visible in windows (using draw_actor_graphic)
#   - Compatible with Guillaume777's Multi-Slot script version 6.2.1
#
#==============================================================================
#
#   â–¼ Instructions (updated: version 1.0.0)
#
#   Hello dear reader. Thank you for choosing my Visual Equipment
#   script, based on the originals by Raitaime and Geso Chiku.
#   This script contains new elements, and rewritten  code, and copied 
#   code from the old scripts.
#
#------------------------------------------------------------------------------
#
#   â–¼ What does this script:
#   - Shows the players equipment on map
#   - Initial body value possible (skin, eyes and hair)
#   - Up to 5 types of equipment. From weapons to accesoiry's
#   - Shows NPC equipment on the map events if set
#   - Compatible with Caterpillar and Squad Based Action Battle System
#   - Compatible with Half Kaizer- and other different size-sprites
#
#------------------------------------------------------------------------------
#
#   â–¼ How to add your own graphics:
#   - Make or locate the Visual Equipment - folder which should be in Graphics
#   - You can choose to place your files here, or make submaps
#   - Scroll down for the Get_file method in module Visual Equipement
#   - Add a line like this: return ["FILENAME, HUE] if item_id = ID
#         where Filename is the filename between quotes without extension
#         Hue is the hue which the sprite should take (usually 0)
#         ID is the ID number of the weapon/armor
#   ● NOTE: Make sure you add weapons above the else, and the rest after it!
#   ● NOTE: The equipment on a frog should match the frogs size, the equipent
#           on a standard event should thus be 128x192.
#
#------------------------------------------------------------------------------
#
#   â–¼ How to give my character default skin, eyes and hair:
#   - Add somewhere after you initialized $game_party the following lines:
#       $game_party.actors[0].set_body(0, "FILENAME")
#       $game_party.actors[0].set_body(1, "FILENAME")
#       $game_party.actors[0].set_body(2, "FILENAME")
#   - Change the line according to your needs, just replace the '' with the
#     Filename. ) is for skin, 1 for eyes and 2 for hair. If this is left
#     empty (like what it is now) the body[0] will be replaced by the graphic
#     set in the database. (So, no skin is set ;))
#
#------------------------------------------------------------------------------
#
#   â–¼ How to add Equipment to the characters as in Events:
#   - Add comments in this format:
#       Comment: Visual Equipment
#       Comment: Body | [charset] | [hue]
#       Comment: Armor | [charset] | [hue]
#       Comment: Helmet | [charset] | [hue]
#       Comment: Weapon | [charset] | [hue]
#       Comment: Accessory | [charset] | [hue]
#       Comment: Shield | [charset] | [hue]
#   - Replace [charset] by the filename without extension
#   - Replace [hue] by the hue, default 0
#   ● NOTE: please use:  |  (with spaces) instead of | (without spaces)
#   ● NOTE: when no hue was found, the hue will be set to 0 (default)
#   ● NOTE: when not entering the hue, remove the last collon. (ex. Body | [charset])
#   ● NOTE: more/less maximum event equipments can be set at Visual_Equipment
#   ● NOTE: Body/Armor/Helmet etc. can be replaced by ex. 1, 2, 3, 4
#
#------------------------------------------------------------------------------
#
#   â–¼ Additional Information... 
#   - You probably need to alter the script yourself a bit when usong 8 frames 
#     etc. I already did a little thing by adding the options frames and 
#     directions in the visual equipment module. Make sure any directions script 
#     is ABOVE this script, and copy the edits from Sprite_Character to this 
#     script or it won't work anyway.
#
#------------------------------------------------------------------------------
#
#   â–¼ Known compatibility issues
#   - With extra equipments scripts, does not shows things in the extra slots
#   - With Raitaimes shadow script, only shows character sprite, not equipments
#   - With Only scripts like Netplay and Netplay+, only shows head/does not work
#   - Only works with SDK version of Caterpillar
#
#------------------------------------------------------------------------------
#
#   ● NOTE: Merges can always be requested on the topic on rmxp.org
#           http://www.rmxp.org/forums/showthread.php?t=9112
#
#   Have fun and Take care,
#   Meâ„¢
#==============================================================================
#
#   â–¼ This script aliases:
#   - Game_Actor > setup
#   - Sprite_Character > initialize
#
#   â–¼ This script rewrites:
#   - Sprite_Character > update
#   - Window_Base > draw_actor_graphic
#
#==============================================================================

#--------------------------------------------------------------------------
# * SDK Log Script
#--------------------------------------------------------------------------
SDK.log("Visual", "Mr.Mo", 1, "09.16.06")
#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?("Visual") == true
 
#==============================================================================
# *** module Visual Equipment
#------------------------------------------------------------------------------
#  This module handles the image name and equipment draw order processing
#==============================================================================
module Visual_Equipment
  module_function
  
  #--------------------------------------------------------------------------
  # * Configuration
  #--------------------------------------------------------------------------
  #    Width            : The default file width.
  #    Heigth           : The default file heigth.
  #    Event_equipments : How many comments will be used after Visual Equipment
  #    Frames           : How many frames do the sprites contain (left right)
  #    Directions       : How many directions do the sprites contain (up down)
  #    Guillaume777     : Set to true if you are using Guillaume777's script
  #--------------------------------------------------------------------------
  Width                 = 128 
  Height                = 192 
  Event_equipments      = 5
  Frames                = 4
  Directions            = 4
  Guillaume777          = false
  
  #--------------------------------------------------------------------------
  # * Gives the file name which corresponds to the item ^^
  #--------------------------------------------------------------------------
  def get_file(type, item_id)
    case type
     when 5
      #---------------------------------------------------------
      # Weapons should have type 5
      #---------------------------------------------------------
      return ["#Characters/001-Fighter01",0] if item_id == 1
    else
      #---------------------------------------------------------
      # Body Armors should have type 1
      #---------------------------------------------------------
      return ["Roupa Beje.png",0] if item_id == 4
      return ["Roupa Beje2.png",0] if item_id == 5
      return ["Roupa Beje3.png",0] if item_id == 6
      return ["Túnica Simples.png",0] if item_id == 7
      return ["Túnica Simples 2.png",0] if item_id == 8
      return ["Túnica Simples 3.png",0] if item_id == 9
      return ["Vestido.png",0] if item_id == 10
      return ["Vestido2.png",0] if item_id == 11
      return ["Vestido3.png",0] if item_id == 12
      return ["Roupa Mágica.png",0] if item_id == 13
      return ["Roupa Mágica +1.png",0] if item_id == 14
      return ["Roupa Mágica2.png",0] if item_id == 15
      return ["Roupa de Clérigo.png",0] if item_id == 16
      return ["TúnicaNobre2.png",0] if item_id == 17
      return ["TúnicaNobre3.png",0] if item_id == 18
      return ["CasacoDeInverno.png",0] if item_id == 19
      return ["CasacoDeInverno2.png",0] if item_id == 20
      return ["CasacoDeInverno3.png",0] if item_id == 21
      return ["Spirit.png",0] if item_id == 22
      return ["Spirit2.png",0] if item_id == 23
      return ["Spirit3.png",0] if item_id == 24
      return ["Bermuda.png",0] if item_id == 25
      return ["Bermuda2.png",0] if item_id == 26
      return ["Biquini Branco.png",0] if item_id == 27
      return ["Biquini2.png",0] if item_id == 28
      return ["Túnica de Seda.png",0] if item_id == 29
      return ["Vestido de Festa.png",0] if item_id == 30
      return ["Roupa de Bardo.png",0] if item_id == 31
      return ["Roupa de Feiticeiro.png",0] if item_id == 32
      return ["Roupa de Ferreiro.png",0] if item_id == 33
      return ["Roupa de Necromante.png",0] if item_id == 34
      return ["Roupa de Mercenário.png",0] if item_id == 35
      return ["Roupa de Caça.png",0] if item_id == 36
      return ["Roupa de Arqueiro.png",0] if item_id == 37
      return ["Prataria.png",0] if item_id == 38
      return ["Prataria.png",0] if item_id == 39
      return ["Prataria.png",0] if item_id == 40
      return ["Prataria.png",0] if item_id == 41
      return ["Prataria.png",0] if item_id == 42
      return ["Armadura.png",0] if item_id == 43
      return ["Armadura.png",0] if item_id == 44
      return ["Armadura.png",0] if item_id == 45
      return ["Armadura.png",0] if item_id == 46
      return ["Armadura.png",0] if item_id == 47
      return ["Armadura 2.png",0] if item_id == 48
      return ["Armadura 2.png",0] if item_id == 49
      return ["Armadura 2.png",0] if item_id == 50
      return ["Armadura 2.png",0] if item_id == 51
      return ["Armadura 2.png",0] if item_id == 52
      return ["Armadura de Borr.png",0] if item_id == 53
      return ["Armadura Oceânica.png",0] if item_id == 54
      return ["Vestimenta Prateada.png",0] if item_id == 55
      return ["Armadura Negra.png",0] if item_id == 58


      
      #---------------------------------------------------------
      # Helmets should have type 2
      #---------------------------------------------------------
      return ["Snorquel.png",0] if item_id == 1
      return ["Presilha de Cabelo.png",0] if item_id == 2
      return ["Faixa Azul.png",0] if item_id == 3
      return ["Capacete Viking.png",0] if item_id == 56
      return ["Capacete Negro.png",0] if item_id == 57

      #---------------------------------------------------------
      # Assesoiry's should have type 3
      #---------------------------------------------------------
      
      #---------------------------------------------------------
      # Shields should have type 4
      #---------------------------------------------------------
    end
    return false
  end  
  #--------------------------------------------------------------------------
  # * Set the order or drawing the equipments / returns the id of the item
  #--------------------------------------------------------------------------
  def get_itemid(order_i,actor)
    return -1 if Guillaume777 == true
    return -1 if actor == nil
    case order_i
     when 0 # Body (Skin/Eyes/Hair)
      return actor.body
     when 1 # Body Armor
      return actor.armor3_id 
     when 2 # Helmet
      return actor.armor2_id
     when 3 # Assesoiry
      return actor.armor4_id
     when 4 # Shield
      return actor.armor1_id 
     when 5 # Weapon
      return actor.weapon_id
    end
  end
  #--------------------------------------------------------------------------
  # * Set the order or drawing the equipments / returns the ids of the items
  #--------------------------------------------------------------------------
  def guill_itemid(type, actor)
    return [] if Guillaume777 != true
    return [] if actor == nil
    case type
     when 0
      return actor.body
     when 1...4 # Includes originial armors (armor1_id ... armor4_id)
      return actor.armor_ids 
     when 5 # Includes weapon 1
      return actor.weapon_ids
    end
  end
end

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Aliases
  #--------------------------------------------------------------------------
  alias tm_visualequipment_gameactor_setup setup
  #--------------------------------------------------------------------------
  # * Public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :body
  #--------------------------------------------------------------------------
  # * Setup
  #     actor_id : actor ID
  #--------------------------------------------------------------------------
  def setup(actor_id)
    @body = []
    tm_visualequipment_gameactor_setup(actor_id)
  end
  #--------------------------------------------------------------------------
  # * Set's a actors body
  #     thing: 0 should be Template (Skin)
  #            1 should be Eyes 
  #            2 should be Hair
  #--------------------------------------------------------------------------
  def set_body(thing, value)
    # If value is not the 'remove' code.
    if value != nil and value != ''
      # Put the filename into the body array.
      @body[thing] = value
    else
      # Clear the filename in the body array.
      @body[thing] = nil
    end
  end
  #--------------------------------------------------------------------------
  # * Get's the needed equipments / Also determines ordeR!
  #--------------------------------------------------------------------------
  def get_equipments
    return [] if Visual_Equipment::Guillaume777 == true
    # Empty's equipments array for use
    equipments = []
    # Add the skin/default char and eyes to the array
    equipments.push([@body[0], @character_hue])        if @body[0] != nil
    equipments.push(["#Characters/#{@character_name}", @character_hue]) if equipments.size != 1
    equipments.push([@body[1], @character_hue])        if @body[1] != nil 
    # Add the equipments, if there is a file for the equipments
    for equipnumber in 1...5
      # First, get the item_id of the equipment
      item_id = Visual_Equipment.get_itemid(equipnumber, self)
      # Second, get the filename and hue of the file attached to the id
      item = Visual_Equipment.get_file(equipnumber, item_id)
      # Put the item into the array if a file name was found
      equipments.push(item) unless item == false or item == nil
    end
    # Add the hair to the array, if any is set
    equipments.push([@body[2], @character_hue]) if @body[2] != nil
    # Return all the equipments
    return equipments
  end
  #--------------------------------------------------------------------------
  # * Get's the needed equipments / Also determines ordeR!
  #--------------------------------------------------------------------------
  def guill_equipments
    return [] if Visual_Equipment::Guillaume777 != true
    # Empty's equipments array for use
    equipments = []
    # Add the skin/default char and eyes to the array
    equipments.push([@body[0], @character_hue])        if @body[0] != nil
    equipments.push(["#Characters/#{@character_name}", @character_hue]) if equipments.size != 1
    equipments.push([@body[1], @character_hue])        if @body[1] != nil 
    # Gets wepaons and armors
    weapons    = Visual_Equipment.guill_itemid(5, self)
    armors     = Visual_Equipment.guill_itemid(2, self)
    # Add the hair to the array, if any is set
    equipments.push([@body[2], @character_hue]) if @body[2] != nil
    # Add the equipments, if there is a file for the equipments
    for armor_id in armors
      # Get the filename and hue of the file attached to the id
      item = Visual_Equipment.get_file(1, armor_id)
      # Put the item into the array if a file name was found
      equipments.push(item) unless item == false or item == nil
    end
     # Add the equipments, if there is a file for the equipments
    for weapon in weapons
      # Get the filename and hue of the file attached to the id
      item = Visual_Equipment.get_file(5, weapon)
      # Put the item into the array if a file name was found
      equipments.push(item) unless item == false or item == nil
    end
    return equipments
  end
end

#==============================================================================
# ** Sprite_Character
#------------------------------------------------------------------------------
#  This sprite is used to display the character.It observes the Game_Character
#  class and automatically changes sprite conditions.
#==============================================================================
class Sprite_Character < RPG::Sprite
  #--------------------------------------------------------------------------
  # * Aliases
  #--------------------------------------------------------------------------
  alias tm_visualequipment_spritecharacter_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     viewport  : viewport
  #     character : character (Game_Character)
  #--------------------------------------------------------------------------
  def initialize(viewport, character = nil)
    # Make an body array
    @body_id = Array.new(3,nil)
    # How many id's are there?
    if Visual_Equipment::Guillaume777 != true
      number = 5
    elsif Visual_Equipment::Guillaume777 == true
      number = G7_MS_MOD::WEAPON_KINDS.size + G7_MS_MOD::ARMOR_KINDS.size
    end
    # Make the equipment array
    @equips_id = Array.new(number,0)
    # What kind is the character?
    if character.is_a?(Game_Player)
      @actor = $game_party.actors[0]
    elsif SDK.enabled?('SBABS') == true and character.is_a?(Game_Ally)
      @actor = $game_party.actors[character.actor_id]
    elsif SDK.enabled?('Caterpillar') == true and character.is_a?(Game_Party_Actor)
      @actor = character.actor
    elsif character.is_a?(Game_Event)
      @actor = 'event'
    else
      @actor = nil
    end
    tm_visualequipment_spritecharacter_initialize(viewport, character)
  end
  #--------------------------------------------------------------------------
  # * Did the equipment changed?
  #--------------------------------------------------------------------------
  def changed_equipment?
    return false if Visual_Equipment::Guillaume777 == true
    # According to the kind of the actor, the check is made...
    if character.is_a?(Game_Player)
      for equipment_id in 1...5
        item_id = Visual_Equipment.get_itemid(equipment_id, @actor)
        return true if @equips_id[equipment_id] != item_id
      end
      body = Visual_Equipment.get_itemid(0, @actor)
      for i in 0..3
        return true if @body_id[i] != body[i]
      end     
    elsif SDK.enabled?('Caterpillar') == true and @character.is_a?(Game_Party_Actor)
      return (@actor != @character.actor ? true : false)
    elsif SDK.enabled?('SBABS') == true and @character.is_a?(Game_Ally)
      return (@actor != $game_party.actors[@character.actor_id] ? true : false)
    elsif @character.is_a?(Game_Event)
      return (@page != @character.page ? true : false)
    else
      return false
    end
  end
  #--------------------------------------------------------------------------
  # * Did the equipment changed?
  #--------------------------------------------------------------------------
  def guill_changed_equipment?
    return false if Visual_Equipment::Guillaume777 != true
    # According to the kind of the actor, the check is made...
    if character.is_a?(Game_Player)
      weapons  = Visual_Equipment.guill_itemid(5, @actor)
      armors   = Visual_Equipment.guill_itemid(2, @actor)
      for id in 0..armors.size
        start = id
        return true if @equips_id[id] != armors[id]
      end
      for id in (start+1)..weapons.size
        return true if @equips_id[id] != weapons[id]
      end
      body = Visual_Equipment.guill_itemid(0, @actor)
      for i in 0..3
        return true if @body_id[i] != body[i]
      end
    elsif SDK.state('Caterpillar') == true and @character.is_a?(Game_Party_Actor)
      return (@actor != @character.actor ? true : false)
    elsif SDK.state('SBABS') == true and @character.is_a?(Game_Ally)
      return (@actor != $game_party.actors[@character.actor_id] ? true : false)
    elsif @character.is_a?(Game_Event)
      return (@page != @character.page ? true : false)
    else
      return false
    end
  end
  #--------------------------------------------------------------------------
  # * Update known equipment
  #--------------------------------------------------------------------------
  def update_equipment
    return false if Visual_Equipment::Guillaume777 == true
    # Remember tile ID, file name and hue
    @tile_id = @character.tile_id
    @character_name = @character.character_name
    @character_hue = @character.character_hue
    # If the actor isent supported, return immideatly
    return if @actor == nil
     # According to the kind of the actor, the update is made...
    if character.is_a?(Game_Player)
      for equipment in 1...5
        @equips_id[equipment] == Visual_Equipment.get_itemid(equipment, @actor)
      end
      body = Visual_Equipment.get_itemid(0, @actor)
      for bodypart in 0..3
        @body_id[bodypart] = body[bodypart]
      end
    elsif SDK.enabled?('Caterpillar') == true and @character.is_a?(Game_Party_Actor)
      @actor = @character.actor
    elsif SDK.enabled?('SBABS') == true and @character.is_a?(Game_Ally)
      @actor = $game_party.actors[@character.actor_id]
    elsif @character.is_a?(Game_Event)
      @page = @character.page
    end
  end
  #--------------------------------------------------------------------------
  # * Update known equipment
  #--------------------------------------------------------------------------
  def guill_update_equipment
    return false if Visual_Equipment::Guillaume777 != true
    # Remember tile ID, file name and hue
    @tile_id = @character.tile_id
    @character_name = @character.character_name
    @character_hue = @character.character_hue
    # If the actor isent supported, return immideatly
    return if @actor == nil
     # According to the kind of the actor, the update is made...
    if character.is_a?(Game_Player)
      weapons  = Visual_Equipment.guill_itemid(1, @actor)
      armors   = Visual_Equipment.guill_itemid(2, @actor)
      for id in 0..armors.size
        start = id
        @equips_id[id] = armors[id]
      end
      for id in (start+1)..weapons.size
        @equips_id[id] = weapons[id]
      end
      body = Visual_Equipment.guill_itemid(0, @actor)
      for i in 0..3
        @body_id[i] = body[i]
      end
    elsif SDK.state('Caterpillar') == true and @character.is_a?(Game_Party_Actor)
      @actor = @character.actor
    elsif SDK.state('SBABS') == true and @character.is_a?(Game_Ally)
      @actor = $game_party.actors[@character.actor_id]
    elsif @character.is_a?(Game_Event)
      @page = @character.page
    end
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  def update
    super()
    # If something changed...
    if @tile_id != @character.tile_id or
      @character_name != @character.character_name or
      @character_hue != @character.character_hue or
      changed_equipment? or guill_changed_equipment?
      # First, update the information known
      if Visual_Equipment::Guillaume777 != true
        update_equipment
      elsif Visual_Equipment::Guillaume777 == true
        guill_update_equipment
      end
      # Then update the graphics
      update_tile
    end
    # Set visible situation
    self.visible = (not @character.transparent)
    # If graphic is character
    if @tile_id == 0
      # Set rectangular transfer
      sx = @character.pattern * @cw
      sy = (@character.direction - 2) / 2 * @ch
      self.src_rect.set(sx, sy, @cw, @ch)
    end
    # Set sprite coordinates
    self.x = @character.screen_x
    self.y = @character.screen_y
    self.z = @character.screen_z(@ch)
    # Set opacity level, blend method, and bush depth
    self.opacity = @character.opacity
    self.blend_type = @character.blend_type
    self.bush_depth = @character.bush_depth
    # Animation
    if @character.animation_id != 0
      animation = $data_animations[@character.animation_id]
      animation(animation, true)
      @character.animation_id = 0
    end
  end
  #--------------------------------------------------------------------------
  # * Update Tile
  #--------------------------------------------------------------------------
  def update_tile
    # If tile ID value is valid
    if @tile_id >= 384
      self.bitmap = RPG::Cache.tile($game_map.tileset_name,
      @tile_id, @character.character_hue)
      self.src_rect.set(0, 0, 32, 32)
      self.ox = 16
      self.oy = 32
      # If tile ID value is invalid (and thus a character is in that place ::))
    else
      # Create an Equpment awway
      equips = []
      # If handling a event
      if @character.is_a?(Game_Event) == true and @actor == 'event'
        # Check for comment input
        parameters = SDK.event_comment_input(@character, Visual_Equipment::Event_equipments, 'Visual Equipment')
        if parameters.nil?
          # Just draw the graphic
          equips.push(["#Characters/#{@character_name}", @character_hue])
        else
          # Catch the equipments
          for possible_item in 0..Visual_Equipment::Event_equipments-1
            item = parameters[possible_item].split(" | ") rescue ['none']
            hue = item.size > 2 ? item[2] : 0
            equips.push([item[1], hue]) if item[1] != 'none'
            equips.push(["#Characters/#{@character_name}", @character_hue]) if possible_item == 1
          end
        end
      # If handling the player
      elsif @actor != nil and @actor != 'event'
        if Visual_Equipment::Guillaume777 != true
          equips = @actor.get_equipments
        elsif Visual_Equipment::Guillaume777 != false
          equips = @actor.guill_equipments
        end
      end
      # Dispose old bitmap
      self.bitmap.dispose unless self.bitmap == nil
      # Draws the character bitmap
      bmp = RPG::Cache.character(@character_name, @character_hue)
      self.bitmap = Bitmap.new(bmp.width, bmp.height)
      src_rect = Rect.new(0, 0, bmp.width, bmp.height)
      # If character fits the size
      if equips.size > 0 and bmp.width == Visual_Equipment::Width and bmp.height == Visual_Equipment::Height
        for graphic in equips
          next if graphic[0] == nil
          if graphic[0].include?("#Characters/")
            graphic_equipment = RPG::Cache.graphic("#{graphic[0]}", graphic[1].to_i)
          else
            graphic_equipment = RPG::Cache.equipment("#{graphic[0]}", graphic[1].to_i)
          end
          self.bitmap.blt(0, 0, graphic_equipment, src_rect, 255)
        end
      elsif equips.size > 0
        for graphic in equips
          next if graphic[0] == nil
          if graphic[0].include?("#Characters/")
            graphic_equipment = RPG::Cache.graphic("#{graphic[0]}", graphic[1].to_i)
          else
            graphic_equipment = RPG::Cache.equipment("#{graphic[0]}", graphic[1].to_i)
          end
          src_rect = Rect.new(0, 0, bmp.width, bmp.height)
          self.bitmap.blt(0, 0, graphic_equipment, src_rect, 255)
        end
      else
        src_rect = Rect.new(0, 0, bmp.width, bmp.height)
        self.bitmap.blt(0, 0, bmp, src_rect, 255)
      end
      # Divide the drawings into pieces ^^
      @cw = bitmap.width / Visual_Equipment::Frames
      @ch = bitmap.height / Visual_Equipment::Directions
      self.ox = @cw / 2
      self.oy = @ch
    end
  end
end

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================
class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Draw Graphic
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_graphic(actor, x, y)
    return if actor == nil
    # Get the equipments
    if Visual_Equipment::Guillaume777 != true
      equips = actor.get_equipments
    elsif Visual_Equipment::Guillaume777 != false
      equips = actor.guill_equipments
    end
    # Set the basement
    bmp = RPG::Cache.character(actor.character_name, actor.character_hue)
    cw = bmp.width / 4
    ch = bmp.height / 4
    src_rect = Rect.new(0, 0, cw, ch)
    # Draw the equipments
    if equips.size > 0 and bmp.width == Visual_Equipment::Width and bmp.height == Visual_Equipment::Height
      for graphic in equips
        next if graphic[0] == nil
        if graphic[0].include?("#Characters/")
          graphic_equipment = RPG::Cache.graphic("#{graphic[0]}", graphic[1].to_i)
        else
          graphic_equipment = RPG::Cache.equipment("#{graphic[0]}", graphic[1].to_i)
        end
        self.contents.blt(x - cw / 2, y - ch, graphic_equipment, src_rect, 255)
      end
    elsif equips.size > 0
      for graphic in equips
        next if graphic[0] == nil
        if graphic[0].include?("#Characters/")
          graphic_equipment = RPG::Cache.graphic("#{graphic[0]}", graphic[1].to_i)
        else
          graphic_equipment = RPG::Cache.equipment("#{graphic[0]}", graphic[1].to_i)
        end
        self.contents.blt(x - cw / 2, y - ch, graphic_equipment, src_rect, 255)
      end
    else
      src_rect = Rect.new(0, 0, bmp.width, bmp.height)
      self.contents.blt(0, 0, bmp, src_rect, 255)
    end
  end
end

#==============================================================================
# *** module RPG
#==============================================================================
module RPG
  #============================================================================
  # *** moduel Cache
  #============================================================================
  module Cache
    #--------------------------------------------------------------------------
    # * Load equipment
    #--------------------------------------------------------------------------
    def self.equipment(filename, hue)
      self.load_bitmap("Graphics/Visual Equipment/", filename, hue)
    end
    #--------------------------------------------------------------------------
    # * Load graphic
    #--------------------------------------------------------------------------
    def self.graphic(filename, hue)
      filename.slice!("#")
      self.load_bitmap("Graphics/", filename, hue)
    end
  end
end

#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
#  This class deals with events. It handles functions including event page 
#  switching via condition determinants, and running parallel process events.
#  It's used within the Game_Map class.
#==============================================================================
class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # * Public instance variables
  #--------------------------------------------------------------------------
  attr_reader :page
end
  
#------------------------------------------------------------------------------
# * End SDK Enable Test
#------------------------------------------------------------------------------
end


Post here or mail/msn me at: kbrito6@hotmail.com


thanks... :biggrin:
 
Thanks...
Well, i'm brazillian indeed... Oo'

You figured it out by my bad english or by the clothes in portuguese in th script? XD

I Know that the poses won't work, i don't mind...

Thanks again, i'll try this script and see what happens... :lol:
 
I need some support indeed...

In the other script i was using, i could add skin and head to a character, graphics that does not need to have equipments attached to the character to show up... I use to enter this command to set them:
Code:
$game_party.actors[0].set_body(0, "Pele.png")
    $game_party.actors[0].set_body(1, "Cabeça4.png")
    $game_party.actors[0].set_body(2, "")

Tell how i do this with your script... =3

Also, i get an error on this line once i start the game:
Code:
331   alias visual_command_new_game command_new_game

Can you tell me why is this happening? Oo'
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top